Prelink hates me

Simon Perreault nomis80 at nomis80.org
Sat Apr 10 16:49:35 UTC 2004


Arjan van de Ven wrote:
> ok so there are 2 rational sides to this that aren't a bug:
> 1) prelink will read in a lot of files into the filesystem cache, since
> it'll have to know detailed information about a lot of libraries to do
> it's job, only way to get that is to read them in.

The memory is not spent in the cache. It is as though it was used by 
programs, but top and ps show no programs using that much memory.

> 2) normally, when 5 running binaries use the same library, there is only
> one copy of that library in memory. However, when a library gets
> prelinked, a *new copy* of that library is put on disk (one with all the
> prelink information), and new binaries that start and use that library
> won't and cannot share it with the existing running binaries, so this
> leads to temporarily increased real memory usage (temporary because
> eventually all apps that use keep the old libs "in use" exit and only
> "new library" applications are running). The exception can be very long
> running applications (like cron.weekly) which now have library stuff
> that is hardly ever used and the VM subsystem may choose to swap some of
> that out.

This is also not the problem, since this happens on a laptop with 
frequent reboots.

> Now I'm not saying that what you see is exclusively one of these, nor am
> I saying there's no bug, but at least the cache subsystem showing lots
> of ram is expected (and it should be given up mostly when it's needed).

The cache size shown by free is small, but all the memory is used. So it 
seems like the memory is used by programs. But top and ps show no 
programs that big.

Also, if the cache was big, almost no disk reading should happen when 
starting programs. But the contrary happens: the disk starts trashing, 
as if all the memory was used by some program, which seems to be the 
case according to the totals, but does not seem to be the case when you 
look at per-program memory usage.

-- 
Simon Perreault <nomis80 at nomis80.org> -- http://nomis80.org





More information about the fedora-devel-list mailing list