[PC-BSD Dev] Wild idea to speed up boot process

Claudio L. claudio at hpgcc3.org
Tue Aug 20 17:34:17 PDT 2013


On 08/19/2013 19:41, Warner Losh wrote:
> That's an interesting assertion. But even so, the amount of data is << 
> 4MB,
> so even at the slow speeds you are saving at most a second. 
Only 4 MB? That's only config files and scripts or everything needed? 
What about the executable files that those scripts run? To gain any 
speed, those should be in RAM too.
If you are correct and we are loading only 4 MB of data, then I'll 
forget about this whole thing, it wouldn't make sense.
> The only time I've seen a big speedup, at the cost of too much memory 
> for the environment, was when I was running off a media that got only 
> ~150kB/s of read performance. There a RAM disk would be faster, but 
> would eat up too much of that environment's memory. We got much larger 
> gains from removing the /etc/rc.d files that we had disabled. And from 
> making the underlying media speed 4x or 6x faster. The former got the 
> boot time down from 2 minutes to ~45s seconds, while the latter I 
> think got us to 10s (the best RAM disk boot was only 8s, so further 
> speedups in the root device wouldn't help much more).
Ok... so your observations are that the bottleneck is actually in 
running the scripts.
> This was in a memory constrained ARM environment, which may have 
> explained the ridiculously large win in deleting the rc files we 
> didn't need. 

Do you mind sharing which ARM platform (processor, speed, RAM amount, 
ram clock)? I'm quite familiar with a couple ARM SOC's. I'm trying to 
see if your bottleneck was on the scripts because you were running a 
slower CPU or if this may apply also to the PC. On a PC with faster CPU, 
the bottleneck should shift more towards the disk access, though (but I 
have no tests to back it, of course).

> So I'm not saying don't try, but please make careful measurements 
> (over multiple runs) to make sure that anything you do actually has an 
> effect. I'm skeptical that this could work out, but hey, don't let me 
> stop you from proving me wrong :)

The only reason I posted in the first place is to get input like yours. 
If you made some observations on a certain platform that tell you this 
is not going to work, I want to know about it before I do any work just 
to bang my head against a wall.
I believe the idea has potential, but if somebody already tried 
something similar and doesn't work...

Claudio


More information about the Dev mailing list