Optimizing Boot Time
-
- Posts: 28
- Joined: 2010/08/30 08:05:06
Optimizing Boot Time
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.
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.
Re: Optimizing Boot Time
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.
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.
-
- Posts: 28
- Joined: 2010/08/30 08:05:06
Re: Optimizing Boot Time
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
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
-
- Retired Moderator
- Posts: 18276
- Joined: 2006/12/13 20:15:34
- Location: Tidewater, Virginia, North America
- Contact:
Optimizing Boot Time
[quote]
scottro wrote:
chkconfig --list |grep on
[/quote]
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]chkconfig --list | grep :on[/code]
scottro wrote:
chkconfig --list |grep on
[/quote]
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]chkconfig --list | grep :on[/code]
-
- Retired Moderator
- Posts: 18276
- Joined: 2006/12/13 20:15:34
- Location: Tidewater, Virginia, North America
- Contact:
Re: Optimizing Boot Time
[quote]
curtis1000 wrote:
Do you see any obvious ones that don't belong?
...
rhnsd
...
[/quote]
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.
curtis1000 wrote:
Do you see any obvious ones that don't belong?
...
rhnsd
...
[/quote]
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.
-
- Posts: 28
- Joined: 2010/08/30 08:05:06
Re: Optimizing Boot Time
Understood.
Any ideas on how I can get the startup routine to skip the time consuming "Reading All Physical Volumes" step?
Any ideas on how I can get the startup routine to skip the time consuming "Reading All Physical Volumes" step?
-
- Retired Moderator
- Posts: 18276
- Joined: 2006/12/13 20:15:34
- Location: Tidewater, Virginia, North America
- Contact:
Re: Optimizing Boot Time
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.
- AlanBartlett
- Forum Moderator
- Posts: 9345
- Joined: 2007/10/22 11:30:09
- Location: ~/Earth/UK/England/Suffolk
- Contact:
Re: Optimizing Boot Time
[quote]
Any ideas on how I can get the startup routine to skip the time consuming "Reading All Physical Volumes" step?
[/quote]
Yes.
Oh, you want me to type some more? ;-)
O.k. -- Your system was installed using [i]LVM[/i], 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 [i]LVM[/i]. So backup all of your data and then re-install the OS, ensuring that you de-select the use of [i]LVM[/i]. Finally restore all of your data.
Any ideas on how I can get the startup routine to skip the time consuming "Reading All Physical Volumes" step?
[/quote]
Yes.
Oh, you want me to type some more? ;-)
O.k. -- Your system was installed using [i]LVM[/i], 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 [i]LVM[/i]. So backup all of your data and then re-install the OS, ensuring that you de-select the use of [i]LVM[/i]. Finally restore all of your data.
-
- Posts: 28
- Joined: 2010/08/30 08:05:06
Re: Optimizing Boot Time
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?
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?
- AlanBartlett
- Forum Moderator
- Posts: 9345
- Joined: 2007/10/22 11:30:09
- Location: ~/Earth/UK/England/Suffolk
- Contact:
Re: Optimizing Boot Time
[quote]
are there any compelling reasons why I should be using LVM?
[/quote]
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 [i]LVM[/i] 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 [i]LVM[/i] -- 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 [i]LVM[/i] when used with a multi-disk server.
[quote]
40 seconds - Determining IP info for ETH0 and then setting up and connecting to DSL
[/quote]
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 [b]./getinfo.sh network[/b], as detailed in [url=https://www.centos.org/modules/newbb/viewtopic.php?topic_id=25128&forum=47]How To Provide Information About Your System[/url] . . .
are there any compelling reasons why I should be using LVM?
[/quote]
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 [i]LVM[/i] 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 [i]LVM[/i] -- 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 [i]LVM[/i] when used with a multi-disk server.
[quote]
40 seconds - Determining IP info for ETH0 and then setting up and connecting to DSL
[/quote]
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 [b]./getinfo.sh network[/b], as detailed in [url=https://www.centos.org/modules/newbb/viewtopic.php?topic_id=25128&forum=47]How To Provide Information About Your System[/url] . . .