Date: Wed, 20 Jun 2007 18:53:51 +0200 From: Daniel Bond <db@danielbond.org> To: Vlad GURDIGA <gurdiga@gmail.com> Cc: freebsd-fs@freebsd.org Subject: Re: fs cache Message-ID: <46795B9F.8030108@danielbond.org> In-Reply-To: <da7069940706192330j19e98ed0sfc154b7fdc13fa4c@mail.gmail.com> References: <da7069940706170024p6dc692al62f71a2d7bbcece6@mail.gmail.com> <da7069940706192330j19e98ed0sfc154b7fdc13fa4c@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Vlad GURDIGA wrote: > Hello, > > I have FreeBSD 7-CURRENT and Ubuntu on the same computer but Firefox > takes twice as long to start on a fresh boot. I've run some simple > tests: > - on FreeBSD it takes about 7 seconds on the first start and about 3 > on subsequent startups; > - on Ubuntu it takes about 3 seconds on the first start and about 1 on > subsequent startups; > > The only difference I can see is that on Ubuntu, after first start of > Firefox the memory use for cache is 22% vs. 0% on FreeBSD. My guess is > that this is the cause of slower startups on FreeBSD. > > My question is: can I tune UFS2 in such a way that the most frequently > used desktop applications would remain for a longer time in disk > cache? > > In both cases I use GNOME 2.18, GNOME System Monitor 2.18, and Firefox 2. > Both FreeBSD 7-CURRENT (src and ports tree) and Ubuntu 7.01 > (2.6.20-16-generic kernel) are up to date. Both are SMP and 32bit. > Here is the system configuration: > - Intel DP965LT mother-board; > - dual-core Pentium D 820; > - 1GB of dual-channel-enabled DDR2 PC5300 at 667 MHz; > - Seagate, BARRACUDA 7200.7 Plus, 160GB, ST3160827AS, 8M cache, with NCQ; > _______________________________________________ > freebsd-fs@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-fs > To unsubscribe, send any mail to "freebsd-fs-unsubscribe@freebsd.org" Hi, I would think it loads faster in linux due to a linux-feature called prelink. Most common applications make use of shared libraries. These shared libraries need to be loaded into memory at runtime and the various symbol references need to be resolved. For most small programs this dynamic linking is very quick. But for programs written in C++ and that have many library dependencies, the dynamic linking can take a fair amount of time. Prelinking does this in advance of starting the program, but it requires that user runs "prelink" every time libraries are updated. I think it is the effect of prelinking you are noticing here, ubuntu has it on by default as far as I know, and I guess that the package-manager does the prelinking for the user. - -CURRENT also has some extra debugging in kernel that slows things down. - -DB. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFGeVufUR3pKhqN0EoRAjKUAJ9/SAten1JcZWTkCgAludzhZhi11ACeMtr/ hn827NyiaVQAJApUbIctJaw= =ScVy -----END PGP SIGNATURE-----
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?46795B9F.8030108>