Operating System - HP-UX
1752604 Members
4313 Online
108788 Solutions
New Discussion юеВ

Re: How to speed up boot sequence

 
SOLVED
Go to solution
paul_xedos
Frequent Advisor

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

4 REPLIES 4
Patrick Wallek
Honored Contributor

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.

Bill Hassell
Honored Contributor
Solution

Re: How to speed up boot sequence

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

 

 

 



Bill Hassell, sysadmin
paul_xedos
Frequent Advisor

Re: How to speed up boot sequence

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

 

Regards

Paul