[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Faster shutdown and the ubuntu "multiuser" update-rc.d extention

Felipe Sateler <fsateler@gmail.com> writes:

> Petter Reinholdtsen wrote:
>> Did you ever curse that Debian took so long to shut down, waiting for
>> all the shutdown scripts to complete before the machine was ready to
>> move?  Here is a simple recipe to help making sure your package do not
>> slow down the shutdown.
>> Most of the init.d scripts are simple scripts that during shutdown
>> kill the process they started during boot.  But the default halt
>> (0) and reboot (6) shutdown sequences will kill all processes on
>> their own (in the sendsigs script), so there is normally no need
>> for individual packages and init.d scripts to run at shutdown if
>> all they need to do is to kill a daemon.  There might be
>> exceptions, for example if the daemons need to stop in a given
>> order, but that do not seem to be the case for most packages.
> Are the five seconds that sendsigs waits between TERM and KILL
> enough to cleanly shutdown *all* running services at the same time?

On a heavily loaded or slow system, I suspect it would be highly
likely some would get SIGKILL before they could shut down properly.
I can't say I'm a big fan of the proposal for this reason.

With a better init, like upstart, or a dependency-based init, there's
no reason why scripts can't be run in parallel.  But, simply sending
everything a TERM and KILL doesn't seem do be very clean in my


  .''`.  Roger Leigh
 : :' :  Debian GNU/Linux             http://people.debian.org/~rleigh/
 `. `'   Printing on GNU/Linux?       http://gutenprint.sourceforge.net/
   `-    GPG Public Key: 0x25BFB848   Please GPG sign your mail.

Attachment: pgpBrd9IbwnIc.pgp
Description: PGP signature

Reply to: