Coda File System

reducing "frivolous dirty state"

From: Matt Toups <mtoups_at_cs.cmu.edu>
Date: Fri, 8 Feb 2008 17:54:37 -0500 (EST)
Greetings ISR users,

One thing that has come up repeatedly in discussions with ISR testers is 
surprise at how much dirty state can be created in a parcel that seemingly 
isn't doing very much.

One way to address this is to zero out free blocks in the guest 
filesystem.  This should provide CAS benefits by creating many identical 
zero blocks, and also, these zero blocks compress very well.

In Linux, an easy way to do this is to just create a large file of zeros 
and then delete it, for example:

  dd if=/dev/zero of=tempfile ; rm tempfile

Jan also found a tool called zerofree 
(http://intgat.tigress.co.uk/rmy/uml/index.html), but it only works on 
unmounted filesystems.  They also provide a patch to ext2 and ext3 fs code 
which will have the filesystem zero out deleted files, at a performance 
penalty.

For Windows guests, Adam G. recommended the tool sdelete:

http://technet.microsoft.com/en-us/sysinternals/bb897443.aspx

You can run it within your guest with the -c option to get the desired 
effect.  My tests indicate that this can greatly reduce upload size due to 
the compressability of the zero blocks.  The tradeoff is that it does take 
time to zero out the space.  That penalty may vary depending on how well 
cached/hoarded your parcel's disk is.

Hopefully this information addresses the recurring issue of large uploads. 
There are several other ways to address this like disabling swap 
files/partitions.  Please share if you've had successes or failures with 
these sorts of things!

-matt

ps: Stay tuned for an OpenISR 0.9.1 release in the next week or so.
Received on 2008-02-08 17:55:51