Limit object count

Reinis Rozitis r at roze.lv
Tue Jul 4 04:09:30 CEST 2017


Hello,
is there a way to limit maximum cached object count in Varnish or better 
handle OOM situation?

I use only file backend storage (on SSDs) and the nodes have 32Gb ram.
While the maximum object count was previously limited by the backend storage 
now after upgrading the ssd capacity varnish triggers OOM killer (no swap on 
the instance) and restarts after reaching 35M objects which kind of makes 
sense considering the 1Kb per object overhead.

So what would be the best way to handle it (besides adding more ram)?
Based on average object size just limit the backend storage size so no more 
than ~30M objects fit / tweak the TTL so older objects get evicted sooner / 
add swap?


rr





More information about the varnish-misc mailing list