slow down decay to accommodate for long polling and other tiny reqs

This commit is contained in:
Sam 2013-11-19 14:47:13 +11:00
parent ef64c1b757
commit 2841434e36

View file

@ -60,7 +60,9 @@ module Middleware::UnicornOobgc
new_delta = (delta * 1.5).to_i
@max_delta = [new_delta, delta].min
else
new_delta = (delta * 0.99).to_i
# this may seem like a very tiny decay rate, but some apps using caching
# can really mess stuff up, if our delta is too low the algorithm fails
new_delta = (delta * 0.995).to_i
@max_delta = [new_delta, delta].max
end