Subject: Re: Problems with MFS in 1.6 ?
To: Sylvain Fontaine <sfontaine@hyperchip.com>
From: Chuck Silvers <chuq@chuq.com>
List: port-macppc
Date: 12/03/2002 18:47:13
hi,

On Tue, Dec 03, 2002 at 02:14:52PM -0500, Sylvain Fontaine wrote:
> I use MFS to mount a ~100M ram disk.
> 
> I get a strange behavior in 1.6, which I dont see in 1.5.3,
> that doubles the memory consumtion on MFS.
...
> Results: 
> By creatin a MFS drive of ~ 100M, creating a file in it of ~100M, I end up 
> using ~200M....
> 
> Is this Normal?

yes, it's normal.  the same data is in memory twice, once in the MFS process
and again in the file system cache for the individual files in the MFS.
this was also the case prior to 1.6 as well, but then the second copy was
in the buffer cache instead of the page cache, which is managed and reported
differently.

when memory gets low, the second copy will be "paged out" to the first copy,
and the first copy will be paged out to swap space.

at some point, MFS should be changed to avoid this double memory usage,
but it's a substantial amount of work.

-Chuck