I am using K6 to do some load testing but whatever configuration I give it I cannot get it to make more than ~1000 requests per second.
I’ve tried various scenarios
{
"scenarios": {
"ramped_load_test": {
"executor": "ramping-arrival-rate",
"startRate": 1000, // Start with 1000 requests per second
"timeUnit": "1s", // Requests per second
"preAllocatedVUs": 350, // Minimum virtual users (set slightly above 300)
"maxVUs": 1000, // Maximum VUs for scalability
"stages": [
{ "duration": "1m", "target": 5000 }, // Ramp to 5000 requests per second in 1 minute
{ "duration": "2m", "target": 15000 }, // Ramp to 15,000 requests per second in 1 minute
{ "duration": "2m", "target": 30000 }, // Ramp to 30,000 requests per second in 1 minute
{ "duration": "15m", "target": 30000 } // Maintain 30,000 requests per second for 5 minutes
],
"gracefulStop": "30s" // Allow 30 seconds for graceful shutdown
}
},
"noConnectionReuse": false,
"insecureSkipTLSVerify": true,
"userAgent": "MyK6UserAgentString/1.0"
}
{
"scenarios": {
"ramped_load_test": {
"executor": "ramping-arrival-rate",
"startRate": 1000,
"timeUnit": "1s",
"preAllocatedVUs": 350,
"maxVUs": 1000,
"stages": [
{ "duration": "1m", "target": 5000 },
{ "duration": "2m", "target": 15000 },
{ "duration": "2m", "target": 30000 },
{ "duration": "15m", "target": 30000 }
],
"gracefulStop": "30s"
}
},
"noConnectionReuse": false,
"insecureSkipTLSVerify": true,
"userAgent": "MyK6UserAgentString/1.0"
}
//push it constant rate
{
"scenarios": {
"constant_load_test": {
"executor": "constant-arrival-rate",
"rate": 30000,
"timeUnit": "1s",
"duration": "15m",
"preAllocatedVUs": 350,
"maxVUs": 1000,
"gracefulStop": "30s"
}
},
"noConnectionReuse": false,
"insecureSkipTLSVerify": true,
"userAgent": "MyK6UserAgentString/1.0"
}
however in all of these I only ever seem to get around 1000 Requests per second but I can get multiple connections (virtual users). See pictures.
It doesn’t matter if i have 1 connection or 1000 i still cant get the requests per second up.
My objective in an ideal world is to ramp up to 30,000 requests per second over 1 minute and then hold 30,000 requests per second for an hour.
I want to then vary the number of connections that are producing this 30,000 so i can see the CPU load etc on the server being tested based on how many connections are being made.
Could someone please advise me where I’m going wrong here? Thanks
P.S When I use Jmeter load testing tool I can get 30,000 no problem (I’ve had 70,000) but I can’t get microsecond accuracy with Jmeter so hoping to move over to K6.