Saltar al contenido principal

Run Load Test With Avalanche-CLI

This page demonstrates how to run load test on a Subnet deployed on a cluster of cloud-based validators using Avalanche-CLI.

Prerequisites

Before we begin, you will need to have:

  • Created an AWS account and have an updated AWS credentials file in home directory with [default] profile or set up your GCP account according to here
  • Created a cluster of cloud servers with monitoring enabled
  • Deployed a Subnet into the cluster
  • Added the cloud servers as validator nodes in the Subnet

Run Load Test

When the load test command is run, a new cloud server will be created to run the load test. The
created cloud server is referred by the name <loadtestName> and you can use any name of your choice.

To start load test, run:

avalanche node loadtest start <loadtestName> <clusterName> <subnetName>

Next, you will need to provide the load test Git repository URL, load test Git Branch, the command to build the load test binary and the command to run the load test binary.

We will use an example of running load test on a Subnet running custom VM MorpheusVM built with HyperSDK.

The following settings will be used:

  • Load Test Repo URL: https://github.com/ava-labs/hypersdk/
  • Load Test Branch: vryx-poc
  • Load Test Build Script: cd /home/ubuntu/hypersdk/examples/morpheusvm; CGO_CFLAGS=\"-O -D__BLST_PORTABLE__\" go build -o ~/simulator ./cmd/morpheus-cli
  • Load Test Run Script: /home/ubuntu/simulator spam run ed25519 --accounts=10000000 --txs-per-second=100000 --min-capacity=15000 --step-size=1000 --s-zipf=1.0001 --v-zipf=2.7 --conns-per-host=10 --cluster-info=/home/ubuntu/clusterInfo.yaml --private-key=323b1d8f4eed5f0da9da93071b034f2dce9d2d22692c172f3cb252a64ddfafd01b057de320297c29ad0c1f589ea216869cf1938d88c9fbd70d6748323dbf2fa7

Once the command is run, you will be able to see the logs from the load test in the cluster's Grafana URL like the example below:

Centralized Logs

Stop Load Test

To stop the load test process on the load test instance <loadtestName> and terminate the load test instance, run:

avalanche node loadtest stop <loadtestName>

Was this page helpful?