You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Jeff Shearer <je...@shearer-family.org> on 2011/01/31 12:57:53 UTC

[users@httpd] compression on hard disks

I have been using compression to minimize network traffic and am now wondering if Apache can be configure to use compressed files stored on disk.  This question also drives a second question: if Apache can use compressed files stored on hard disks, can Apache simply pass the compression through to the client?

Please feel free to share your insights about the use of such configurations if you have any..

Thanks.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] compression on hard disks

Posted by Eric Covener <co...@gmail.com>.
On Mon, Jan 31, 2011 at 6:57 AM, Jeff Shearer <je...@shearer-family.org> wrote:
> I have been using compression to minimize network traffic and am now wondering if Apache can be configure to use compressed files stored on disk.  This question also drives a second question: if Apache can use compressed files stored on hard disks, can Apache simply pass the compression through to the client?
>
> Please feel free to share your insights about the use of such configurations if you have any..

You can use multiviews/mod_negotiation to do this, if you link to a
filename with no extesnions at all.

-- 
Eric Covener
covener@gmail.com

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] compression on hard disks

Posted by Tom Evans <te...@googlemail.com>.
On Mon, Jan 31, 2011 at 12:06 PM, Rich Bowen <rb...@rcbowen.com> wrote:
> File compression and decompression happens within your operating system, and Apache doesn't care. That is, it requests the file from the OS and the OS hands it over. Apache has no concern or interest in how that file is stored on, or retrieved from, disk.
>
> This means, of course, that when Apache receives the file, it is no longer compresses. So apart from the performance hit in decompression, it doesn't notice at all. It also means that no, it can't pass that compression through to the client. It can, however, recompress it using mod_deflate.
>
> From a website performance perspective, compressed filesystems are a bad idea. Presumably you have other considerations?
>

Pretty sure the OP meant pre-compressed files, so Apache doesn't have
to compress them itself, and serve them with mod_negotiation, which
several other people have already commented on, so I'll skip that.

Compressed filesystems are a bad idea for serving files from. However
they may have other uses; I use a lzjb compressed /var/log partition
on ZFS, and that is quite handy from a performance POV.

Cheers

Tom

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] compression on hard disks

Posted by Rich Bowen <rb...@rcbowen.com>.
On Jan 31, 2011, at 6:57 AM, Jeff Shearer wrote:

> I have been using compression to minimize network traffic and am now wondering if Apache can be configure to use compressed files stored on disk.  This question also drives a second question: if Apache can use compressed files stored on hard disks, can Apache simply pass the compression through to the client?
> 
> Please feel free to share your insights about the use of such configurations if you have any..


File compression and decompression happens within your operating system, and Apache doesn't care. That is, it requests the file from the OS and the OS hands it over. Apache has no concern or interest in how that file is stored on, or retrieved from, disk.

This means, of course, that when Apache receives the file, it is no longer compresses. So apart from the performance hit in decompression, it doesn't notice at all. It also means that no, it can't pass that compression through to the client. It can, however, recompress it using mod_deflate.

From a website performance perspective, compressed filesystems are a bad idea. Presumably you have other considerations?

--
Rich Bowen
rbowen@rcbowen.com


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] compression on hard disks

Posted by Joost de Heer <jo...@sanguis.xs4all.nl>.
On Mon, January 31, 2011 12:57, Jeff Shearer wrote:
> I have been using compression to minimize network traffic and am now
> wondering if Apache can be configure to use compressed files stored on
> disk.  This question also drives a second question: if Apache can use
> compressed files stored on hard disks, can Apache simply pass the
> compression through to the client?
>
> Please feel free to share your insights about the use of such
> configurations if you have any..

I've never tested this:
http://mark.aufflick.com/blog/2007/12/06/serve-pre-compressed-content-with-apache

Joost

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org