Reduce Grafana Cloud Performance Testing costs
Grafana Cloud k6 subscriptions are billed based on usage in Virtual User Hours (VU hours, or VUH) and the number of static IP addresses. This guide discusses how to optimize usage to reduce cost.
Review your usage
You can review usage on the Billing and Usage dashboard on the k6 Virtual User Hours (VUH) panel. You can also review usage reports to understand how your different projects, teams, and contributors are impacting your overall usage.
Reduce your usage
Test locally
To save on VU hours, prototype and debug scripts on a local machine. After you have the correct logic, increase the load and duration to the desired levels, then run the script with
k6 cloud run
for managed execution, visualization, and storage.
Start with a smoke test
Start with a smoke test. Before running larger tests, validate that your performance testing script works as expected and that your system performs well with a small number of users.
After you know that the script works and the system responds correctly to minimal load, you can move on to average-load tests. From there, you can progress to more complex load patterns.
Refer to Load test types to learn more about the different types of performance tests.
Set project limits and quotas
When creating performance tests in Grafana Cloud k6, you have to define a few parameters, such as virtual users (VUs), and test duration. After a test is executed, you also have the number of virtual user hours (VUH) used by a test run. Each Grafana Cloud subscription has different limits for those parameters.
To help your team manage your account limits, and avoid having unexpected charges at the end of the billing cycle, you can set limits and quotas to individual projects.
Use Grafana Cloud Synthetic Monitoring
The Synthetic Monitoring tool supports k6 scripted checks and k6 browser checks, which can reduce VUH usage costs. To learn more about how Synthetic Monitoring is billed and the supported k6 Options for scripted checks, refer to the guides below.
- Understand your Synthetic Monitoring invoice
- Supported k6 Options for k6 browser checks
- Supported k6 Options for k6 scripted checks
Remove unused static IP addresses
Static IP addresses can provide additional security and convenience when running performance tests. Each static IP address incurs a monthly charge, which is added to your Grafana Cloud subscription. To reduce costs, review your performance tests to make sure they’re still using the IP addresses assigned to your Grafana Cloud account and delete any unused static IP addresses.