PDA

View Full Version : [ubuntu] [SOLVED] Speed up your boot time upto 2X ! concurrency=shell works in Intrepid!



prshah
November 19th, 2008, 05:47 PM
Summary:

Edit your /etc/init.d/rc file (with "sudo")
gksudo gedit /etc/init.d/rc, and change the value
CONCURRENCY=none to value
CONCURRENCY=shell, then reboot. Notice the faster bootup time.

This did work in earlier versions of Ubuntu, but broke with HAL in Gutsy. There was a workaround, (which is also applicable to Hardy) but it's not required in Intrepid!

My bootup time reduced from over 70s to under 35s ! I'm attaching bootchart files to illustrate.

CAVEATS:

a. At your own risk, please
b. Your mileage may vary

tgpraveen
November 19th, 2008, 06:43 PM
could u also shed some light on what the change actuaaly means? is it completely safe? dont wanan wreck my sys.

others pls share ur results.

king_lear
November 19th, 2008, 07:41 PM
Only a moderate increase in speed in my system
No damages though

prshah
November 19th, 2008, 08:20 PM
could u also shed some light on what the change actuaaly means? is it completely safe? dont wanan wreck my sys.


concurrency=shell allows certain startup scripts to be executed simultaneously, rather than serially (ie, waiting for scripts to be completed in order).

It didn't work in Gutsy or Hardy since there was a specific issue of a conflict in the load order of dbus and HAL; however there was an easy fix which simply ensured that HAL loaded _after_ dbus.

In Intrepid though, that fix doesn't seem to be required. Just making this change in the /etc/init.d/rc file is enough.

IMPORTANT NOTE: This will only speed up the _boot process_ (When the loading bar (usplash) is active). It should not have any effect on the actual performance of the system. If you feel your entire system is faster then it's probably psychological.

If you run into problems, changing "concurrency" back to "none" should clear it up (you may need the "recovery shell" option in GRUB).

Also, apparently those with multiple processors will benefit most. (Eg, Core 2 Duo, etc)

rbolio
November 19th, 2008, 10:54 PM
well, boot chart claims timing was the same (35 sec) [with auto loggin enabled...]
but i did see boot up bar go faster... so

Thanks!

prshah
November 20th, 2008, 04:36 AM
well, boot chart claims timing was the same (35 sec) [with auto loggin enabled...]
but i did see boot up bar go faster... so


The bootchart time (near the upper left corner) also shows me only about 1 sec improvement; but the chart's timeline itself shows over 35s improvement. So I'm guessing that the time mentioned is something else; possibly the time _before_ the chart starts.

btw, the boot process ends with the splash screen; so auto-login enabled or not makes no difference in the boot up time (will not show up in bootchart).

der_joachim
November 20th, 2008, 11:52 AM
Please note that this tweak will only work if you have a multicore processor, or multiple processors. Somewhere in the EEE forums I read that for single core single processor machines this tweak will not work or even slow down the system.

Good that the HAL bug is finally squashed. :)

