I'm using varnish with -s malloc,1G"
It's currently 98% full. Once it completely full what will happen?
With it purge?
Maybe purge old images/pages?
Or better yet purge the files with least amount of hits?
Varnish Cache is a powerful, open source HTTP engine/reverse HTTP proxy that can speed up a website by up to 1000 percent by doing exactly what its name implies: caching (or storing) a copy of a webpage the first time a user visits.
You can use Varnish to cache both dynamic and static content: this is an efficient solution to increase not only your website speed but also your server performance. According to its developers: “It can speed up delivery with a factor of 300 – 1000x, depending on your architecture. “
Varnish provides secure connections for both the client and the backend side. It means that the data shuffled between your Varnish server and the final user and the bytes between the origin server and Varnish are always encrypted, protecting privacy and avoiding data leaks.
Varnish Cache has 1KB overhead per object. So if you have 100,000 objects, Varnish Cache will require 100MB of memory to manage it. We also need to make sure we have enough memory for other things like thread stacks, request workspaces, and everything else that requires memory.
It looks like Varnish uses a LRU (least recently used) strategy to remove items from cache when the cache becomes full with things whose TTL (time to live) has not expired (so first remove things whose TTL is expired, if the cache is still full remove things least recently accessed).
See
https://www.varnish-cache.org/trac/wiki/ArchitectureLRU
Note you can watch the n_lru_nuked
counter to see the rate at which things are being flushed from the cache due to LRU.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With