Bug 596451 - Improve performance on service stop
Improve performance on service stop
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: initscripts (Show other bugs)
14
All Linux
low Severity medium
: ---
: ---
Assigned To: Bill Nottingham
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2010-05-26 15:00 EDT by Gustavo Junior Alves
Modified: 2014-03-16 23:23 EDT (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2011-02-28 16:35:06 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)

  None (edit)
Description Gustavo Junior Alves 2010-05-26 15:00:11 EDT
With a little change in /etc/init.d/functions its possible to improve the shutdown time in about 100ms per service. Can represent more than 1 second in total shutdown time. Just change the usleep from line 308 from 100000 to 1000.

Some lines below, after kill statement, it is possible to reduce by half the waiting after kill, to 50ms. I'm not sure if can be even lower, maybe to just 1ms.

if checkpid $pid 2>&1; then
    # TERM first, then KILL if not dead
    kill -TERM $pid >/dev/null 2>&1
    usleep 1000
    if checkpid $pid && usleep 100000 &&
       checkpid $pid && sleep 1 &&
       checkpid $pid && sleep $delay &&
       checkpid $pid ; then
         kill -KILL $pid >/dev/null 2>&1
         usleep 50000
    fi
fi
Comment 1 Bug Zapper 2010-07-30 07:43:14 EDT
This bug appears to have been reported against 'rawhide' during the Fedora 14 development cycle.
Changing version to '14'.

More information and reason for this action is here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping
Comment 2 Bill Nottingham 2011-02-28 16:35:06 EST
I've tweaked this somewhat in rawhide; we'll see what sort feedback we get.

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