Bug 596451 - Improve performance on service stop
Summary: Improve performance on service stop
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: initscripts (Show other bugs)
(Show other bugs)
Version: 14
Hardware: All Linux
low
medium
Target Milestone: ---
Assignee: Bill Nottingham
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-05-26 19:00 UTC by Gustavo Junior Alves
Modified: 2014-03-17 03:23 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2011-02-28 21:35:06 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

Description Gustavo Junior Alves 2010-05-26 19:00:11 UTC
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 11:43:14 UTC
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 21:35:06 UTC
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.