On Fri, Feb 02, 2001 at 09:43:25AM +1030, Dale Long wrote:
> On Thu, 1 Feb 2001, David Douthitt wrote:
> > On 1 Feb 2001, at 9:33, Yu Xuanwei wrote:
> > 
> > > To compress all files as well as glibc, why not to rewrite root
> > > device filesystem to support compressed file? 
> > 
> > This is one of those ideas that make one go.... "Duh! Why didn't _I_ 
> > think of that?"
> > 
> > Is there a simple, small, quick compression that would work?  It 
> > would have to take the form of a kernel patch.
> 
> You could use the loopback device with a kernel modification. I will try
> to find where I saw the documents. Most likely a HOWTO on LDP. You would
> also have the option of encryption. Ext2fs does have a flag for compressed
> files. But I do not know if this has ever been used.

There are two (main) ways for compressed storage; compressed block devices,
and compressed filesystems. There are arguments for and against both
approaches. One thing to be wary of is how the kernel interacts with them
when doing things like mem-mapping of files. What might appear to be a
really good way to compress the filesystem can end up with two copys in RAM;
one compressed on ramdisk, and one uncompressed in buffer cache. I believe
Linus' cramfs tries to avoid this, though I'm not sure to what degree it
succeeds. The problem is most OS's buffer caching and memory management are
optimised for slow disk devices, not fast ramdisks.

Have a look on freshmeat under the "Old Appindex::Console::Filesystems" and
you'll find heaps of interesting stuff (though I just looked and it appears
that since it migrated to the "new-look" some stuff that used to be there
may have dropped off). Another place to look is the SF "Storage Foundry",
though it seems pretty basic at the moment. The SF Trove under
"Topic::System::Filesystems" also has heaps, including the "Ext2 Compression
Extension".

The Ext2 Compression Extension is a nice and simple way to add compression
to ext2; they compress an adjacent group of blocks, and store them in the
blocks required, leaving "holes" for the freed up blocks. Very simple and
"safe" way of adding compression to an existing fs, but not very optimal. If
high compression is more important than ext2 compatibility, then you're
better off going for something completely new.

I personaly feel compressed block devices are the simplest, safest, and most
efficient way to compress storage, but when it starts to interact with with
an OS's buffer cache, mem-mapping, directory caching, etc, a compressed fs
might end up more efficient.

-- 
----------------------------------------------------------------------
ABO: finger [EMAIL PROTECTED] for more info, including pgp key
----------------------------------------------------------------------

_______________________________________________
Leaf-devel mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/leaf-devel

Reply via email to