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

Claudio L. claudio at hpgcc3.org
Sat Aug 10 09:07:06 PDT 2013


On 08/09/2013 14:38, Radio młodych bandytów wrote:
> Some thoughts:
> 1. W/out UnionFS hacking it's unsafe in case of power failure
Yes, I guess it would have to be resolved by using a sync mode where a 
written file gets written on both the upper and lower layers. That would 
make it easier to keep things in sync.
Another idea would be to simply mark the files that are modified as 
"dirty" on the ram disk, and write them only to the lower layer. On next 
boot, any files that are "dirty"  would be re-read from the root filesystem.

> 2. It would lose ZFS end-to-end checksumming
Not necessarily, since the ram disk backup can be on the same zfs root 
filesystem, checksum would be handled by the underlying ZFS.

> 3. Obviously, it wastes RAM.
Yes, it would double the ram usage during boot, then it would be 
released. But since the ramdisk can be uncached, that would be memory 
that would otherwise be used by the zfs cache anyway. And if the ram is 
available, why not use it?
The idea is to release all ram after booting is finished.

> 4. man mount_unionfs says: "THIS FILE SYSTEM TYPE IS NOT YET FULLY
> SUPPORTED (READ: IT DOESN'T WORK)". Major work is needed. Though there's
> also unionfs in FUSE, it may or may not work.
Yes, I saw that, and doesn't inspire much confidence. But I think the 
functionality that would be required is not exactly that of the existing 
unionfs, so we wouldn't be able to use the existing unionfs anyway.


> 5. We should measure the bottlenecks of the current procedure before
> trying to improve it. Is it going to be faster at all?
A lot of people already did that. Just look at the speedups you get from 
booting on a normal hard disk w/SSD caching (Momentus XT?), which is 
basically the same I'm proposing: a persistent cache that provides high 
IOPS on top of a standard filesystem layer.

> 6. The illumos camp works on persistent L2ARC. It's a much better
> option, though requires hardware that not everybody has.

Obviously, if you already have cache with high IOPS (like an SSD), the 
improvement from using a ram cache will be much less. But I think it 
could still provide some speedup.
This idea is more to provide the benefits of a persistent cache to 
everybody, whether you have one or not.

Claudio


More information about the Dev mailing list