From: David Lang <dlang@digitalinsight.com>
To: Timothy Miller <miller@techsource.com>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: File system compression, not at the block layer
Date: Tue, 27 Apr 2004 18:00:11 -0700 (PDT) [thread overview]
Message-ID: <Pine.LNX.4.58.0404271753380.20613@dlang.diginsite.com> (raw)
In-Reply-To: <408951CE.3080908@techsource.com>
to answer the fundamental question that was asked in this thread but not
answered.
the reason why we want to compress at the block level instead of over the
entire file is that sometimes we want to do random seeks into the middle
of the file or replace a chunk in the middle of a file (edits, inserts,
etc). by doing the compression in a block the worst that you have to do is
to read that one block, decompress it and get your data out (or modify the
block, compress it and put it back on disk). if your unit of compression
is the entire file each of these options will require manipulating basicly
the entire file (Ok, reads you can possibly stop after you found your
data)
as for those who say that compression isn't useful becouse CPU's are so
much faster then disks, I will argue that that's exactly when the
compression becomes most useful, if your CPU would otherwise be idle
waiting for the data to move to/from disk then the compression is
essentially free and you save time overall by transfering less data
through your IO bottleneck. however the right way to do this may be to put
a compression engine on the drive and allow the OS to request/send either
compressed or uncompressed data, that way if it's CPU bound or the data is
already compressed it won't spend CPU time on it, but if it will compress
the CPU and drive interface compress it to ease the bandwidth load between
them.
David Lang
On Fri, 23 Apr 2004, Timothy Miller wrote:
> Date: Fri, 23 Apr 2004 13:26:38 -0400
> From: Timothy Miller <miller@techsource.com>
> To: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
> Subject: File system compression, not at the block layer
>
> This is probably just another of my silly "they already thought of that
> and someone is doing exactly this" ideas.
>
> I get the impression that a lot of people interested in doing FS
> compression want to do it at the block layer. This gets complicated,
> because you need to allocate partial physical blocks.
>
> Well, why not do the compression at the highest layer?
>
> The idea is something akin to changing this (syntax variation intentional):
>
> tar cf - somefiles* > file
>
> To this:
>
> tar cf - somefiles* | gzip > file
>
> Except doing it transparently and for all files.
>
> This way, the disk cache is all compressed data, and only decompressed
> as it's read or written by a process.
>
> For files below a certain size, this is obviously pointless, since you
> can't save any space. But in many cases, this could speed up the I/O
> for large files that are compressable. (Space is cheap. The only
> reason to compress is for speed.)
>
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
>
--
"Debugging is twice as hard as writing the code in the first place.
Therefore, if you write the code as cleverly as possible, you are,
by definition, not smart enough to debug it." - Brian W. Kernighan
next prev parent reply other threads:[~2004-04-28 1:00 UTC|newest]
Thread overview: 43+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-04-23 17:26 Timothy Miller
2004-04-23 17:30 ` Miquel van Smoorenburg
2004-04-23 17:41 ` Theodore Ts'o
2004-04-23 17:57 ` Jörn Engel
2004-04-23 18:14 ` Timothy Miller
2004-04-23 18:34 ` Paul Jackson
2004-04-23 20:14 ` Joel Jaeggli
2004-04-23 20:34 ` Richard B. Johnson
2004-04-23 20:44 ` Måns Rullgård
2004-04-23 20:59 ` Richard B. Johnson
2004-04-23 21:14 ` Ben Greear
2004-04-23 21:25 ` Timothy Miller
2004-04-24 4:58 ` Ben Greear
2004-04-27 15:45 ` Timothy Miller
2004-04-23 21:18 ` Timothy Miller
2004-04-24 1:28 ` Horst von Brand
2004-04-24 2:24 ` Tom Vier
2004-04-24 7:36 ` Willy Tarreau
2004-04-24 16:02 ` Eric D. Mudama
2004-04-25 3:05 ` Horst von Brand
2004-04-25 7:29 ` Willy Tarreau
2004-04-25 19:50 ` Eric D. Mudama
2004-04-27 15:43 ` Timothy Miller
2004-04-28 0:29 ` Tom Vier
2004-04-23 21:31 ` Joel Jaeggli
2004-04-23 22:20 ` Ian Stirling
2004-04-23 23:34 ` Paul Jackson
2004-04-27 15:42 ` Timothy Miller
2004-04-27 16:02 ` Jörn Engel
2004-04-24 1:18 ` Horst von Brand
2004-04-26 10:22 ` Jörn Engel
2004-04-23 21:15 ` Timothy Miller
2004-04-23 21:36 ` Joel Jaeggli
2004-04-27 20:34 ` Pavel Machek
2004-04-28 22:57 ` Timothy Miller
2004-04-29 9:46 ` Jörn Engel
2004-04-29 9:52 ` Pavel Machek
2004-04-29 10:09 ` Jörn Engel
2004-04-29 10:19 ` Pavel Machek
2004-04-29 17:17 ` Tim Connors
2004-04-28 1:00 ` David Lang [this message]
2004-04-28 10:09 ` Jörn Engel
2004-04-28 10:21 ` Nikita Danilov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Pine.LNX.4.58.0404271753380.20613@dlang.diginsite.com \
--to=dlang@digitalinsight.com \
--cc=linux-kernel@vger.kernel.org \
--cc=miller@techsource.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®