tgpraveen
November 20th, 2008, 01:19 PM
ok so not of much use for me on pentium 4. :-(

snowpine
November 20th, 2008, 03:57 PM
It did not appear to speed up the boot on my atom-based eee pc.

Shwefty
November 20th, 2008, 04:22 PM
Thanks for the tip! I have a Centrino Duo in my laptop, but with changing the script my boot time increases from 77 seconds with "none" to 83 seconds with "shell". :( That's measuring from hitting <Enter> in Grub to seeing my Wireless Network needs access to keyring prompt. Auto-login.

So, double check your boot-times before and after you do this to see if it helps you! (which just because it didn't for me doesn't me it won't help you)

thierrybo
November 22nd, 2008, 12:25 AM
:( I have Intel Core 2 Duo E8400 and Intrepid 64 bit and I only decreased my boot time by 1 second; from 40 to 39s. I have automatic login and i count from grub to the display of two gnome task bars.

Well, just intalled bootchart : 25s to 23 seconds. We are far away from 2X

thierrybo
November 22nd, 2008, 01:12 AM
My bootup time reduced from over 70s to under 35s ! I'm attaching bootchart files to illustrate.


prshah, your first bootchat seems strange. The display time in the upper left corner should match the end of the time line to the right, and yours is not. It shows 31 sec and should display ~70 seconds as your timeline.:???:

der_joachim
November 22nd, 2008, 09:51 AM
Thanks for the tip! I have a Centrino Duo in my laptop, but with changing the script my boot time increases from 77 seconds with "none" to 83 seconds with "shell". :( That's measuring from hitting <Enter> in Grub to seeing my Wireless Network needs access to keyring prompt. Auto-login.

I do not think that the wireless network measurement is a good one. For some reason my wireless network (using network manager) needs anywhere between 1 second and a few minutes to automagically start connecting to my home wlan. For a more objective measurement, check your bootchart.

There is another way to decrease bootup time: profiling. See http://ubuntuforums.org/showthread.php?t=254263&highlight=profile+boot . As with the tweak described above: use at your own risk.

habtool
November 22nd, 2008, 11:47 AM
If you using the new 'private' folder that is encrypted, this may not mount at boot.
(If you use concurrency=shell)

You can mount it manually of course.

Just a heads up incase someone 'looses' there private folder with email etc in it and then panics ;)

CandyKiller
November 23rd, 2008, 05:44 PM
Could someone please explain to me how you track your boot time? I'd like to see my results with the 'none' and 'shell'

tgpraveen
November 23rd, 2008, 06:04 PM
use a stopwatch maybe ur mobiel has one or just use a clock man.

amaroKer
November 23rd, 2008, 07:34 PM
Sweet. Accelerated from ~35 to 28 seconds. Nice tip.

al_capone
January 25th, 2009, 08:37 PM
hi
my boot time went down from 54 to 45 secs with this tweak. However this is timed with a stopwatch and measured from hitting enter in grub. I have a Core 2 Duo Prosecor 1.86 Ghz in a Dell Vostro.

Copitox
January 25th, 2009, 10:48 PM
How can your computers boot on 35 seconds! i'm dual booting Windows Seven and Ubuntu. Windows seven takes like 40 seconds from grub to a usable desktop and this are my Ubuntu times:


Shell= 74 seconds

None= 1:17 (33 boot bar filling) (44 from the filled bar to a usable desktop)

I'm using a Turion 64x2 with 2G ram... could you PLEASE help to get a decent boot time?

thierrybo
January 25th, 2009, 11:28 PM
Don't know with windows 7 (Vista ?), but with my XP SP1 optimized for performance and no firewall / anti-virus, I boot exactly in 40 seconds from grub to a usable desktop, so exactly the same time as Ubuntu (see my post above), also optimized for performances.

Jakey_TheSnake
January 31st, 2009, 07:43 PM
It did not appear to speed up the boot on my atom-based eee pc.

http://lwn.net/Articles/299483/

EEE pc boot in 5 seconds.


It sped up my boot from 50 seconds to 40 seconds, meh.

mister_p_1998
February 2nd, 2009, 12:09 PM
So is it worth upgrading my P4 3ghz to a dual-core, power wise?
Will I see a power improvement? I know Its more energy efficient, but if its no faster, I wont bother...

Steve

halovivek
February 2nd, 2009, 02:10 PM
will it increase the boot up speed for 64-bit ubuntu 8.10.
after this whether i will not get any problem with another programs?

thierrybo
February 2nd, 2009, 06:56 PM
Well,

from all the post except the thread starter, you will gain from 2 sec (me), to 9 seconds.

mr-biggles
May 18th, 2009, 03:48 PM
My Acer Aspire One with this hack and others now has a boot time of 15.92 seconds (Y)

udippel
May 18th, 2009, 04:29 PM
Would you care the share the others??
When do you start measuring, btw,. and when do you stop?

hojthojt
May 18th, 2009, 08:36 PM
Hi,
tried this tip it on my tx1151ea with an AMD Turion 64 X2 TL-60 running Ubuntu 9.04. No measurable difference. I have 50 sec from grub to the graphical login prompt.

regards
HojtHojt

shreepads
October 8th, 2009, 07:26 PM
No appreciable difference here after setting concurrency=shell...

Same timings as below before and after
- 31 s from hitting enter in grub list to sign-in prompt
- 20 s from hitting enter after entering login/ password to complete desktop display

Hmm time to run profile/ bootchart?

Details:
Ubuntu 8.04 Hardy Desktop, kernel 2.6.24-24-generic
Intel Core2Duo E7200 on Intel DG33FB motherboard, 2 GB RAM
3 NTFS, 2 ext3, 1 swap partition on single 3gbps SATA drive
ADSL+ modem connected (via LAN) at startup

RJARRRPCGP
October 25th, 2009, 11:56 PM
Looks like an invalid argument and thus ignored. Sorry. :(

(That's why no better boot time)

NoBugs!
January 26th, 2011, 11:20 PM
Wow, this cut down boot time from almost 2 minutes to about 1 minute, on Ubuntu 10.04... but I thought this type of boot optimization was enabled by default?

khamil8686
January 26th, 2011, 11:53 PM
this sped up my system boot from 70sec to 40sec, i just wonder if theres any way to protect against startup program dependencies, like if one program requires another to run, is there any way of making sure that the first program starts up first before running the second? like if i add start up programs in the future

i have an AMD Phenom II X4 940 processor and 4GB of ddr2 ram
Kubuntu 10.10 Maverick Meerkat