Skip to content

Commit

Permalink
Remove unessential explanation of internals
Browse files Browse the repository at this point in the history
  • Loading branch information
MattDodsonEnglish committed Jan 31, 2023
1 parent efd3755 commit 79c10d6
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -113,12 +113,8 @@ Some of the times it might make sense to use `maxVUs` include:
- To add a little "cushion" to the pre-allocated VUs that you expect the test needs
- In huge, highly distributed tests, in which you need to carefully scale load generators as you increment VUs.

## Arrival-rate executors cycle over all VUs
## You can't guarantee which VU runs an iteration

Given enough time, k6 cycles over all VUs initialized, even if only a small fraction of them are needed to reach the target rate.

This fact has implications for the [execution context variables](/docs/using-k6/execution-context-variables/).
For example, if your arrival-rate scenario allocates 15 vus runs long enough,
then the value of `{exec.vu.iterationInScenario}` will reach `15`,
even if k6 never requires that number of VUs to reach the target iteration.
As with all executors, you can't predict the specific VU that an arrival-rate executor uses for a specific iteration.
As the test runs on, the executor might use some or all of the allocated VUs, even if it never needs the entire allocated number to reach the iteration rate.

Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,19 @@ want to model to test your services.

Possible values for `executor` are the executor name separated by hyphens.

<Blockquote mod="note" title="VUs might not distribute uniformely over iterations">

For any given scenario, you can't guarantee that a specific VU can run a specific iteration.

With [`SharedArray`](/javascript-api/k6-data/sharedarray/) and [execution context variables](/using-k6/execution-context-variables/), you can map a specific VU to a specific value in your test data.
So the tenth VU could use the tenth item in your array.

But, you _cannot_ reliably map, for example, the tenth VU to the tenth iteration.

</Blockquote>



| Name | Value | Description |
| ---------------------------------------------------------------------------- | ----------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------- |
| [Shared iterations](/using-k6/scenarios/executors/shared-iterations) | `shared-iterations` | A fixed amount of iterations are<br/> "shared" between a number of VUs. |
Expand Down

0 comments on commit 79c10d6

Please sign in to comment.