Ubuntu QA:
BlogBrainstormPackage status
Log in
Ubuntu QA
The Ubuntu community has contributed 17459 ideas, 107690 comments, 2263278 votes
Idea sandbox Idea sandbox
Popular ideas Popular ideas
Ideas in development Ideas in development
Implemented ideas Implemented ideas
Idea #21170: optimize shutdown time

Written by cyberix the 24 Aug 09 at 12:05. Category: Quality. Related project: Nothing/Others. Status: New
Rationale
While Ubuntu shutdown time isn't typically very long, the time may still matter when one needs to turn her laptop off to catch a bus, or reboot a system with strict availability requirements.
Tags: (none)

368
votes
up equal down
Solution #1: define a shutdown speed goal
Written by cyberix the 24 Aug 09 at 12:05.
Define speed targets for shutdown in future releases. Ubuntu already defines such speed targets for going up, in a blueprint called foundations-karmic-bootspeed-targets. The work should be extended to cover the whole on/off experience.
342
votes
up equal down
Solution #2: Define goals for sleep, hibernate
Written by Otus the 24 Aug 09 at 15:56.
Possibly even more important for laptop use scenarios are speeds to and from sleep and hibernate states. Also define targets for these as appropriate.
181
votes
up equal down
Solution #3: Work on Multi-Threaded Startup
Written by Penguin Guy the 31 Aug 09 at 10:56.
99% of the time, startup speed matters more than shutdown speed. At the moment using a multi-threaded startup is dodgy because some programs need to be loaded before others - create a program to manage this.

This will mean that if you have a dual core you will be able to boot twice as fast, if you have a quad core you will be able to boot four times as fast, etc. I believe a program that does this is already in development, but couldn't find it's name. If so; continue work on that.
-89
votes
up equal down
Solution #4: Offer a "quick shutdown" option
Written by Aielyn the 8 Sep 09 at 11:31.
NOTE: As I suspect that people are voting my solution down because they think I'm suggesting it as a replacement, rather than merely an option, I've removed the phrasing that implied it.
---

Have a special "optimised" shutdown option that does only what is absolutely necessary for the shutdown. This would include things like only checking to make sure that disc writing isn't happening while shutting down, rather than waiting for various processes to end.

Perhaps processes could also be tagged to indicate whether they must be ended properly or can be allowed to remain running until powerdown - that way, the system knows immediately if such processes need to be shut down properly.

And regarding Solution #2, the same logic could be applied, except that there would also be tags indicating which processes can be halted and then restarted at wake, and which need to be properly suspended/hibernated.

This should stop situations where the system is kept waiting while a particular process or application is trying unsuccessfully to end, without requiring user input for each instance of such a problem process.

Propose your solution

Attachments
No attachments.


Duplicates


Comments
yzarc wrote on the 24 Aug 09 at 17:31
shutdown time is not a big deal, since it's within a ranger of few seconds. what a mean is if it takes too long, it's a problem but spend dev resources to push shutdown time from 7 to 4 seconds doesn't worth. my opinion. :)
-1 solution 1.
+1 solution 2.

cyberix wrote on the 24 Aug 09 at 18:39
I think shutdown speed is important because it defines how fast the user can "get rid" of Ubuntu. If it is not too hard, then the user might use Ubuntu another time as well. :-)

I agree with sleep/hibernate, but they don't work on my system anyway, so I haven't considered them.

cos wrote on the 24 Aug 09 at 18:44
Hibernation is a classic linux problem. If you go to the "most popular ideas ever" page, you'll find it there.

It works on my laptop, but it takes bloody ages.

coolen wrote on the 24 Aug 09 at 22:40
I think the shutdown speed is already good. Unless there's something wrong with the system, it takes a matter of seconds.

I mean, really, if ~10 seconds is going to make you later for your bus, perhaps you need to organise your time better. Any number of intervening events could delay you far more than that.

So, while I don't think it's necessarily a bad idea, I put down a don't care for solution #1, +1 for solution #2.

ikajaste wrote on the 25 Aug 09 at 07:48
It's a good idea to define a speed target for shutdown - however I believe the current shutdown speed would meet that target.

Suspend/hibernation speed is a lot more important that shutdown speed, because those are much more likely to be used in a hurry. (That is, if the user actually happens to be in the priviliged few that are even able to use such a strange and esoteric feature as a *gasp* suspend for a laptop! Sorry for the rant, but all this suspend/hibernate stuff really, really needs to be fixed...)

cos wrote on the 25 Aug 09 at 11:13
I remember reading that Linus and his boys made some good progress with that in a recent version of the kernel, but I can't find where I read it, or what version of the kernel.

Anyone here have any idea?

cyberix wrote on the 29 Aug 09 at 00:09
As some of you might know, Apple just published their Snow Leopard operating system. The release notes state: "shutting down is up to 80 percent faster, saving precious moments when you’re trying to head home or to the airport."

http://www.apple.com/macosx/refinements/

Does anyone have an idea about how fast it was, or is?

Penguin Guy wrote on the 31 Aug 09 at 10:59
I don't see why shutdown time matters at all. I usually press the button and just walk off - you don't have to watch it.

kidmodify wrote on the 31 Aug 09 at 21:09
The only time your shutdown time would greatly matter is when you have to restart.
Restart = Boot time + shutdown time

kidmodify wrote on the 31 Aug 09 at 21:11
Would a multi-threaded shutdown work?

cyberix wrote on the 31 Aug 09 at 23:27
Hibernation/Suspend doesn't work. So when I'm running to catch a bus, I shutdown my laptop. Sometimes it fails to shutdown. Once it used all the battery life and was extremely hot after running inside my bag. Thus I usually wait for it to shutdown before putting it into my bag. Sometimes I feel I cannot wait and simply do a hard power off.

Now, I realize this is because of multiple bugs. Fixing them would remove my problem. How ever, I do not expect all of them to get fixed any day soon. While waiting for someone to fix the core issues, a reliable and fast shutdown would serve me rather well.

cos wrote on the 3 Sep 09 at 11:13
Startup is already quite fast. I'm sure it can be faster, but hibernation is far behind at the moment.

I would recommend this prioritisation of tasks:
1) Fix hibernation problems to a reasonable extent (I'm certain some progress has been made on this kernel-side; unsure about the version)
2) Make hibernation fast
3) Make boot faster, multi-threaded boot
4) Make shutdown faster

I think at this point in time, it would be greatly beneficial to add a tux-on-ice patched kernel to the repos, in case it improves the situation for some people.

twright wrote on the 4 Sep 09 at 22:54
If shutdown takes more then 2-5 seconds on a laptop it feels sluggish and some *ignorant* users will just hard poweroff all the time. Whist with ext4 hard poweroffs will usually not destroy data, they can still damage hardware and feeling sluggish damages reputation so I think that a small bit of effort to improve this would help a lot.

korin43 wrote on the 5 Sep 09 at 01:20
I've always found that Ubuntu shuts down unnaturally fast (at least compared to Windows). It could be that the submitter has programs that aren't shutting down as quickly as they should be, and that should definitely be worked on..

cyberix wrote on the 9 Sep 09 at 20:17
The folklore says Windows secures swap space by trashing it with random at shutdown and Ubuntu doesn't. I might be wrong. I'd assume that Ubuntu users with high security requirements would either not use swap at all, or manually configure their system to use a swap file from within an encrypted file-system.


Post your comment