Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 8 Oct 1997 19:48:21 +0100
From:      "Peter Edwards" <peter.edwards@isocor.ie>
To:        <hackers@FreeBSD.ORG>
Subject:   Re: Wheres all my memory going? 
Message-ID:  <343A136B0000097B@paradise.isocor.ie> (added by paradise.isocor.ie)

next in thread | raw e-mail | index | archive | help
David Greenman wrote:
> >But if theres 152MB of free memory then why is it ever pushing stuff out
> >into swap???
> 
>    Because there was something that took lots of memory and triggered a
> pageout. The system "caches" the data written out to swap - it isn't
freed
> up just by being paged back in again. This is why it is so important that
> you have at least as much swap as you have main memory. The weird thing
isn't

My knowledge of VM is pretty basic, but I dont get this. The "newvm" doc in
/usr/share/papers indicates that one of the reasons for the switch to the
region-based VM approach was to avoid having to assign each page of
phyiscal memory with a page of swap space, and being able to treat the sum
of physical memory and swap space as the available virtual memory of the
machine.

Surely the fact that the memory is "cached" is just so the process being
swapped out can also get its old pages as quickly as another can use that
free memory for it's new pages? If memory runs out, so be it. The cached
pages can be freed up for other use, because they're on disk, but why is
there a requirement to have more swap than physical RAM? What benefit is
gained by not mirroring each memory page with one in the swap files as was
done previously. Sorry for sticking my inexperienced oar in, but I'd like
to get a grip on this.
--
Peter.







Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?343A136B0000097B>