-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Salt parallel execution has no min/max control for state parallel support #49301
Comments
ping @saltstack/team-core any ideas here on how we can limit this? |
Actually a very important feature to have. The Salt position itself as all about the scale and performance and this is very much needed. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
putting this back into triage as I think there may be some other issues that are similar and assigned to @garethgreenaway but I may be wrong. |
There is the |
@Oloremo would you be able to try Gareth's suggestion above on |
@Oloremo friendly reminder to see if Gareth's suggestion was helpful or not |
@Oloremo would you be able to try Gareth's suggestion above on process_count_max and give some feedback? |
@sagetherage Hi! I'm on vacation right now plus I think there are good steps to reproduce provided by the original author. |
This would be a very useful feature to have. Sadly, Lines 1755 to 1763 in 6e64117
* From my testing, states run with |
I recently ran into needing this and agree that it would be nice to have a global option to set a limit. I was able to use some "creative state writing" to enforce a maximum number of tasks happening in parallel within my state run by inserting a test.nop state into the mix and using requisites to group them together. suppose you have 100 tasks and you want to run a maximum of 25 parallel my_state.sls:
outputs (some state returns removed for brevity):
|
Currently as soon as |
Description of Issue/Question
There doesn't seem to be a way to properly limit parallel execution- neither in checking docs, nor in reading through the various calls to state's call_parallel.
This in turn means that if the chunk graph is correct, and you have quite a few parallels in use you can easily exhaust the box.
I'll provide a test repro below, but for a real world example; in my setup I tried marking file.managed written to /etc/nginx/sites-enabled/* with
parallel:true
; for the renders I'm working with, that's 500+ files being written. Which salt then tried to write all at once, beating the hell out of my dev system in the process.This ticket likely relates to #38746 and/or the process_count_max setting in 2018.8.x: https://docs.saltstack.com/en/latest/ref/configuration/minion.html#process-count-max ; that said, I've not found any reference in the state code that uses that value, so I'm guessing it wasn't wired.
Setup + Steps to Reproduce Issue
consider the following bit of test code to run 200 sleeps, in parallel.
Now either we can scrape from the logs how many it started in parallel, or we can just do a simple ps grep; point is, we see 200 running in parallel.
Versions Report
Tested for 2017.7.2 and 2018.8.3; from what I know of the code,
The text was updated successfully, but these errors were encountered: