[PC-BSD Dev] Wild idea to speed up boot process
Radio młodych bandytów
radiomlodychbandytow at o2.pl
Fri Aug 9 11:38:05 PDT 2013
1. W/out UnionFS hacking it's unsafe in case of power failure
2. It would lose ZFS end-to-end checksumming
3. Obviously, it wastes RAM.
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.
5. We should measure the bottlenecks of the current procedure before
trying to improve it. Is it going to be faster at all?
6. The illumos camp works on persistent L2ARC. It's a much better
option, though requires hardware that not everybody has.
On 09/08/2013 20:00, Claudio L. wrote:
> Would it be possible to implement something like this?
> 1) Early during boot, create a RAM disk (mdconfig)
> 2) Read it in whole with dd from a file in the root file system.
> 3) Union mount this ramdisk over root.
> This ramdisk should of course contain all files needed during the boot
> process (but only the files needed for boot, not the whole root file
> system), acting as a ram cache.
> Since it's written in one big file, it can be restored at sustained read
> speeds, avoiding random reads and the overhead of the filesystem.
> Once it's in RAM, any file that exists in this ram disk would be used
> instead of the underlying root file system.
> On system shutdown, or actually as soon as boot process is finished,
> this ramdisk can be dumped back to disk, to preserve any changes.
> All we would need is some hook to detect which files are read during
> boot, and copy them to the ram disk on the fly if they are not already
> The union mount will automatically write the file to the ram disk if
> it's modified, but 99% of the boot files will be read only during normal
> We need some kind of service that monitors changes on any file that is
> present in the ram disk, and dump those files back into the root file
> system when the system shuts down (just to keep the ram disk in sync
> with root), or better off, modify the 'union' to actually write to both
> file systems, not just the top.
> I think this should speed up the boot process noticeably. We can define
> when the system is considered "booted". For example we can extend it
> until the user logs on to the desktop and all applications are loaded.
> A full desktop takes about 512 MB of ram, and that counts the ram needed
> to run the programs and disk caches, so I'm thinking a 512 mb ram disk
> should be able to fit all the executables and files needed for boot.
> A normal hard disk can read 120 MB/s sustained, and an SSD around 500
> MB/s, so we can have everything needed for boot in RAM in about 4 seconds.
> Any comments / ideas?
> Dev mailing list
> Dev at lists.pcbsd.org
More information about the Dev