I am running a 1 hour constant-arrival-rate test. My test is supposed to generate 1TB of traffic at the end of the hour. The SUT is an encoder that responses with the encoded data in the response body, which which needs to sum up to 1TB by the end of the hour. 1TB / Hour == 2.2222 Gigabits per second. My scenario is:
let VersionScenarios = {
scenario: {
executor: vu_type,
exec: 'my_request',
preAllocatedVUs: 1500,
rate: Math.floor(((1024) / (2.2 * 8)) * 2.2222222 ), // 1 TB per hour ~= 2.22222 Gbps
duration: '1h',
},
}
My executor is:
export function my_request () {
const url = `${__ENV.HOST}/${__ENV.SEGMENT}`
let response = http.get(url);
const CheckOutput = check(
response, {
"response.status is 200": (response) => response.status === 200,
}
)
if (!CheckOutput) {
console.log(response.request.url)
console.log(response.status_text)
}
// console.log(url.searchParams); // debug
// console.log(JSON.stringify(response.headers)); // debug
}
The logs at the beginning of the test say:
running (0h00m58.1s), 1500/1500 VUs, 7496 complete and 0 interrupted iterations
_144p [ 2% ] 0004/1500 VUs 0h00m58.1s/1h0m0s 129 iters/s
Why is the first line saying 1500/1500 VUs, then the 2nd line says 0004/1500? How do I interoperate the logs?
My main problem is: Half way through the test I get the following error:
level=warning msg=“Insufficient VUs, reached 1500 active VUs and cannot initialize more”
And the my test stops doing 2.222 Gigabits per second, and does about 1 Gigabit per second for the rest of the test. I have tried with 8, 16, 100, 200, 500, and 1500 VUs, and every time at about 30 minutes I get this error and the test stops doing 2.2 Gbps and does about 1Gbps.
FWIW I am running k6 in an ECS cluster and have noticed that when doubling the memory of the ECS cluster, I do not have this problem. Why is a constant-arrival-rate test consuming more and more memory as the test runs? Isn’t it constant?