Boot speed and Mount

Time for another foray into the world of boot speed and disk mounting.

The vendor who supplies our Blades for QNX has just changed motherboards on us claiming the old one was no longer available.

So I tried booting our application on this new system and it failed. But a stock QNX install (via diskboot) boots fine. After some time on the problem I realized that the timeout (10 seconds) I have for the disk to be recognized and mounted is no longer enough (on the old blade it probably took 2 seconds tops).

We don’t use diskboot so I decided to track down the problem and see if I could get the boot time down to a more reasonable delay.

So I booted the system and copied /bin, /usr/bin, /sbin, /usr/sbin into a ram drive and set my path to use the Ram drive first, then the hard drive. This lets me kill devb-eide and start it manually looking for ways to improve boot speed.

I started with our bootscript line of:

devb-eide eide nobmstr,noslave blk cache=2m,automount=hd0t79:/ &

This takes about 14 seconds to return a mounted drive at /

If I change to:

devb-eide eide nobmstr,noslave blk cache=2m &

This returns in 1 second with no mounted drive. A ‘df’ command shows the /dev/hd0t79 is indeed there and found by devb-eide.

If I then mount manually via

mount -t qnx4 /dev/hd0t79 /

This command takes 13 seconds to return.

I added -vvvvv to the mount command hoping to see something interesting but there isn’t anything listed that would indicate why it takes 13 seconds to create a mount point.

mount -e /dev/hd0t79

returns instantly so it’s not a problem enumerating the partition table (there is only 1 partition on this drive).

So I’m stumped. I can’t understand what is causing mount to take so long to create a mount point.

FWIW, the hard drive in the system is a SATA drive. In the BIOS I have legacy mode enabled to enable devb-eide to use the drive (if I instead use native mode QNX doesn’t see the drive). Also, once mounted, the drive functions just fine speedwise (I don’t notice anything slow).

We’d really like to get this mount time down to 1-2 seconds tops. I don’t see any real options to mount that might make a differnce. Is there options I might pass to devb-eide or io-blk that might help? I would think since they return right away they aren’t the bottleneck but maybe they are.

Tim

Just in case anyone is interested or runs into the same problem, I “solved” my issue this morning.

I was playing around with mount and I noticed that during the mount delay the CPU was going to 100% for the 14 seconds.

After some more investigation I realized devb-eide was also jumping from a few K of Ram used to 25 Megs. I then checked the size of the .bitmap file and it was 60 Megs in size!

A test copy of the 60 meg bitmap file revealed about 14 seconds.

So the problem is that the new Sata drives are just too big to be allocated into 1 QNX partition (this drive was 250 Gig while the former blades were 80 Gig).

I re-installed QNX and partitioned into a 20 Gig “boot” area and 230 Gig’s of future use space and lo and behold, I now boot in 2 seconds.

So if you are installing QNX on a large drive and wondering why the boot times are exploding to the 15-30 second range, now you know why.

With terrabyte drives just around the corner it seems that we are going to go back to the early 90’s days of creating small QNX boot partitions.

Tim