Bug 66263 - RFE: check_default_route() much too slow
RFE: check_default_route() much too slow
Product: Red Hat Linux
Classification: Retired
Component: initscripts (Show other bugs)
All Linux
low Severity medium
: ---
: ---
Assigned To: Bill Nottingham
Brock Organ
: FutureFeature
: 53530 (view as bug list)
Depends On:
  Show dependency treegraph
Reported: 2002-06-06 17:30 EDT by Dan Hollis
Modified: 2014-03-16 22:27 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2002-06-12 03:13:07 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Dan Hollis 2002-06-06 17:30:31 EDT
Description of Problem:
The check_default_route() in /etc/sysconfig/network-scripts/network-functions is too slow.

It takes the output of 'ip route' and greps it for default route:

check_default_route ()
   LC_ALL=C ip route | grep -q default

Instead it should be:

check_default_route ()
  LC_ALL=C ip route list match 0/0 | grep -q default

By using 'list match' to find a default route, the function runs about 20-50 times faster.

This is important on boxes with many hundreds of thousands of bgp routes.
find_gateway_dev () can probably be optimized in similar fashion.

Version-Release number of selected component (if applicable):

How Reproducible:
Every time

Steps to Reproduce:
1. install <a href="http://www.zebra.org">zebra</a>
2. get a bgp feed of several 100,000's routes
3. ctrl-alt-del to shutdown

Actual Results:
very slow shutdown

Expected Results:
should shutdown much faster

Additional Information:
Comment 1 Florian La Roche 2002-07-16 09:30:32 EDT
I have made this change in the newest initscripts package.


Florian La Roche
Comment 2 Bill Nottingham 2003-10-06 01:34:46 EDT
*** Bug 53530 has been marked as a duplicate of this bug. ***

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