Bug 1268384 - virsh iface-list --all takes a very long time to complete on host with large number of interfaces
virsh iface-list --all takes a very long time to complete on host with large ...
Status: CLOSED CURRENTRELEASE
Product: Fedora
Classification: Fedora
Component: netcf (Show other bugs)
rawhide
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Laine Stump
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-10-02 14:19 EDT by Laine Stump
Modified: 2015-12-30 15:49 EST (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 1268382
Environment:
Last Closed: 2015-12-30 15:49:25 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Laine Stump 2015-10-02 14:19:59 EDT
+++ This bug was initially created as a clone of Bug #1268382 +++

netcf calls aug_load() at the start of every public API that uses augeas, and libvirt's iface-list calls netcf-->augeas at least 3 times for each interface. In one test system with ~600 interfaces (300 bridges each attached to a vlan) this results in a runtime for "virsh iface-list --all" of ~22 seconds (it was 28 seconds prior to libvirt code being optimized to eliminate one of the three calls).

This is in spite of the fact that augeas itself isn't actually re-reading the data unless a file has changed - it's merely checking the mtime of every ifcfg-* file, but even that takes a very long time when there are a lot of interfaces.

There is an upstream patch that allows netcf to used cached config data from augeas during a public API call, refreshing the cache at most once per second (assuming a single persistent instance of netcf; if netcf is instead hutdown and re-inited, the entire config tree must be re-read). This lowers the time for virsh iface-list --all on the same test setup down to < 1 second.

Here is the upstream netcf patch that solves the problem:

commit 9b5f4eb57af28a604cd7ac8b2c1be9e49f0b517d
Author: Laine Stump <laine@laine.org>
Date:   Mon Sep 28 17:11:11 2015 -0400

    call aug_load() at most once per second
Comment 1 Fedora Update System 2015-10-14 11:20:02 EDT
netcf-0.2.8-3.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2015-96dfd04b66
Comment 2 Fedora Update System 2015-10-14 11:22:11 EDT
netcf-0.2.8-2.fc22 has been submitted as an update to Fedora 22. https://bodhi.fedoraproject.org/updates/FEDORA-2015-86a85c887d
Comment 3 Fedora Update System 2015-10-14 18:52:46 EDT
netcf-0.2.8-3.fc23 has been pushed to the Fedora 23 testing repository. If problems still persist, please make note of it in this bug report.
If you want to test the update, you can install it with
$ su -c 'dnf --enablerepo=updates-testing update netcf'
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2015-96dfd04b66
Comment 4 Fedora Update System 2015-10-15 01:52:07 EDT
netcf-0.2.8-2.fc22 has been pushed to the Fedora 22 testing repository. If problems still persist, please make note of it in this bug report.
If you want to test the update, you can install it with
$ su -c 'dnf --enablerepo=updates-testing update netcf'
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2015-86a85c887d
Comment 5 Fedora Update System 2015-11-09 16:54:09 EST
netcf-0.2.8-3.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.
Comment 6 Fedora Update System 2015-11-09 19:24:15 EST
netcf-0.2.8-2.fc22 has been pushed to the Fedora 22 stable repository. If problems still persist, please make note of it in this bug report.

Note You need to log in before you can comment on or make changes to this bug.