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

Document how VUs are cycled in arrival-rate executors #136

Closed
na-- opened this issue Oct 16, 2020 · 3 comments · Fixed by #1016
Closed

Document how VUs are cycled in arrival-rate executors #136

na-- opened this issue Oct 16, 2020 · 3 comments · Fixed by #1016
Labels
Area: OSS Content Improvements or additions to community/oss documentation Type: needsMaintainerHelp Good issue for k6 maintainers

Comments

@na--
Copy link
Member

na-- commented Oct 16, 2020

Prompted by grafana/k6#1623 (comment), we should make sure to explain that the arrival-rate executors are going to cycle over all of the initialized VUs, given enough time, even if they only need a small fraction of them at any given point to run their allotted iterations per second.

@mstoykov
Copy link
Contributor

I guess I have to comment here instead of at #1016 (comment).

I am not certain documenting the specificity of the VUs being cycled is a good idea. This is an implementation detail that might change in the future.

It also has close to zero actionable things you can do with that. Even the linked example is arguably not great because it depends on the data and each iteration being uniformly taking time.

This seems to be based on the usual "misconception" that you should map 1 user to 1 VU for the whole duration of the test/scenario. Which IME is not great and does not scale either way.

As such I prefer if instead of documenting the specific cycling of VUs to more or less say "there is no guarantee on which number of VU will run which number of iteration for any given scenario. A uniform distribution of the iterations over the VUs is guaranteed and should not be depended on. "

@na--
Copy link
Member Author

na-- commented Jan 31, 2023

Good points, I agree that we shouldn't document the current state, since it is indeed an implementation detail that we might decide to change in the future, e.g. to optimize the executor for higher throughput. Documenting the current implementation will almost prevent us from doing that, or at least make it an unnecessary breaking change. 👍 for something like this:

There is no guarantee which VU will run which iteration for any given scenario. A uniform distribution of the iterations over the VUs is guaranteed and should not be depended on.

@MattDodsonEnglish
Copy link
Contributor

Thanks to both of you for pointing this out. I've added this which I think is more useful and general than the original: 79c10d6

MattDodsonEnglish added a commit that referenced this issue Jan 31, 2023
Closes #136

Co-authored-by: Mihail Stoykov <312246+mstoykov@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: OSS Content Improvements or additions to community/oss documentation Type: needsMaintainerHelp Good issue for k6 maintainers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants