Bug 1268384 - virsh iface-list --all takes a very long time to complete on host with large number of interfaces
Summary: virsh iface-list --all takes a very long time to complete on host with large ...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: netcf
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Laine Stump
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-10-02 18:19 UTC by Laine Stump
Modified: 2015-12-30 20:49 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of: 1268382
Environment:
Last Closed: 2015-12-30 20:49:25 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Laine Stump 2015-10-02 18:19:59 UTC
+++ 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>
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 15:20:02 UTC
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 15:22:11 UTC
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 22:52:46 UTC
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 05:52:07 UTC
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 21:54:09 UTC
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-10 00:24:15 UTC
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.