-
Notifications
You must be signed in to change notification settings - Fork 712
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
Probe is using 40% cpu #284
Comments
I think the cpu usage stems from walking the proc tree 3 times - once for procspy, onces for process topology, and once for docker tagger. |
70% of our CPU activity is syscalls (read, listdir, stat etc) We could reduce this by two thirds if we walk the proc tree once, gathering the required info, then let prospy, process reporter and docker tag loose on it. process reported + docker tagger are easy, so I'll start with them |
Next step: make procspy use the cached process walk. Will need to extend the process work to read fds & /proc//net/tcp entries. |
@tomwilkie what do you mean when you say "make procspy use the cached process walk"? you mean to move the code from #287 to procspy? |
It would need extending too; procspy reads more files than the existing proc walker. I would probably move the bits of procspy we use into the scope codebase (as opposed to moving this out into procspy); this would introduce a lot of coupling. |
Do you mean that we should drop scope's dependency on procspy altogether? |
By moving the bits of procspy we use into scope; yes. |
Ok, I'll take a look at this... |
Have a quick chat with @peterbourgon before you start. Also, try and get your other outstanding PRs finished first; we don't like too many outstanding. |
Sure, I'll discuss the details with @peterbourgon. I'll try to finish #404 first, but I usually try to have several tasks in the pipeline so I never run out of work... |
Seems like cpu usage has gone high again. Need to do some more profiling. |
@tomwilkie #450 reduces the number of syscalls by avoiding many Note: I'm using go 1.5 |
The text was updated successfully, but these errors were encountered: