commit b0aee5f006031ec0a9ac938b035615d5b8b92ddf
Author: Denis V. Meltsaykin <email address hidden>
Date: Mon Nov 9 17:15:17 2015 +0300
Speedup gathering pids from namespaces by OCF
Currently, neutron OCF scripts are using `lsof` to gather pids of
processes running in particular namespace. `lsof` is extremely slow
due to inoptimal architecture and causes significant timeouts:
2+ minutes on 300 pids in 300 namespaces. On the other hand,
we cannot use `ip netns pids`, as this command is not present in
precise. The fix changes this call to the 2-stage execution inspired
by the original code of `ip netns pids`, which uses comparison of
the namespace inode with the `ns/net` symlink of the running
process that points to the required namespace. This scales about
linear: 1.7 seconds per 300 pids in 300 namespaces.
Reviewed: https:/ /review. openstack. org/243135 /git.openstack. org/cgit/ openstack/ fuel-library/ commit/ ?id=b0aee5f0060 31ec0a9ac938b03 5615d5b8b92ddf
Committed: https:/
Submitter: Jenkins
Branch: stable/6.0
commit b0aee5f006031ec 0a9ac938b035615 d5b8b92ddf
Author: Denis V. Meltsaykin <email address hidden>
Date: Mon Nov 9 17:15:17 2015 +0300
Speedup gathering pids from namespaces by OCF
Currently, neutron OCF scripts are using `lsof` to gather pids of
processes running in particular namespace. `lsof` is extremely slow
due to inoptimal architecture and causes significant timeouts:
2+ minutes on 300 pids in 300 namespaces. On the other hand,
we cannot use `ip netns pids`, as this command is not present in
precise. The fix changes this call to the 2-stage execution inspired
by the original code of `ip netns pids`, which uses comparison of
the namespace inode with the `ns/net` symlink of the running
process that points to the required namespace. This scales about
linear: 1.7 seconds per 300 pids in 300 namespaces.
Closes-Bug: #1464815
Closes-Bug: #1405477
Change-Id: Ife3f5da3558bf4 b5ddd0abbe997cd 4b845a8d53c