shredding files on a flash drive

Lennart Sorensen lsorense-1wCw9BSqJbv44Nm34jS7GywD8/FfD2ys at public.gmane.org
Sun Jan 20 22:23:38 UTC 2008


On Sun, Jan 20, 2008 at 05:01:35PM -0500, Anthony de Boer wrote:
> I've wasted CPU time on worse things.  :-)
> 
> That said, compressed filesystems would tend to be more desirable for
> flash devices, since they tend to lag a lot behind other devices in size
> and be more expensive per size.  Also, when used to cart files from one
> computer to another, there's less need for random access within files;
> you're not likely to mount a MySQL database there.

If all you ever do is copy files whole to and from the flash device,
then it might be OK.  If you ever wanted to edit a file, then with a
compressed filesystem you have to rewrite the whole file on a write
rather than just the part of the file that is changing.  It's a
compromise.  You also need quite a bit of CPU power to compress files
fast enough to actually write faster than you could without compression.

> Back when flash was far more expensive than RAM, I built a system that
> extracted a RAM filesystem from a gzipped tarball on flash, and we
> deployed several of those across Canada.  For similar use you now have
> squashfs (and the earlier cramfs).  If you're dealing with raw flash,
> there's JFFS2, but it's less applicable with USB devices and the like
> that we access at a higher level already.
> 
> There's also the consideration that gzipped tarballs and most popular
> multimedia file formats incorporate compression internally, so you're
> not gaining anything from another layer of compression if carting files
> like that around is your application.
> 
> Compression of a read-write filesystem is something that I recall people
> were doing in the DOS era (Wikipedia tells me "Stacker" and "Doublespace"
> were the names, and I'm recalling a lawsuit in there too), but at least
> in the Linux mainstream the idea never really caught on.
> 
> So yes, squashfs is current technology.

Making a readonly filesystem compressed makes some sense.  After all
decompression is quite fast and if the files are never changed then you
can actually gain something from the compression.  For read-write it
just doesn't seem to make sense.

--
Len Sorensen
--
The Toronto Linux Users Group.      Meetings: http://gtalug.org/
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://gtalug.org/wiki/Mailing_lists





More information about the Legacy mailing list