Project

General

Profile

Feature #1505

Enable mod_compress to abandon compression when load average is too high

Added by Anonymous over 9 years ago. Updated 10 months ago.

Status:
Fixed
Priority:
Normal
Assignee:
-
Category:
mod_compress
Target version:
Start date:
Due date:
% Done:

100%

Estimated time:
Missing in 1.5.x:

Description

mod_compress can really make things faster but its performance is very compromised if the CPU is too busy with other tasks. So, this mod should be able to be auto-suspended if loadavg (/proc/loadavg) gets too high, reaching a value set in lighttpd.conf with a grace period.

Doing so, in any scenario, mod_compress will only boost performance, not making it worse.

-- ubuntu

mod_compress_load_avg.patch (3.56 KB) mod_compress_load_avg.patch origo, 2009-06-11 09:29

Associated revisions

Revision 1f3ad401 (diff)
Added by gstrauss 10 months ago

[mod_deflate] skip deflate if loadavg too high (fixes #1505)

[mod_deflate] skip deflate if 1 min loadavg too high
deflate.max-loadavg = "3.50" # express value as string of float num

[mod_compress] skip compression if 1 min loadavg too high
compress.max-loadavg = "3.50" # express value as string of float num

Feature available on BSD-like systems which have getloadavg() in libc

Note: load average calculations are different on different operating
systems and different types of system loads, so there is no value that
can be recommended for one-size-fits-all.

x-ref:
"Enable mod_compress to abandon compression when load average is too high"
https://redmine.lighttpd.net/issues/1505

History

#1 Updated by origo about 8 years ago

Simple/proposed patch for adding config option "compress.max-load-avg", and checking "/proc/loadavg" every 10 seconds.

Known 'flaw': mod_compress will NOT deliver cached already compressed files if load is considered too high, but will deliver the uncompressed file (as if mod_compress was disabled).

#2 Updated by gstrauss about 1 year ago

  • Assignee deleted (jan)

#3 Updated by gstrauss about 1 year ago

  • Target version deleted (1.5.0)

#4 Updated by gstrauss 10 months ago

  • Subject changed from Enable mod_compress to abadon compression when load average is too high to Enable mod_compress to abandon compression when load average is too high
  • Description updated (diff)
  • Status changed from New to Patch Pending
  • Target version set to 1.4.43

#5 Updated by gstrauss 10 months ago

  • Status changed from Patch Pending to Fixed
  • % Done changed from 0 to 100

Also available in: Atom