You are not logged in.

#1 2011-05-18 10:55:44

shaurz
Member
Registered: 2004-02-02
Posts: 358

Sleep after sending SIGTERM/SIGKILL to all processes

On shutdown, Arch waits 5 seconds after sending SIGTERM to all processes and 1 second after SIGKILL. This adds a mandatory 6 extra seconds to the shutdown time. On my netbook I changed the sleep times in /etc/rc.d/functions to 0.5 seconds and 0.1 seconds with no ill consequence, which made shutdown much faster (useful when you're on the bus and your stop is coming up!)

It would be better if we enumerated all processes we wanted to shut down, and proceed as soon as they have gone. Not only would this make shutdown quicker in most cases, it would also deal more gracefully with applications that take a long time to tear down.

Maybe the sleep times could be configurable somewhere, instead of editing /etc/rc.d/functions.

Offline

#2 2011-05-18 12:13:26

pogeymanz
Member
Registered: 2008-03-11
Posts: 1,020

Re: Sleep after sending SIGTERM/SIGKILL to all processes

That may be a trick, though.

You'd have to constantly check which processes are running and then you still need some threshold where you say "forget it, we wont wait anymore" and SIGKILL it, because sometimes SIGTERM just wont be good enough.

It's a fine balance, but it wouldn't surprise me if it could optimized.

Offline

Board footer

Powered by FluxBB