httpd-bugs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 41111] New: - New option for mod_deflate: do compression only if there are spare CPU cycles
Date Wed, 06 Dec 2006 03:08:35 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=41111>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=41111

           Summary: New option for mod_deflate: do compression only if there
                    are spare CPU cycles
           Product: Apache httpd-2
           Version: 2.3-HEAD
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: mod_deflate
        AssignedTo: bugs@httpd.apache.org
        ReportedBy: apache@harkless.org


It would be nice if mod_deflate had a directive you could use to tell it to only
do compression if there are spare CPU cycles available.  I'm concerned about
turning on mod_deflate because of the increased load on my server, especially if
I were to be hit by badly-behaved robots, parallel downloaders, Slashdotting, etc.

Defining "spare CPU cycles available" could be a bit tricky, of course.  It'd be
great to be able to just tell it not to compress if doing so would peg the CPU
to 100% (or a user-definable threshhold), but implementing that would be tricky
since different content can be more or less CPU-intensive to attempt to
compress.  An average-case or worst-case guess could be used, but it'd still
vary by CPU type and speed as to how much of a dent that overhead would have on
available CPU cycles.  I suppose it'd have to benchmark itself to have good
predictive ability, which would be starting to get pretty complex.

A simpler approach could be to have the directive be called, e.g.
DeflateIfCPUUsageBelow.  If the user specified 'DeflateIfCPUUsageBelow 75',
mod_deflate would check to see if current CPU usage were below 75% in order to
compress the given content.  The user would be left to do their own measurements
to see how much overhead mod_deflate uses for compression and thus where to set
that threshhold.

And perhaps instead of basing the decision on instantaneous CPU usage for the
current CPU, it'd make more sense for the directive to work in terms of load
averages, although I've always found those somewhat fuzzy and hard to use as a
basis for decision-making.

In any case, I think this would be a nice option because machines whose
bandwidth is constrained enough to make mod_deflate highly desirable are often
going to also not be the *fastest* machines in the world.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


Mime
View raw message