Skip to content

Commit be36568

Browse files
Fix typo and markdownlint warnings
1 parent 7d1435c commit be36568

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/data/markdown/translated-guides/en/02 Using k6/14 Scenarios/00 Concepts/02 Arrival-rate VU allocation.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ excerpt: How k6 allocates VUs in the open-model, arrival-rate executors
66
In arrival-rate executors, as long as k6 has VUs available, it starts iterations according to your target rate.
77
The ability to set iteration rate comes with a bit more configuration complexity: you must pre-allocate a sufficient number of VUs.
88
In other words, before the tests runs, you must both:
9+
910
- Configure load (as new iterations per unit of time)
1011
- Ensure that you've allocated enough VUs.
1112

@@ -25,12 +26,13 @@ As [open-model](/using-k6/scenarios/concepts/open-vs-closed/#open-model) scenari
2526
For example, you can configure arrival-rate executors to start 10 iterations each second, or minute, or hour.
2627
This behavior is opposed to the closed-model scenarios, in which VUs wait for one iteration to finish before starting another
2728

28-
Each iteration need needs a VU to run it.
29+
Each iteration needs a VU to run it.
2930
Because k6 VUs are single threaded, like other JavaScript runtimes, a VU can only run a single iteration (and its event loop) at a time.
3031
To ensure you have enough, you must pre-allocate a sufficient number.
3132

3233
In your arrival-rate configuration, three properties determine the iteration rate:
33-
- k6 starts `rate` number of iterations evenly across the `timeUnit` (default 1s)
34+
35+
- k6 starts `rate` number of iterations evenly across the `timeUnit` (default 1s).
3436
- `preAllocatedVUs` sets the number of VUs to initialize to meet the target iteration rate.
3537

3638
For example, with a `constant-arrival-rate` executor and `rate: 10`, k6 tries to start a new iteration every 100 milliseconds. If the scenario has `rate: 10, timeUnit: '1m'`, k6 tries to start a new iteration every 6 seconds.
@@ -94,9 +96,9 @@ In cloud tests, the number of `maxVUs` counts against your subscription,
9496

9597
</Blockquote>
9698

97-
9899
The arrival-rate executors also have a `maxVUs` property.
99100
If you set it, k6 runs in this sequence:
101+
100102
1. Pre-allocate the `preAllocatedVUs`.
101103
1. Run the test, trying to reach the target iteration rate.
102104
1. If the target exceeds the available VUs, allocate another VU.
@@ -109,6 +111,7 @@ This is because k6 must allocate sufficient resources for `maxVUs` to be initial
109111
In almost all cases, the best thing to do is to pre-allocate the number of VUs you need beforehand.
110112

111113
Some of the times it might make sense to use `maxVUs` include:
114+
112115
- To determine necessary allocation in first-time tests
113116
- To add a little "cushion" to the pre-allocated VUs that you expect the test needs
114117
- In huge, highly distributed tests, in which you need to carefully scale load generators as you increment VUs.
@@ -117,4 +120,3 @@ Some of the times it might make sense to use `maxVUs` include:
117120

118121
As with all executors, you can't predict the specific VU that an arrival-rate executor uses for a specific iteration.
119122
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.
120-

0 commit comments

Comments
 (0)