Stephen R. van den Berg wrote:
> I would normally assume that. If we wouldn't have ample memory, the
> machine starts swapping. We all know that squid doesn't like that.
> The only thing that (apparently) can happen is that the buffer cache
> is being overflowed with writes. But this problem exists with and
> without mmapped file, so I'm not sure if this is a problem.
It may be, depending on mmap + buffer cache implementation. Consider
the case where mmap:ed memory is seen as a shortcut to the buffer
cache, whereas user-level data is seen as just that. Then if the
buffer cache runs out of memory it may be smart enought to prefer
stealing non-dirty buffer-cache pages, and avoid stealing pages
from normal user-space.
In such a mmap scheme, mmap:ed memory is quite likely to be stolen
when a lot of I/O operations are going on, but user-space data is
not touched by the buffer cache unless some algorithm decides
that the buffer cache is to small and tries to enlarge it by stealing
user-level pages (for example if a huge amount of writes is taking
place, making all buffer cache pages dirty).
/Henrik
Received on Tue Jul 29 2003 - 13:15:53 MDT
This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:11:53 MST