[libvirt] [PATCH 0/3] Optimize mass closing of FDs on child spwaning
Michal Privoznik
mprivozn at redhat.com
Wed Jul 3 07:19:17 UTC 2019
If the limit for max opened files is way bigger than the default (1024),
say 3 orders bigger then spawning a child through virCommand can be
expensive because we iterate over ALL FDs within the limit and close
them. There's no need to that since we can learn the list of opened FDs
from /proc/self/fd/.
Michal Prívozník (3):
virNetDevOpenvswitchInterfaceStats: Optimize for speed
vircommand: Separate mass FD closing into a function
virCommand: use procfs to learn opened FDs
src/util/vircommand.c | 114 +++++++++++++++++++++++++++-----
src/util/virnetdevopenvswitch.c | 111 ++++++++++++++++++++-----------
2 files changed, 170 insertions(+), 55 deletions(-)
--
2.21.0
More information about the libvir-list
mailing list