mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
tune down min requests, tune up largest multiplier, tune up history
This commit is contained in:
parent
466459db51
commit
a92ada0493
@ -5,8 +5,8 @@
|
|||||||
# hook unicorn
|
# hook unicorn
|
||||||
module Middleware::UnicornOobgc
|
module Middleware::UnicornOobgc
|
||||||
|
|
||||||
MIN_REQUESTS_PER_OOBGC = 6
|
MIN_REQUESTS_PER_OOBGC = 5
|
||||||
MAX_DELTAS = 20
|
MAX_DELTAS = 25
|
||||||
|
|
||||||
def self.init
|
def self.init
|
||||||
# hook up HttpServer intercept
|
# hook up HttpServer intercept
|
||||||
@ -45,7 +45,7 @@ module Middleware::UnicornOobgc
|
|||||||
|
|
||||||
if @gc_live_num && @num_requests > MIN_REQUESTS_PER_OOBGC
|
if @gc_live_num && @num_requests > MIN_REQUESTS_PER_OOBGC
|
||||||
largest = @previous_deltas.max
|
largest = @previous_deltas.max
|
||||||
if largest * (2 + Random.rand(2)) + new_live_num > @gc_live_num
|
if (largest * 3) + new_live_num > @gc_live_num
|
||||||
puts "OobGC invoked"
|
puts "OobGC invoked"
|
||||||
GC.start
|
GC.start
|
||||||
@num_requests = 0
|
@num_requests = 0
|
||||||
|
Loading…
Reference in New Issue
Block a user