Skip to content

Danpf/track subprocess resources - #2390

Closed
danpf wants to merge 2 commits into
dask:mainfrom
danpf:danpf/track_subprocess_resources
Closed

danpf wants to merge 2 commits into
dask:mainfrom
danpf:danpf/track_subprocess_resources

Conversation

@danpf

@danpf danpf commented Dec 1, 2018 •

Copy link
Copy Markdown
Contributor

I'm not sure of the performance implications of this, but I've been using this to track my resource usage.

fix for #1949

description:
Currently, Dask can only track the worker's cpu usage and memory usage. If you make another process via subprocess that process's resources will not be tracked. This makes us track the resource usage of all process children instead of just the python process.

I'm not sure if this is everything that needs to be changed, but it appears to work for me. I'm guessing this is slightly slower since tests are failing.

danpf added 2 commits December 1, 2018 14:09
Adds check for children processes when tracking resource usage.

Works fine with subprocess.call / Popen
@mrocklin

mrocklin commented Dec 9, 2018

Copy link
Copy Markdown
Member

Hi @danpf ! Sorry for the delay in review. In principle this approach seems sensible to me. I agree though that the larger question of "do we want to do this" is probably worth investigating though. I've found that the system monitor can add a non-trivial baseline cost to the scheduler that would be good to avoid.

@danpf

danpf commented Dec 10, 2018

Copy link
Copy Markdown
Contributor Author

it definitely adds overhead from what I have seen. however, since you have to run cpu_percent at least twice to get a readout. (ie keep a list of children and only update it if necessary), you have to be a little clever about keeping a list of child processes and how you update it.

This isn't a really big deal PR, it's mostly just here for if you're interested.

Base automatically changed from master to main March 8, 2021 19:03
@danpf
danpf requested a review from fjetter as a code owner January 23, 2024 10:57
@danpf danpf closed this Feb 29, 2024
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.

2 participants