[Mod_gzip] cpu performance !?

Justin mod_gzip@lists.over.net
Fri, 13 Dec 2002 20:16:06 -0500


I've been using mod_gzip for a long time
  version 1.3.14.6e
its been flawless in terms of sending out compressed html,
for the urls that I wish to be compressed.. saved me a 
bundle in bandwidth costs.

BUT..

today I noticed very poor performance on a big page of
html .. 200k of it when uncompressed. At the bottom of
the page, I have mod_perl report me cpu usage so i can
easily check..  it was 6 seconds of cpu .. on a 2x1ghz
machine.

I switched to the non compressed URL, and cpu usage drops
to 0.5seconds (the page is dynamically generated by mod_perl
either way).. even though 200k comes over a regular dsl
line now instead of 20k, the page loads up much faster and
also renders in a more snappy way too as the browser does
not have to decompress.

I timed gzip on the same 200k html file, and found it uses
no cpu at all .. a few ms, as you'd expect.

So my question is.. why is mod_gzip so CPU intensive for
just gzipping something that command line gzip can do? 
is it just this old version, has there been a truly startling
performance bug fixed since 1.3.14 ??

I don't mind, you know, 5x slower than command line gzip,
but something seems wrong to be 1000s of times slower..

thanks
-Justin