Coda File System

Re: Docs are inconsistent: Virtual Memory

From: Phil Nelson <phil_at_cs.wwu.edu>
Date: Wed, 25 Sep 2002 14:31:04 -0700 (PDT)
Hi Derek,

 
>	This implies that, if I want a 25 Gig volume (with its 1 Gig RVM
>metadata storage file), I need a 1 Gig Linux Swap partition (assuming that
>the term "virtual memory" above refers to the Linux swap partition).
>
>	Yet Phil Nelson gave me his NetBSD example that shows the codasrv
>using far, far, far less than the RVM metadata size
>
>(From Phil:)
>--
>On my NetBSD system, the server using 1G RVM (25G files) shows the
>following:
>
>root   644  0.0 11.9 5768 15524 ??  S<s  17Sep02     0:11.34 codasrv -n 1
>                     ^    ^- Virtual memory size in k bytes
>                     |--- Memory resident size of the VM.

  I should have clarified more.  When that documentation was written,
RVM always used "anonymous mappings".  This ment that when codasrv is
started all of RVM was read into virtual memory.  Thus, one needed 
more virtual memory than your RVM size.

  Now consider a large server ...  reading 1G from the disk into
virtual memory would take a very long time.  So, as part of my work to
get 1G virtual memory working, I added "private mapping" for RVM.
What this does is let the original file be the "backing storage" for
unchanged parts of RVM.  When RVM gets changed, then the system moves
that part of RVM to virtual memory and no longer uses the original
file for the "backing storage".  What you see above is that close to
15M of RVM was changed and thus in Virtual memory.  Also, not all of
the virtual memory is resident in real memory.  If all 1G of RVM were
changed, then you would need 1G of virtual memory to hold all the changes.
The machine on which the above codasrv was run has 3.6G of virtual memory.
Very little of it is currently used, but it is there in case the codasrvs
need the space.  I had 2 codasrvs running on that machine.

I do suspect that Linux will work fine with a 1G swap partition.
(If not, I do know that NetBSD runs with large swaps :)

--Phil

-- 
Phil Nelson                       NetBSD: http://www.netbsd.org
e-mail: phil@cs.wwu.edu           Coda: http://www.coda.cs.cmu.edu
http://cs.wwu.edu/faculty/nelson 
Received on 2002-09-25 17:32:58