Subject: Re: swap space for a memory based filesystem
To: Perry E. Metzger <perry@piermont.com>
From: None <nmahajan@hss.hns.com>
List: tech-userlevel
Date: 03/04/2004 09:41:59
Hi,
I was confused by the free memory going down, -:(
but after the explanation on the list, I could appreciate it ..
The issue it seems for my problem was that while some file copy or say ftp
of a huge file is in progress the memory / pages are used up by prorgrams
already executing and so in the meanwhile if one our process asks for
memory, it is turned down, we have a very limited memory on board and so
may be thats why I am noticing this kind of behaviour , there is no swap
space either .. after few seconds we can get space for our program, this is
also random in the sense that we can get space while program is running
also , but most of the time we are turned down saying "out of swap"
So, that's why I was wondering why wasnt it putting back all the data to
disk (flushing) and less memory shown in top confused me more ..
anyways, I think in my case, limiting the max number of pages for data
buffer caching could be the only way out . using sysctl .. ?
would just decreasing the filemax to a reasonable number do the thing ?
somebody seen like this and found some way out ?
or am I still on the wrong track . . ?
Thanks for your replies.
Regards,
Nitin
"Perry E. Metzger" <perry@piermont.com>@NetBSD.org on 03/03/2004 10:11:30
PM
Sent by: tech-userlevel-owner@NetBSD.org
To: Nitin Mahajan/HSS@HSS
cc: tech-embed@NetBSD.org, tech-userlevel@NetBSD.org,
tech-kern@netsbsd.org
Subject: Re: swap space for a memory based filesystem
nmahajan@hss.hns.com writes:
> we are observing that the file copied decreases the top shown free memory
?
That is totally normal.
> This goes on even if we issue sync command (wasnt it supposed to write
back
> these dirty pages back to disk ?)
It does, but it keeps the clean pages in memory in case you need to
read them again soon. If the system needs the memory for something
else it will just throw the clean pages away since it doesn't need to
keep them around. There is no unexpected behavior here.
Perry