Bug 480687 - Udev helper "rename_device" saturates the system with thousands of devices
Udev helper "rename_device" saturates the system with thousands of devices
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: initscripts (Show other bugs)
rawhide
All Linux
low Severity medium
: ---
: ---
Assigned To: Bill Nottingham
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2009-01-19 15:24 EST by Dan Smith
Modified: 2014-03-16 23:17 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-01-19 16:57:14 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Improve performance with large numbers of interfaces (3.17 KB, patch)
2009-01-19 15:24 EST, Dan Smith
no flags Details | Diff

  None (edit)
Description Dan Smith 2009-01-19 15:24:38 EST
Created attachment 329396 [details]
Improve performance with large numbers of interfaces

Description of problem:
The rename_device helper inefficiently scans sysfs for information about a given network device, which becomes very slow if the system has a large number of network devices (as would be the case on a system with many virtualized guests).  The attached patch improves the performance by streamlining the process of getting interface information.

Using a test of creating 1500 veth pairs (3000 devices total), the attached patch improves performance by 250% and significantly decreases the load on the system during the test.

Tested on Fedora x86_64.

 rename_device.c |   92 +++++++++++---------------------------------------------
 1 file changed, 19 insertions(+), 73 deletions(-)

Version-Release number of selected component (if applicable): The patch was generated and tested with initscripts-8.86.


How reproducible: Always.


Steps to Reproduce:
1. Write a script to generate 1500 veth devices
2. Measure time to run the script before and after the patch
Comment 1 Bill Nottingham 2009-01-19 16:54:15 EST
There's an obvious bug/typo in your new asprintf call, but looks good otherwise. Added.
Comment 2 Bill Nottingham 2009-01-19 16:57:14 EST
http://git.fedorahosted.org/git/?p=initscripts.git;a=commitdiff;h=eb1d89063ed017db9deed6fe7ed9e0beef77eb6b

Will get to rawhide at some point.

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