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

RFE: rate-limiting #453

Open
rowlap opened this issue Oct 8, 2020 · 1 comment
Open

RFE: rate-limiting #453

rowlap opened this issue Oct 8, 2020 · 1 comment

Comments

@rowlap
Copy link

rowlap commented Oct 8, 2020

It would be useful to combine a larger fanout with rate-limiting, in order to smooth the load caused by clush launching many tasks simultaneously.

For example, my task tolerates a high degree of parallelism, but with a resource spike at startup. Being able to stagger 100 launches by 0.1s would allow each task to start without the sudden burst of forking.

@degremont
Copy link
Collaborator

Hi @rowlap

As a short term workaround, you can add a random sleep before starting your long running task, like:

Adapt the random use depending on your use case. Starts 100 task and wait for 0.1 seconds between each start will actually starts the last task 10 seconds after the first one.

clush -w ... 'sleep $(( $RANDOM % 10 )); my_long_task'

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

No branches or pull requests

2 participants