This repository contains k6 scripts used to benchmark k6 performance under different test scenarios, on a variety of hardware configurations. We track statistics such as CPU and memory usage, HTTP requests per second (RPS), and number of VUs, which are graphed and presented in easily readable documents.
The goal is to keep track of k6 performance for each major release, in order to detect any regressions early, and to easily share the performance a single instance of k6 can achieve with the community.
You can see the k6 scripts used in the /scripts directory.
-
website.js
: a general purpose script that replicates common real-world scenarios: loading the front page and static assets, and logging in using some predefined credentials. It uses popular k6 features, such as custom metrics, checks, thresholds andsleep()
. The purpose of this script is not to achieve the highest RPS, but to track general performance. -
RPS-optimized.js
: a simple script that tries to achieve the highest possible RPS. -
file-upload.js
: a script that uploads a large file, used to track memory usage and network throughput.
We use a variety of load generator machines, to measure the performance under different hardware configurations. Currently these are AWS EC2 instances, which may change in the future.
-
m5.large
: 2 vCPU cores, 8GB RAM -
m5.4xlarge
: 16 vCPU cores, 64GB RAM -
m5.24xlarge
: 96 vCPU cores, 384GB RAM
All scripts are run against a large-scale deployment of a simple test PHP site maintained by the k6 team. This site is available publicly at https://test.k6.io/, though for purposes of these tests, and to keep infrastructure costs down, we make secondary deployments that are only available during the benchmark run.
Results of tested k6 versions are available in the /results directory. You can find the raw data, graphs and result explanations in each subdirectory.
See the Usage document for information about setting up the environment, and commands to run the benchmarks.
-
"Running large tests" guide: learn about some ways to improve k6 performance, error troubleshooting, and more.
-
"Fine tuning OS" guide: learn about different operating system configuration tweaks to make sure k6 runs optimally.