Am Mon, 2002-08-12 um 11.11 schrieb Helge Hafting:
> In short - memory used to cache your big mmapped file don't merely
> compete with memory used for caching other parts of that file.
> It competes with all other swappable (or discardable) memory
> in the system, and some of that might go to the swap device.
That's what I though.
> Maybe you only need a little of that big file at a time - but
> the VM system cannot know that. It simply looks at _all_
> memory, considers "what is recently used, and what is _not_"
> and goes on to swap/writeback the latter parts.
Actually I need 95% and the file will grow on demand so it's pretty
hefty in use; I really need to invent some hack to avoid touching
the memory as much as we do now without any need.
> You have enough RAM, but was all of it _free_ according to free?
> Lots of it will usually be in use as cache, so something must be
> evicted. Cache are freed sometimes, swapping happens at
> other times.
Interestingly the behaviour seems to be quite different on PPC vs.
i386. On my PPC machine with 256 MB RAM I have constant use swap and
all of the "free" memory is used as cache. On a i386 maschine with
512MB RAM the kernel never touched a single byte of swap and around
150MB are always free. Both machines always have a load > 1 and are
used for big compile jobs like gcc, OpenOffice and alike.
-- Servus, Daniel- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
This archive was generated by hypermail 2b29 : Thu Aug 15 2002 - 22:00:27 EST