As shown in the image I ran only 2 VUs but it returned “100” complete. What would that 100 be? Number of scripts run or vus? So for every 1 VU I have 50 scripts running, is that it?
2 Answers
You have configured k6 to run with 2 vus for 2 minutes --vus 2 --duration 2m
.
You can see this in the "summary" as "2 looping VUs for 2m0s".
This means that you are running the constant-vus executor, the options you provided are just a shortcut for it. Arguably the "looping vus" description explains better that you have 2 VUs looping for 2 minutes.
As you can see above you also do 100 iterations- executions of the default function. And those take around 2.42s and 2min = 120s / 2.42 = 49.5. But k6 will try to finish started execution for a time (gracefulStop as mentioned in the screenshot), so it will make around 50 iterations per VU.
If you just want to do 2 iterations - add --iterations 2
or use shared-iterations executor directly, those options are the shortcut for it basically.

- 1,084
- 9
- 18
-
so basically interaction is the script that i want to run more than once right, example, if i want to run 1k script so that i'm saying that i make 1k interactions not vus. – Massallys Apr 20 '22 at 14:55
-
First it's `iteration` not `interaction` which ... sounds more like .. anything, including a single request for example. If you want to make exactly X iterations - you should configure X iterations, and then you can have up to that many VUs runnign them. – Михаил Стойков Apr 21 '22 at 09:29
-
so for example a i want to run 20K of the same script in this example a put it on the 20K in iteration or VUs? – Massallys Apr 25 '22 at 13:45
-
In your case where you are using `shared-iterations` executor - yes. In others you need to look at the documentation per each and see what you need. For example in `per-vu-iterations` you need `iterations`*`vus` to be equal to the number you want. As `itearations` there means "iteration per vu" while in `shared-iterations`, `itearations` is the total number of iterations. For some that isn't even possible - `contant-vus` only can be configured how long to run and with how many VUs - the number iterations comes from how many it manages to complete given those restrictions. – Михаил Стойков Apr 26 '22 at 07:24
-
@Massallys if you think this is correct answer - you can mark it as such ;) – Михаил Стойков Apr 29 '22 at 08:50
As shown in the image I ran only 2 VUs but it returned “100” complete. What would that 100 be? Number of scripts run or vus? So for every 1 VU I have 50 scripts running, is that it?
Restart.
-> sudo apt-get update
-> sudo apt-get upgrade
if not, download it again with root manager end cp

- 100,966
- 191
- 140
- 197

- 1
- 1
-
-
Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Apr 20 '22 at 15:34
-
Everything works as expected. What would an update improve? Why would it help? – knittl Apr 22 '22 at 11:33