Skip to content

[clusterd] lsof takes ages and runs into timeout when proc are heavily using threads #82

Closed
wwwutz opened this issue Apr 11, 2019 · 1 comment

Comments

@wwwutz
Copy link
Contributor

wwwutz commented Apr 11, 2019

Not really a clusterd issue, but since it uses lsof we need some sort of fix.

root:elcattivo:~/# time lsof | wc
2230392 26556082 487947192

real    1m53.222s
user    0m40.470s
sys     1m24.956s

To speed things up suggested fix: add -b -w

       -b       causes lsof to avoid kernel functions that might block - lstat(2), readlink(2), and stat(2).

Since in 99% of all cases we are only looking for open filenames, this might speed up a lot.

root:elcattivo:~/# time lsof -b -w | wc
2190884 20053174 341239540

real    0m33.197s
user    0m21.109s
sys     0m16.948s
wwwutz added a commit that referenced this issue Apr 12, 2019
@donald
Copy link
Collaborator

donald commented Oct 1, 2019

Fixed by #83

@donald donald closed this as completed Oct 1, 2019
Sign in to join this conversation on GitHub.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants