[OpenAFS-devel] Patch to implement default tuning proposal discussed a while ago

Troy Benjegerdes hozer@hozed.org
Wed, 17 Aug 2005 17:36:07 -0500


On Wed, Aug 17, 2005 at 05:20:27PM -0400, Jim Rees wrote:
> Ok, here's a possible problem:
> 
> afsd.c:1143 int maxDir = (cacheFiles + nFilesPerDir - 1) / nFilesPerDir;
> 
> Won't maxDir be too small if we're shrinking the cache and we're going to
> remove some directories?  Won't this make us scribble past the end of 
> cache_dir_filelist and cache_dir_list?

That would explain the errors..

I deleted the entire cache dir, and am going to try running with a 16GB
cache.

imap:~# afsd -verbose
afsd: My home cell is 'scl.ameslab.gov'
afsd: cacheFiles autotuned to 524288
afsd: chunkSize autotuned to 20
afsd: dCacheSize autotuned to 10000
afsd: cacheStatEntries autotuned to 15000
afsd: Forking rx listener daemon.
afsd: Forking rx callback listener.
afsd: Forking rxevent daemon.
afsd: Calling AFSOP_CACHEINIT: 15000 stat cache entries, 524288 optimum
cache files, 16777216 blocks in the cache, flags = 0x0, dcache entries 10000
afsd: Sweeping workstation's AFS cache directory.
afsd: 524288 out of 524288 data cache files found in sweep 1.
afsd: Forking AFS daemon.
afsd: Forking Check Server Daemon.
afsd: Forking 2 background daemons.
afsd: All AFS daemons started.
afsd: Forking trunc-cache daemon.
afsd: Mounting the AFS root on '/afs', flags: 0.


FYI, the following makes 'afsd -verbose' output a lot easier to deal
with..

===================================================================
RCS file: /cvs/openafs/src/afsd/afsd.c,v
retrieving revision 1.55
diff -u -r1.55 afsd.c
--- afsd.c      17 Aug 2005 16:16:50 -0000      1.55
+++ afsd.c      17 Aug 2005 22:16:51 -0000
@@ -2387,7 +2387,7 @@
        syscall(AFS_SYSCALL, AFSCALL_CALL, param1, param2, param3,
param4,
                param5, param6, param7);

-    if (afsd_verbose)
+    if (afsd_debug)
        printf("SScall(%d, %d, %d)=%d ", AFS_SYSCALL, AFSCALL_CALL,
param1,
               error);
     return (error);


-- 
--------------------------------------------------------------------------
Troy Benjegerdes                'da hozer'                hozer@hozed.org  

Somone asked me why I work on this free (http://www.fsf.org/philosophy/)
software stuff and not get a real job. Charles Shultz had the best answer:

"Why do musicians compose symphonies and poets write poems? They do it
because life wouldn't have any meaning for them if they didn't. That's why
I draw cartoons. It's my life." -- Charles Shultz