How to speed up boot sequence (12180 Views)
Reply
Advisor
paul_xedos
Posts: 33
Registered: ‎08-05-2009
Message 1 of 5 (12,180 Views)
Accepted Solution

How to speed up boot sequence

Hi,

I've some system demos coming up in a few days which require machine reboots. I've noticed that boot times even with hpvms are around 4-5 minutes.

 

I'm working my way through disabling unneeded rc2.d and rc3.d scripts but was wondering if anyone had any other suggestions for speeding things up

 

I'm booting a combination of RX2620s and hpvms all running 11.31 btw

 

Regards

Paul

Honored Contributor
Patrick Wallek
Posts: 13,787
Registered: ‎06-21-2000
Message 2 of 5 (12,171 Views)

Re: How to speed up boot sequence

Have a look at your 'setboot -v' output.  You can use 'setboot' to turn off a lot of the self tests that are done.

 

For example:

 

 # setboot -v
Primary bootpath : 0/1/1/0.0x5000c50007153089.0x0 (/dev/rdisk/disk5)
HA Alternate bootpath : 0/1/1/0.0x5000c5000abec39d.0x0 (/dev/rdisk/disk41)
Alternate bootpath : 0/1/1/0.0x5000c5000abec39d.0x0 (/dev/rdisk/disk41)

Autoboot is OFF (disabled)
Hyperthreading : OFF
               : OFF (next boot)

TEST            CURRENT        DEFAULT
----            -------        -------
all             on             on
  SELFTESTS     on             on
    early_cpu   on             on
    late_cpu    on             on
  FASTBOOT      on             on
    Platform    on             on
    Full_memory on             on
  Memory_init   on             on
  IO_HW         on             on
  Chipset       on             on


# setboot -T all=off

# setboot -v
Primary bootpath : 0/1/1/0.0x5000c50007153089.0x0 (/dev/rdisk/disk5)
HA Alternate bootpath : 0/1/1/0.0x5000c5000abec39d.0x0 (/dev/rdisk/disk41)
Alternate bootpath : 0/1/1/0.0x5000c5000abec39d.0x0 (/dev/rdisk/disk41)

Autoboot is OFF (disabled)
Hyperthreading : OFF
               : OFF (next boot)

TEST            CURRENT        DEFAULT
----            -------        -------
all             off            on
  SELFTESTS     off            on
    early_cpu   off            on
    late_cpu    off            on
  FASTBOOT      off            on
    Platform    off            on
    Full_memory off            on
  Memory_init   off            on
  IO_HW         off            on
  Chipset       off            on

 Also, if you read the setboot man page make note of this sentence:

 

"Note: When FASTBOOT is on, the tests are performed, and vice versa."

 

So, basically it sounds like to make sure tests are NOT performed, you want to turn everything off, as I did above.

Honored Contributor
Bill Hassell
Posts: 14,226
Registered: ‎05-29-2000
Message 3 of 5 (12,159 Views)

Re: How to speed up boot sequence

[ Edited ]

The first thing to do is to add an elapsed time to the /sbin/rc.utils script so you can tell which scripts occupy the most time (instructions later).

 

Here is an example from an 11.31 system where the elapsed time is shown in the 1-liner, then sorted:

 

 

/sbin/rc2.d/S020evm start -- Elapsed time = 2 sec
/sbin/rc2.d/S290pci_olar start -- Elapsed time = 2 sec
/sbin/rc3.d/S823hpws_apache start -- Elapsed time = 2 sec
/sbin/rc2.d/S350vxvm-startup2 start -- Elapsed time = 3 sec
/sbin/rc2.d/S810ovpa start -- Elapsed time = 3 sec
/sbin/rc2.d/S300nettl start -- Elapsed time = 4 sec
/sbin/rc2.d/S700isisd start -- Elapsed time = 4 sec
/sbin/rc2.d/S750vxpal.StorageAgent start -- Elapsed time = 4 sec
/sbin/rc3.d/S076hostwatchdog start -- Elapsed time = 4 sec
/sbin/rc2.d/S590Rpcd start -- Elapsed time = 5 sec
/sbin/rc3.d/S790opendial start -- Elapsed time = 5 sec
/sbin/rc2.d/S560SnmpMaster start -- Elapsed time = 6 sec
/sbin/rc2.d/S838omni start -- Elapsed time = 6 sec
/sbin/rc2.d/S550psbdb start -- Elapsed time = 7 sec
/sbin/rc2.d/S602icod start -- Elapsed time = 7 sec
/sbin/rc3.d/S800hostagent start -- Elapsed time = 9 sec
/sbin/rc2.d/S600cimserver start -- Elapsed time = 17 sec
/sbin/rc3.d/S99z0OVCtrl start -- Elapsed time = 17 sec

 

This is from an rx2660 running 11.31.

If you don't use Snmp, always turn those 6-7 scripts off.

 

I have disabled these scripts:

 

/sbin/rc2.d/__S225userdb
/sbin/rc2.d/__S450vxpbx_exchanged
/sbin/rc2.d/__K750vxpal.StorageAgent
/sbin/rc2.d/__S750vxpal.StorageAgent
/sbin/rc1.d/__S330sec_init
/sbin/rc1.d/__K451vxpbx_exchanged
/sbin/rc0.d/__K451vxpbx_exchanged
/sbin/rc3.d/__S800cmcluster
/sbin/rc4.d/__S450vxpbx_exchanged

by renaming them with "__" because they are very badly written and do not have a proper control file in etc/rc.config.d. 

 

 

= = = = = =

 

To add Elapsed time to the rc.log files, edit /sbin/rc.utils and around line 620, 

 

insert the line: SECONDS=0 before the: echo "---------

 

then a few lines down, look for: result=$?

and edit the next line to read:

 

 

echo "${FUNCT_NAME[$I]} -- Elapsed time = $SECONDS sec" >> $LOGFILE

 

then around line 760, look for the: echo "-------

line and insert another SECONDS=0

 

Then a couple of lines later, after result=$?, edit this line to add the SECONDS information:

echo "${FUNCT_NAME[$INDEX]} -- Elapsed time = $SECONDS sec" >> $LOGFILE

 

And now your rc.log and rc.log.old will have time stamps. Use grep to grab just the seconds:

 

# grep Elapsed /etc/rc.log

 and sort the result:

 

# grep Elapsed /etc/rc.log | sort -nk7

 

 

 

Advisor
paul_xedos
Posts: 33
Registered: ‎08-05-2009
Message 4 of 5 (12,149 Views)

Re: How to speed up boot sequence

Superb - thanks very much for the replies. I'll give those suggestions a go

 

Regards

Paul

Advisor
Stijn Adriaensens
Posts: 21
Registered: ‎09-11-2009
Message 5 of 5 (12,130 Views)

Re: How to speed up boot sequence

Paul, there's two other things you can consider:
- Parallel RC scripts: http://bizsupport2.austin.hp.com/bc/docs/support/SupportManual/c02036939/c02036939.pdf
- SoftReboot: http://h20566.www2.hp.com/portal/site/hpsc/template.BINARYPORTLET/public/kb/docDisplay/resource.proc...

The SoftReboot however, is not applicable to your situation (only on SD or partitionable systems, not on vPar, VM)
The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation.