- I’d like to simulate heavy load on my Jenkins master to get a better understanding of stability and performance
- How can I stress test my master to determine if the system/architecture is powerful enough to handle heavy loads?
- CloudBees Jenkins Enterprise
Apache JMeter is a good tool to do this, as it’s designed to load test functional behavior and measure performance. JMeter can be used to simulate a heavy load on a server, group of servers, network or object to test its strength or to analyze overall performance under different load types. You can use it to make a graphical analysis of performance or to test your server/script/object behavior under heavy concurrent load.
Disclaimer: This is a Third-party tool, so please run this at your own risk. We discourage running such tools or performing stress testing in Production environments. It’s recommended to create a “Test” Jenkins instance to perform such testing - please see Migrating Jenkins instances for instructions to create this type of environment.
You will need to download the standard set of plugins (which includes Perfmon). Once you start JMeter, and load the test plan, you can right click Test Jenkins Jobs on the left hand column, then Add, then Listeners, then jp@gc - Perfmon Metrics Collector. Here, you can add rows which collect specific data based on target server host name and port that we will specify later (such as “CPU and Disk I/O”) as seen in the following screenshot:
After this is configured, you will need to download the Server Agent and extract onto the target machine. You can put it anywhere and start it by running ./startAgent.sh on Linux machines or ./startAgent.bat on Windows machines. It defaults to port 4444, but you can change it by running a command like this:
./startAgent.sh --udp-port 0 --tcp-port 3450. Once the server is running, you can execute the tests by clicking the green play button at the top of JMeter(as seen in the screenshot above).
Please access the sample test plan here: (Copy/paste the contents and save this to a file)
Once you load this sample test in JMeter, Select the Variables section and change the “host” and “port” variables as needed to point to your Test Jenkins instance. This should work on an instance that is very basic in configuration, with security disabled. Additional modifications may be necessary if you have security enabled, or if you’d like to enhance the tests.