Baumann Niklaus (LOG) wrote:
> Hi,
>  
> I have some questions about how OpenAFS 1.5.6400 works with RAM on
> Windows XP (SP2/SP3):
>  
> While copying data from/to AFS, the afsd_service.exe increases it's
> working set and fills the cachefile (at least fs getcacheparms tells).
> On a client with a cache file of 384MB and 3GB RAM the "mem usage" in
> Task manager then grows to ~440MB and won't shrink until I either
> restart the service or start to run out of physical memory. I assume the
> VMM then tells the afsd_service to cleanup (correct?). While this isn't
> a problem on a client with 3GB of RAM it is indeed on older hosts with
> say 512MB of RAM. On such a client I experience paging when copying
> files.
>  
> As far as I understood the afs clients works with the cache using a
> memory mapped file and opens views onto this file while using the cache.
> This views are then kept/cached in memory.

There is only one view.  The cache is a paging file exactly the same
as the Windows system paging file.  Windows manages the memory
utilization itself.  The size of the paging space is determined by the
size of the cache.  Windows pulls into memory the portions of the paging
file that are actively in use and flushes those that aren't.

If you are writing to the cache, then there will be paging.  This will
be true on a machine with 3GB as well as a machine with 128MB.  The
cache uses a least recently used algorithm to select which objects
(volumes, status, buffers, extents) to recycle.  The objects that are
going to be recycled are the ones that have no recently been used.  That
requires that Windows page in the memory for that region of the cache,
accept the changes, and write the contents back to disk.

> Shouldn't the AFS client flush the contents to the disk periodically and
> close some of the views in order to release the memory again? Or is
> there a way to tell AFS to keep only e.g. 64MB of the cachefile in
> memory?

This is dynamically managed by the Windows memory manager.

> Maybe we just missed something to configure. Or is there a
> recommendation for the cache file size in conjunction with amount of
> physical memory installed? At the moment we plan to workaround this
> effect by leaving the cache file size at the default value for all
> clients we distribute AFS to.

Your cache size should be sufficiently large to store the working set
of data.  Otherwise, not only are you experiencing paging but you are
going to be blocked on network I/O operations.

I do not believe that you need to worry about the virtual memory size of
the afsd_service.exe process.

Jeffrey Altman

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

Reply via email to