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

--ratelimit and --ratelimit-window flags #295

Merged
merged 2 commits into from
Feb 22, 2024
Merged

Conversation

fatpat
Copy link
Contributor

@fatpat fatpat commented Jan 18, 2024

when set, ratelimit operations during the prepare phase and the bench to a global ratelimit threshold to each worker

@klauspost
Copy link
Collaborator

@fatpat Could you explain why this is needed? It seems contrary to the idea of benchmarks - even if it is only in preparation.

@fatpat
Copy link
Contributor Author

fatpat commented Jan 18, 2024

@fatpat Could you explain why this is needed? It seems contrary to the idea of benchmarks - even if it is only in preparation.

benchmark is not necessarily to push as hard as possible, it sometimes can target a fix rate to check how a cluster is handling at a specific rate instead of observing how it handles at the limits.

In our case we need to reproduce as close as possible in a stage environment what we observe from a production environment. We need to handle multiple account and target a global specific rate. We plan to use warp (1 instance per account) with different mix bench parameter and with different ratelimit.

@klauspost
Copy link
Collaborator

@fatpat Fair point. I will check it out ASAP.

Copy link
Collaborator

@klauspost klauspost left a comment

Choose a reason for hiding this comment

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

PTAL

cli/flags.go Outdated Show resolved Hide resolved
cli/flags.go Outdated Show resolved Hide resolved
cli/flags.go Outdated Show resolved Hide resolved
pkg/bench/ratelimit.go Outdated Show resolved Hide resolved
pkg/bench/ratelimit.go Outdated Show resolved Hide resolved
@fatpat fatpat force-pushed the ratelimiting branch 2 times, most recently from 0bec138 to 941c7f5 Compare January 24, 2024 07:37
@klauspost
Copy link
Collaborator

@fatpat I think a per worker rate limit is too hard to control. I would like it to be per warp instance.

@fatpat
Copy link
Contributor Author

fatpat commented Jan 27, 2024

@fatpat I think a per worker rate limit is too hard to control. I would like it to be per warp instance.

done

@fatpat fatpat force-pushed the ratelimiting branch 2 times, most recently from d4940a9 to 52a9bc5 Compare January 27, 2024 08:38
@klauspost
Copy link
Collaborator

@fatpat Awesome! Thanks! I will review Monday if time permits!

when set, rate limit operations during the prepare and the main phase of
the bench. The ratelimit applies globally to all concurrent worker of
each warp instance.
@ComputerPers
Copy link

ComputerPers commented Feb 22, 2024

Please approve this PR, i had to build a fork from @fatpat repository to use this feature.

Proof that its working:
image

first test in this example - 5 IO limit per warp client (i have two)
second test - 10 IO limit per warp client.

i made more tests - with 0, 100, 10 - all goes fine.

@klauspost klauspost merged commit bddb29b into minio:master Feb 22, 2024
9 checks passed
@fatpat fatpat deleted the ratelimiting branch February 29, 2024 19:09
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.

4 participants