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 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list