Reputation: 97
So, I started from 1 VU, and ended with 199, after that value of VUs number of checks doesn't grow up anymore.
So, I tried this
import http from "k6/http";
import { check } from "k6";
export const options = {
scenarios: { default: {
executor: 'constant-arrival-rate',
duration: '30s',
rate: 5000, timeUnit: '1s',
preAllocatedVUs: 900
} }
};
export default function() {
const res = http.get("http://ipv4:6399/game_heartbeat");
check(res, { "status was 200": r => r.status == 200 })
};
got
WARN[0002] Insufficient VUs, reached 900 active VUs and cannot initialize more executor=constant-arrival-rate scenario=default
running (0m30.0s), 000/900 VUs, 128808 complete and 0 interrupted iterations default ✓ [======================================] 000/900 VUs 30s 5000 iters/s
Tried
import http from "k6/http";
import { check } from "k6";
export const options = {
vus: 199,
duration: "30s"
};
export default function() {
const res = http.get("http://ipv4:6399/game_heartbeat");
check(res, { "status was 200": r => r.status == 200 })
};
and got
running (0m30.0s), 000/199 VUs, 163220 complete and 0 interrupted iterations default ↓ [======================================] 199 VUs 30s
✓ status was 200 checks.........................: 100.00% ✓ 163220 ✗ 0
if I change VUs from 199 to 299, 399, 699 - it doesn't change number of checks. It still would be somewhere around 165k for 30s run
My version is k6 v0.36.0 (2022-01-24T09:50:03+0000/ff3f8df, go1.17.6, linux/amd64)
I am running the script without any additional params, just like k6 run script.js
How I could increase 'pressure' from k6 on a testing service?
Upvotes: 2
Views: 2297
Reputation: 6237
It will be useful to determine if it is k6 or your app that is running out of gas. Figure that out, and you can move forward.
If your app is the bottleneck...congrats! Your test are indicating what your limits are, and you can start optimizing your app. Or throw more resources at it until you achieve the performance you're looking for.
If it is k6 that can't keep up with the traffic your app can receive, then kudos to your app! See about giving k6 more resources to work with.
BTW, if you're running k6 and your app on the same machine, then they will be fighting for resources. If that's the case and you're hitting bottlenecks, move one of them to a different computer.
Upvotes: 0
Reputation: 168072
The options are in:
Upvotes: 1