What determines the timing of VU ramp‑down between stages in k6 load tests?
0 reputation · 15 Sept 2020, 04:32 UTC
Understanding VU ramp‑down timing between stages
The goal is to predict the exact moment k6 begins to reduce the number of virtual users after a stage ends, so that low‑traffic workloads can stay within the free‑tier VU‑minute quota.
The documentation defines each stage by a target VU count and a duration, but it does not state whether the ramp‑down starts instantly at the stage boundary or only after the current VU iteration finishes, nor does it specify the shape of the ramp‑down curve. This uncertainty makes it hard to verify the actual VU‑minute consumption of a test that uses a brief high‑load stage followed by a low‑load stage.
Does k6 start ramp‑down immediately at the stage boundary, or does it wait for the current VU iteration to complete? Does the ramp‑down follow a linear gradient over the stage’s duration, or is it applied as a step change? How does this behavior affect the total VU‑minute count for a low‑traffic test that uses a short high‑load stage followed by a low‑load stage?