Red Hat Bugzilla – Bug 596451
Improve performance on service stop
Last modified: 2014-03-16 23:23:46 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
if checkpid $pid && usleep 100000 &&
checkpid $pid && sleep 1 &&
checkpid $pid && sleep $delay &&
checkpid $pid ; then
kill -KILL $pid >/dev/null 2>&1
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:
I've tweaked this somewhat in rawhide; we'll see what sort feedback we get.