Coda File System

Re: Coda And Samba PDC Server

From: Jan Harkes <jaharkes_at_cs.cmu.edu>
Date: Thu, 18 Dec 2003 16:50:24 -0500
On Tue, Dec 16, 2003 at 10:57:40AM +0100, Pedro P?rez S?nchez wrote:
> 
> >Our project it?s to implant Coda with a Samba PDC Server and replicate our 
> >information. This is the volumes to replicate: 
> >
> /dev/vgdata2/projectes  77G   66G   12G  85% /projectes
> /dev/vgdata2/intern     35G   26G  9.5G  73% /intern
> 
> For this space of date what?s the optimal RVM space and the optimal 
> local cache for a configuration like and the space used ( 77G and 35G ) :

Ok, I just cleaned up a little program that Michael German sent me a
couple of weeks ago.

It is called 'rvmsizer' and works somewhat like 'du'. The main
difference is that instead of counting used diskblocks it gives a pretty
accurate estimate of how much RVM will be used. It also displays
warnings when the contents of a directory won't fit in a Coda directory
(Coda directories have no indirect blocks and as a result are limited to
128 pages of 2KB).

When I run it on my coda source and object trees it looks something like
the following;

    $ rvmsizer ~/coda-HEAD ~/coda-HEAD-obj 
    148 directories, 1945 files, 165 directory pages
    total file size        110606512 bytes (105.48MB)
    average file size      56867 bytes
    total directory size   1220608 bytes (1.16MB)
    average directory size 8247 bytes
    estimated RVM usage based on object counts, 739024 bytes (0.70MB)
    estimated RVM usage based on 4% rule,       4473084 bytes (4.27MB)

So it takes less than a megabyte of RVM to store a Coda source and
object tree. For 'fun' it also gives the estimate based on the old '4%
rule', which was mostly based on having an average filesize of about
16KB and a 10:1 ratio of files to directories. Which in this case is
clearly a gross overestimate.

/usr/share/doc on my machine, here we're pretty close with the good old
4% rule...
    1971 directories, 29155 files, 2436 directory pages
    total file size        270654003 bytes (258.12MB)
    average file size      9283 bytes
    total directory size   17522688 bytes (16.71MB)
    average directory size 8890 bytes
    estimated RVM usage based on object counts, 10746956 bytes (10.25MB)
    estimated RVM usage based on 4% rule,       11527067 bytes (10.99MB)

But on /usr/include the 4% rule is clearly too optimistic.
    108 directories, 2310 files, 140 directory pages
    total file size        15454845 bytes (14.74MB)
    average file size      6690 bytes
    total directory size   974848 bytes (0.93MB)
    average directory size 9026 bytes
    estimated RVM usage based on object counts, 693424 bytes (0.66MB)
    estimated RVM usage based on 4% rule,       657187 bytes (0.63MB)

Ofcourse these calculations don't take things like RVM memory
fragmentation into account. But all in all this is a very useful tool.

I've committed it to CVS. But as it doesn't really depend on anything
in Coda, you can pull the .c file and compile it as follows,

    wget -O rvmsizer.c http://www.coda.cs.cmu.edu/cgi-bin/viewcvs.cgi/*checkout*/coda/coda-src/smon2/rvmsizer.c?rev=1.1
    cc -o rvmsizer rvmsizer.c

Jan
Received on 2003-12-18 16:52:24
Binary file ./codalist-2003/5931.html matches