Change in vdsm[master]: netinfo: optimize ipaddr retrieval

danken at redhat.com danken at redhat.com
Mon Feb 17 12:49:35 UTC 2014


Dan Kenigsberg has submitted this change and it was merged.

Change subject: netinfo: optimize ipaddr retrieval
......................................................................


netinfo: optimize ipaddr retrieval

We used to retrieve IP address information for each device when
getting capabilities or in general doing netinfo.get. This in turn
was calling python ethtool that was doing:
One netlink roundtrip to get the etherinfo object. One round trip
for ipv4 and one for ipv6.

For 200 bridged, vlanned, bonded (with 2 nics) networks this meant:
200bridges + 200vlans + 1 bond + 2 nics = 403 devices
+
200 networks
= 603 calls to getIpInfo for 0.7867s

This patch changes the implementation so that we use netlink to
retrieve all the ipaddrs and then we match them to the devices
we have, saving most of the work.

= 603 calls to getIpInfo for 0.009371s + 0.03327s spent on
vdsm.netlink (from netinfo.get)

It's one of the patches destined to fix the bug below.

Bug-Url: https://bugzilla.redhat.com/1053114
Change-Id: I571529f6dd379ffb317625fd9e2abd6b5ae88696
Signed-off-by: Antoni S. Puimedon <asegurap at redhat.com>
Reviewed-on: http://gerrit.ovirt.org/23518
Reviewed-by: Francesco Romani <fromani at redhat.com>
Reviewed-by: Dan Kenigsberg <danken at redhat.com>
---
M lib/vdsm/netinfo.py
M lib/vdsm/netlink.py
2 files changed, 105 insertions(+), 32 deletions(-)

Approvals:
  Antoni Segura Puimedon: Verified
  Dan Kenigsberg: Looks good to me, approved
  Francesco Romani: Looks good to me, but someone else must approve



-- 
To view, visit http://gerrit.ovirt.org/23518
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I571529f6dd379ffb317625fd9e2abd6b5ae88696
Gerrit-PatchSet: 6
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Antoni Segura Puimedon <asegurap at redhat.com>
Gerrit-Reviewer: Antoni Segura Puimedon <asegurap at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Francesco Romani <fromani at redhat.com>
Gerrit-Reviewer: Nir Soffer <nsoffer at redhat.com>
Gerrit-Reviewer: Ondřej Svoboda <osvoboda at redhat.com>


More information about the vdsm-patches mailing list