Optimizing Boot Time

General support questions including new installations

Optimizing Boot Time

Postby curtis1000 » 2010/09/12 08:46:09

On a fast computer, it takes me slightly over 2 minutes to reach the login screen. What I found was that there are 3 things are slowing up the process:


1- There is a message "Reading all Physical Volumes, This might take a while"; This takes about 25 seconds. Is there a way to automaticall skip this?

2- There is a message "Determining IP Information for eth0. This takes about 15 seconds. Is there a way to optimize this?

3- There are many services loaded at the end of the boot process that take up time. How can I get a list of services, determine which are not relevant, and tell Centos not to load them at boot time?


Thank you for your help.
curtis1000
 
Posts: 28
Joined: 2010/08/30 08:05:06

Re: Optimizing Boot Time

Postby scottro » 2010/09/12 10:02:56

For the services, you can use the command


chkconfig --list |grep on

This will also list anything with "on" in its name, but it will show you what services are running at boot. Like Windows, it will start up just about everything installed.

For an idea of what each of these services do, your best bet is to probably go to the mjmwired.net site and look for the Fedora 5 or 6 guides, where the author gives a listing of most of the services with an explanation of what they do.

You can try searching through the RedHat guides too, but their explanations are usually harder to find and pretty bad--this is a made up example for effect, but it will often be along the lines of

avahi. This starts the avahi daemon.

Whereas, the mjmwired guides will actually add a few words saying what the avahi daemon does.
scottro
Forum Moderator
 
Posts: 1715
Joined: 2007/09/03 21:18:09
Location: NYC

Re: Optimizing Boot Time

Postby curtis1000 » 2010/09/12 10:58:56

Thanks. I am running Centos as a Desktop Environment. Basically using Productivity Applications and connecting to via DSL for internet browsing / email. Here is the list of processes that are preloaded. Do you see any obvious ones that don't belong?

acpid
anacron
atd
auditd
autofs
avahi-daemon
avahi-dnsconfd
conman
cpuspeed
crond
cups
firstboot
gpm
haldaemon
hidd
hplip
iptables
irqbalance
isdn
kdump
kudzu
lvm2-monitor
mcstrans
mdmonitor
messagebus
microcode_ctl
netconsole
netfs
network
nfslock
pcscd
portmap
rawdevices
readahead_early
readahead_later
restorecond
rhnsd
rpcgssd
rpcidmapd
sendmail
setroubleshoot
smartd
sshd
syslog
wdaemon
xfs
yum-updatesd
curtis1000
 
Posts: 28
Joined: 2010/08/30 08:05:06

Optimizing Boot Time

Postby pschaff » 2010/09/12 11:02:38

scottro wrote:
chkconfig --list |grep on

Or, as there are a number of services that have "on" in the name which may actually be "off" by default, to get only services that are actually on
Code: Select all
chkconfig --list | grep :on
pschaff
Retired Moderator
 
Posts: 18277
Joined: 2006/12/13 20:15:34
Location: Tidewater, Virginia, North America

Re: Optimizing Boot Time

Postby pschaff » 2010/09/12 11:08:23

curtis1000 wrote:
Do you see any obvious ones that don't belong?
...
rhnsd
...

Hard for anyone else to guess what you do or don't need, as it depends on what you are doing with the system, but AFAIK rhnsd only exists on Red Hat systems, not on CentOS.
pschaff
Retired Moderator
 
Posts: 18277
Joined: 2006/12/13 20:15:34
Location: Tidewater, Virginia, North America

Re: Optimizing Boot Time

Postby curtis1000 » 2010/09/12 11:25:15

Understood.

Any ideas on how I can get the startup routine to skip the time consuming "Reading All Physical Volumes" step?
curtis1000
 
Posts: 28
Joined: 2010/08/30 08:05:06

Re: Optimizing Boot Time

Postby pschaff » 2010/09/12 11:33:23

I believe doing that would be very likely to break your system. Most CentOS systems are not rebooted all that often, so optimizing boot time may rapidly reach a point of diminishing returns. Optimizing services has a much greater payoff as it will help with performance as well as boot time.
pschaff
Retired Moderator
 
Posts: 18277
Joined: 2006/12/13 20:15:34
Location: Tidewater, Virginia, North America

Re: Optimizing Boot Time

Postby AlanBartlett » 2010/09/12 16:55:00

Any ideas on how I can get the startup routine to skip the time consuming "Reading All Physical Volumes" step?

Yes.

Oh, you want me to type some more? ;-)

O.k. -- Your system was installed using LVM, hence all Physical Volumes have to be read at system boot time. To dispense with that step requires you to dispense with the use of LVM. So backup all of your data and then re-install the OS, ensuring that you de-select the use of LVM. Finally restore all of your data.
User avatar
AlanBartlett
Forum Moderator
 
Posts: 8975
Joined: 2007/10/22 11:30:09
Location: ~/Earth/UK/England/Suffolk

Re: Optimizing Boot Time

Postby curtis1000 » 2010/09/12 19:05:37

Yes Alan, I want you to type more :) It helps me become more literate.

Two questions,

-Before I backup my data and reinstall, are there any compelling reasons why I should be using LVM?


-If I look at my startup process, I see that the 2 minutes can be broken down roughly as follows:

1- 50 seconds - LVM
2- 40 seconds - Determining IP info for ETH0 and then setting up and connecting to DSL
3 - 30 seconds - Starting up services, udev, etc.)

Is there anything that can be done to the second item?
curtis1000
 
Posts: 28
Joined: 2010/08/30 08:05:06

Re: Optimizing Boot Time

Postby AlanBartlett » 2010/09/12 19:43:41

are there any compelling reasons why I should be using LVM?

It's really a personal / system requirements decision.

For example, my (static) workstation. As it is a reuse of (refurbished) hardware of over eleven years of age (the "trailing edge" of hardware) and only has PATA (EIDE) disk interfaces both small (physical) disks are "stitched" together by LVM to provide one logical, larger, disk.

On the other hand my laptop, just a few months old with one average sized SATA disk, does not use LVM -- it isn't even installed.

That is just a personal view with a couple of "personal" systems. ;-)

Others will be able to explain the many benefits of LVM when used with a multi-disk server.

40 seconds - Determining IP info for ETH0 and then setting up and connecting to DSL

That seems to be excessive, to me. :-o

My workstation, above, take no more than 5 seconds. It is configured to use a static link between the workstation and the switch / router / modem. (The ADSL link between the modem and the DSLAM is configured as DHCP.)

Please post the output returned by ./getinfo.sh network, as detailed in How To Provide Information About Your System . . .
User avatar
AlanBartlett
Forum Moderator
 
Posts: 8975
Joined: 2007/10/22 11:30:09
Location: ~/Earth/UK/England/Suffolk

Next

Return to CentOS 5 - General Support

Who is online

Users browsing this forum: No registered users and 1 guest