githubEdit

Local Performance Testing

The document describes an opinionated reproducible local environment

Prerequisites

Ensure you have the following installed:

Overview

Under the hood the reproducible local environment consists of:

A set of Makefile targets (hack/local-perf-testing/lpt.mk) is provided for convenient spin-up, teardown, build and rebuild.

Workflow

  1. Spin-up the environment

    Optionally deploy Mermin with the OTel output to a local OTel collector

  2. Expose grafana (accessible via http://localhost:3000/)

  3. Test, observe

To teardown the environment (delete Kind cluster) run

Mermin config and values

The "local" values and config is used for Mermin, in order to modify them make changes to

  • docs/deployment/examples/local/config.example.hcl

  • docs/deployment/examples/local/values.yaml

And run:

In order to test local changes you need to rebuild Mermin image and restart Mermin daemonset

circle-info

Will work only if mermin:latest is defined in the values

Modify the traffic generator

Default values should produce around 49k active flows and 1600 flows per second.

In order to modify the traffic generate you may simply change the default docs/deployment/examples/local/values.yaml and re-deploy the generator

lpt Makefile targets

  • Kind Cluster Management

    • lpt-kind-create: Create a local Kind Kubernetes cluster using a predefined config.

    • lpt-kind-delete: Delete the Kind cluster named "atlantis".

  • Mermin Build & Deployment

    • lpt-build: Build the mermin:latest Docker image (debug), and load it into the Kind cluster.

    • lpt-build-restart: Build the image and restart the Mermin daemonset to pick up the new image.

    • lpt-mermin: Install the Mermin Helm chart with a sample config.

    • lpt-mermin-otel: Install the Mermin Helm chart with OpenTelemetry integration and deploy a local OTel collector.

    • lpt-otel: Deploy a local OTel collector.

  • Monitoring & Sample Apps

    • lpt-mon: Deploy the monitoring stack (metrics-server, Prometheus, Grafana).

    • lpt-sample-be: Deploy a sample backend (podinfo) with Redis enabled.

    • lpt-traffic-gen: Deploy the traffic generator Helm chart.

    • lpt-doc: Print commands to port-forward Grafana, Prometheus, and the sample backend for local access.

  • Convenience Targets

    • lpt-up: Run all steps to build, deploy monitoring, Mermin, sample backend, traffic generator, and print port-forward instructions.

Last updated