Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Executors, explain vu cycling in arrival-rate #1016

Merged
merged 3 commits into from
Jan 31, 2023
Merged

Conversation

MattDodsonEnglish
Copy link
Contributor

Closes #136

@github-actions
Copy link
Contributor

There's a version of the docs published here:

https://mdr-ci.staging.k6.io/docs/refs/pull/1016/merge

It will be deleted automatically in 30 days.

Comment on lines 122 to 120
then the value of `{exec.vu.iterationInScenario}` will reach `15` at some points,
even if k6 never requires that number of VUs to reach the target iteration.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
then the value of `{exec.vu.iterationInScenario}` will reach `15` at some points,
even if k6 never requires that number of VUs to reach the target iteration.
then the value of `{exec.vu.iterationInScenario}` will reach `15` at some points,
even if k6 never requires that number of VUs to reach the target iteration *at the same time*.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Otherwise I can read this as even if I only had to to 10 iterations (1iter/s for 10s) but got 15 VUs I will still use all 15 VUs ... somehow

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm I'm a little lost at both yours and mine.

Maybe:

even if the executor never requires all 15 VUs to reach the target rate.

WDYT?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I mean it is better as rate is the key word. My problem is that somebody who doesn't understand this all that well likely will be just as confused.

IMO it is better to be more explicit in what is that we are trying to say when it is confusing to begin with.

In this case for me the key parts are:

  1. k6 will use at most as many VUs at a time to hit the provided rate
  2. this VUs will not necessarily be the first N VUs only even if only N or less VU are needed at any given moment.

I am not certain guaranteeing that it will go through all the VUs is a good idea - this is an implementation detail that likely is never necessary to be known.

@MattDodsonEnglish
Copy link
Contributor Author

If it's still confusing with that sentence, I think it might be easier to communicate visually.

For example, if you allocate 4 vus and the target never requires more than two active, k6 still cycles through all four if the test runs long enough. This is to say that the value of {exec.vu.iterationInScenario} will be 3 and 4 at some iterations.

image

@MattDodsonEnglish
Copy link
Contributor Author

Thanks, I think it's much more general and useful with: 79c10d6

I added the part about shared array because I want to avoid any chance of confusion if someone misunderstands the admonition. I still kept in a little miniature section in the allocation explanation since a little redundancy can be effective.

…s/01 Executors.md

Co-authored-by: Mihail Stoykov <312246+mstoykov@users.noreply.github.com>
@MattDodsonEnglish MattDodsonEnglish merged commit 7d3ccb9 into main Jan 31, 2023
@MattDodsonEnglish MattDodsonEnglish deleted the 136-executors branch January 31, 2023 14:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Document how VUs are cycled in arrival-rate executors
3 participants