Hi all,
Has anyone got any tips for decreasing boot time? I've done the usual things, such as disable (what I think are) unnecessary services for a desktop, but are there any other tips?
These are the services I'm disabling, please tell me if you think any of those are a stupid choice: capi, iscsi, iscsid, isdn, netfs, network, nfs, nfslock, pcscd, rpcbind, rpcgssd, rpcidmapd, rpcsvcgssd, sendmail
There used to be a cheat's way of allowing an early login, I think it was gdm-early-login, but it doesn't seem to exist any more (and that's probably a bad idea anyway).
Cheers, -c
Chris Smart wrote:
Hi all,
Has anyone got any tips for decreasing boot time? I've done the usual things, such as disable (what I think are) unnecessary services for a desktop, but are there any other tips?
These are the services I'm disabling, please tell me if you think any of those are a stupid choice: capi, iscsi, iscsid, isdn, netfs, network, nfs, nfslock, pcscd, rpcbind, rpcgssd, rpcidmapd, rpcsvcgssd, sendmail
There used to be a cheat's way of allowing an early login, I think it was gdm-early-login, but it doesn't seem to exist any more (and that's probably a bad idea anyway).
What are you doing which is taking time? You can put a tool like btime in rc.local to show what the system did during boot, in terms of cpu use and iowait. Are you mounting filesystems which could be mounted after the login prompt is up? Are you doing network operations which could wait? Is your system assembling a bunch of software raid arrays?
Do some probing to see if you are doing work which could wait, or if your hardware is just not up to the load. Have you tuned your readahead? Tried the 'fastboot' option on the kernel command line?
Finally, how often do you boot? How long does your boot take now? How much effort is justified in making that faster?
On Sun, Mar 6, 2011 at 12:23 PM, Bill Davidsen davidsen@tmr.com wrote:
What are you doing which is taking time? You can put a tool like btime in rc.local to show what the system did during boot, in terms of cpu use and iowait. Are you mounting filesystems which could be mounted after the login prompt is up? Are you doing network operations which could wait? Is your system assembling a bunch of software raid arrays?
I think it's generally fast enough, I was just wondering if there are other tricks. I have played with bootchart to see what's happening - mostly it seems to be limited by I/O, so maybe time for a new faster drive.
Do some probing to see if you are doing work which could wait, or if your hardware is just not up to the load. Have you tuned your readahead? Tried the 'fastboot' option on the kernel command line?
Didn't know about fastboot, thanks and is there a way to reset readahead, so that it starts again? Over time one adds and removed services, so that might be worthwhile.
Finally, how often do you boot? How long does your boot take now? How much effort is justified in making that faster?
Probably not justified much, but I do turn my machine off every day.
Thanks for your suggestions.
-c
On Sat, Mar 5, 2011 at 5:23 PM, Bill Davidsen davidsen@tmr.com wrote:
What are you doing which is taking time? You can put a tool like btime in rc.local to show what the system did during boot, in terms of cpu use and iowait.
I don't know about btime but I have used bootchart before. It generates amazingly detailed charts for the entire boot process. All you need to do is put init=/sbin/bootchartd in the kernel line and once you have booted run 'bootchart <outputfile>' to get the chart.
On Sun, Mar 6, 2011 at 6:21 PM, suvayu ali fatkasuvayu+linux@gmail.com wrote:
I don't know about btime but I have used bootchart before. It generates amazingly detailed charts for the entire boot process. All you need to do is put init=/sbin/bootchartd in the kernel line and once you have booted run 'bootchart <outputfile>' to get the chart.
Yep, I've been playing with that, along with my own timing. The "fastboot" option didn't make a second of difference :-)
I think turning off the services I don't need has been the most beneficial.
-c
suvayu ali wrote:
On Sat, Mar 5, 2011 at 5:23 PM, Bill Davidsendavidsen@tmr.com wrote:
What are you doing which is taking time? You can put a tool like btime in rc.local to show what the system did during boot, in terms of cpu use and iowait.
I don't know about btime but I have used bootchart before. It generates amazingly detailed charts for the entire boot process. All you need to do is put init=/sbin/bootchartd in the kernel line and once you have booted run 'bootchart<outputfile>' to get the chart.
btime is purely a summary, just to let you see (a) if you are io bound (most cases) and if multiple cores are being utilized.
Example: partygirl.tmr.com 2.6.27.25-78.2.56.fc9.i686 GNU/Linux Mon Jan 24 17:54:59 EST 2011 Time to boot 35 sec CPU used 36.09 sec user 17.50 nice 0.00 system 18.21 int proc 0.38 iowait 9.30 CPU(s) 2 Load avg 1.031 partygirl.tmr.com 2.6.27.25-78.2.56.fc9.i686 GNU/Linux Mon Mar 7 13:15:47 EST 2011 Time to boot 46 sec CPU used 32.32 sec user 12.81 nice 0.00 system 19.15 int proc 0.36 iowait 21.21 CPU(s) 2 Load avg 0.703
The "load average" is just the ratio of cpu/real time, just a broad indication of where the cpu is going.
On 03/05/2011 11:22 PM, Chris Smart wrote:
Has anyone got any tips for decreasing boot time?
run "lsmod" to see all the modules loaded, many of which you do not need because fedora, like most all linux distribs is written to be 'universal'. that is 'one shoe fits all'.
in so doing, there are many modules loaded that you do not need.
use "modprobe" to remove what you do not need.
see "man lsmod" and "man modprobe", or "info lsmod" and "info modprobe".
also, you can rebuild kernel with what you need to help speed up boot.
hth.
On Sun, Mar 6, 2011 at 2:57 PM, g geleem@bellsouth.net wrote:
run "lsmod" to see all the modules loaded, many of which you do not need because fedora, like most all linux distribs is written to be 'universal'. that is 'one shoe fits all'.
in so doing, there are many modules loaded that you do not need.
True, but I would have thought with udev these days, I should only have modules that my system detects hardware for. Although, I'm sure there are some I could take out.
also, you can rebuild kernel with what you need to help speed up boot.
I wasn't going to bother going to the extreme of building and maintaining my own kernel, but thanks for the suggestion! :-)
-c
On 03/06/2011 07:18 AM, Chris Smart wrote:
On Sun, Mar 6, 2011 at 2:57 PM, g geleem@bellsouth.net wrote:
run "lsmod" to see all the modules loaded,
<>
in so doing, there are many modules loaded that you do not need.
True, but I would have thought with udev these days, I should only have modules that my system detects hardware for. Although, I'm sure there are some I could take out.
run "lsmod". you will be surprised at what is loaded that you do not need.
I wasn't going to bother going to the extreme of building and maintaining my own kernel, but thanks for the suggestion! :-)
you do not have to rebuild kernel. it is just one more way to speed things up.
you are welcome.
On 03/06/2011 12:22 AM, Chris Smart wrote:
Hi all,
Has anyone got any tips for decreasing boot time? I've done the usual things, such as disable (what I think are) unnecessary services for a desktop, but are there any other tips?
In addition to all the suggestions you already got, I'd add a non-software one: replace the HDD with a SSD. It has an amazing impact on the daemon starting phase.
On Sun, Mar 6, 2011 at 9:38 PM, Roberto Ragusa mail@robertoragusa.it wrote:
In addition to all the suggestions you already got, I'd add a non-software one: replace the HDD with a SSD. It has an amazing impact on the daemon starting phase.
True, thanks.
-c