Subject: Re: more on mysql benchmark
To: SODA Noriyuki <soda@sra.co.jp>
From: Chuck Silvers <chuq@chuq.com>
List: tech-kern
Date: 03/08/2005 18:56:22
On Mon, Mar 07, 2005 at 12:41:44PM +0900, SODA Noriyuki wrote:
> >>>>> On Mon, 7 Mar 2005 12:16:29 +0900 (JST),
> 	SODA Noriyuki <soda@sra.co.jp> said:
> 
> > - On the other hand, file pages are now becomes protected by vm.filemax,
> >   because it is currently only using 10% and that's less than vm.filemax.
> 
> This description was not right. The file pages are less than
> vm.filemax before anonymous pages grow.
> The reason why file pages becomes to steal anonymous pages is
> because when both file pages and anonymous pages are less than max,
> file pages cannot steal physicaly memory from anoymous pages blindly
> (the behaviour of file pages are controlled by the page deamon),
> but when anoymous pages becomes greater than its max, file pages
> becomes to steal physical memory blindly.

yea, that's right (if I parsed it correctly).

no matter what the knobs are set to, there will situations when this occurs.
if someone invalidates all the file pages (eg. if they all belong to one file
and the file is truncated to 0), and then a process immediately allocates
all of the newly-freed memory for anon pages, then the system will be using
excessive memory for anon pages.  some anon pages will need to be paged out
so that we can cache some file data.  if we didn't, then we would never be
able to cache any file data at all until some process freed some anon pages,
and system performance for any file data access would be terrible in the
meantime.  so it can't be a problem that this behaviour occurs, but you can
argue that it occurs when you don't want it to.

-Chuck


> > - So, file pages now becomes to steal anonymous pages.
> --
> soda