Date: Wed, 18 Jul 2007 19:13:28 +0200 From: Ulrich Spoerlein <uspoerlein@gmail.com> To: Matthew Dillon <dillon@apollo.backplane.com> Cc: hackers@freebsd.org, Tim Kientzle <kientzle@freebsd.org> Subject: Re: Tar output mode for installworld Message-ID: <20070718171328.GA1413@roadrunner.q.local> In-Reply-To: <200707172000.l6HK0KeS041974@apollo.backplane.com> References: <46992FFF.7010906@kientzle.com> <20070714223853.GF16579@britannica.bec.de> <469992CA.6000104@freebsd.org> <4699BE75.2090808@freebsd.org> <20070715184703.GK2819@roadrunner.q.local> <469A8F91.7090509@freebsd.org> <7ad7ddd90707152356v6034352uf1f7a42ddb9c1166@mail.gmail.com> <469B8EF2.3010002@freebsd.org> <200707172000.l6HK0KeS041974@apollo.backplane.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, 17.07.2007 at 13:00:20 -0700, Matthew Dillon wrote: > Probably the best way to do this is to pre-cache the data with an > /etc/rc.d script. Write a little program to do it or build it as a > script. Inode numbers for files on a CD tend to reflect the location That is an interesting project in itself. This could be used to speed up the boot process on any FreeBSD installation and I think MacOS' new init system is where I got the idea from. What I envisioned (quick n dirty): - Init runs rc inside a ktrace session - after the rc scripts have finished, you turn off ktrace - kdump and read all files which were read during rc[2] - do some magic to sort the list based on their hard disk location - put this list in /var/db/precache.db - /etc/rc.d/precache (which will run very early[1]): (for file; cat $file >/dev/null)&; sleep 3 yes, it will be run in the background Problems with this naive approach: It reads entire files, not blocks. The filelist has to be kept small and only "small" files should appear in the list. With direct kernel support one could do a lot more, I guess. I'm running on a fast laptop with a crappy 4800RPM hard disk which is dog slow. I have the feeling my bootup time could be reduced drastically by this approach. Perhaps some day I get around to prototyping it. [1] I know this is hard to decide. [2] To make this self-tuning, the output of the precache script must not appear in the ktrace/kdump list. Cheers, Ulrich Spoerlein -- "The trouble with the dictionary is you have to know how the word is spelled before you can look it up to see how it is spelled." -- Will Cuppy
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20070718171328.GA1413>