PProf.jl icon indicating copy to clipboard operation
PProf.jl copied to clipboard

Option to exclude idle threads

Open NHDaly opened this issue 4 years ago • 3 comments

Profile currently reports all idle threads sitting in __psynch_cvwait. So the more threads you are using with Julia, the smaller the percentage of the report your actual work will be. For example, this profile was taken on my machine with 6 threads (the default when running in Juno), when i was measuring only single-threaded work:

Screen Shot 2020-03-21 at 11 31 13 AM

NHDaly avatar Mar 21 '20 15:03 NHDaly

We learned after asking on the google/pprof repo (they replied very promptly, which is wonderful! ☺️) that you can enable relative percentages via -relative_percentages, and then paths you ignore in the Web UI (or through -ignore) will not be counted when computing percentages for CPU usage!

https://github.com/google/pprof/issues/516#issuecomment-616162459

What this means for us:

  1. I think we should probably just always set -relative_percentages when spawning the UI, maybe with an option to not do that. But it seems to me like people would basically always want this?
  2. We could consider an option where we automatically filter out nodes like these __psynch_cvwait when opening PProf :)

CC: @cscherrer

NHDaly avatar Apr 19 '20 15:04 NHDaly

I am in favour for doing relative percentages!

vchuravy avatar Apr 19 '20 15:04 vchuravy

:) Cool! I just added a flag and verified that it works! :) Will push up now

NHDaly avatar Apr 19 '20 15:04 NHDaly