Parse /proc/<pid>/smaps_rollup if present && Reduce string concatenaion operations#11676
Conversation
|
Jenkins results:
|
amaltaro
left a comment
There was a problem hiding this comment.
It looks good to me Todor and I think we should actually deploy this fix in the production agents while we keep considering the psutils approach.
I am going to patch vocms0192 to test this PR.
|
Thanks for the review and test @amaltaro |
|
The 5 production agents running on 2.2.3.1 (RelVal + production) are getting this patch today. |
|
If the job is killed because it exceeds the memory (or time) limit it would be useful to dump as much info as possible in particular |
|
Hi @VinInn There is another PR #11677 (comment) which is supposed to give more detailed and better resource view based on FYI: @amaltaro |
Fixes #11667
Status
ready
Description
The issue #11667 can be solved in 3 different ways. This is the second out of 3 suggested fixes.
/proc/<pid>/smaps_rollupfile if present, (we need a kernel version 4.+ for this), and falls back to parsing/proc/<pid>/smapsfile if the accumulated statistics file is missing.According to the Linux kernel documentation page about
/procfile system:Since this is a direct command execution at runtime, I was able to check the result directly line by line:
Here follows the full test I did manually for this change:
As one can see the so modified
monitorBaseandpssMemoryCommandlines, return exactly the same tuples as output, just like the original code, but are using the accumulated process statistics file instead. I have checked the values returned multiple time - they were the same regardless of which file we use.Is it backward compatible (if not, which system it affects?)
YES
Related PRs
None
External dependencies / deployment changes
No