5
Picking how much memory you should give Varnish can be a tricky
6
task. A few things to consider:
8
* How big is your *hot* data set. For a portal or news site that
9
would be the size of the front page with all the stuff on it, and
10
the size of all the pages and objects linked from the first page.
11
* How expensive is it to generate an object? Sometimes it makes sense
12
to only cache images a little while or not to cache them at all if
13
they are cheap to serve from the backend and you have a limited
15
* Watch the n_lru_nuked counter with :ref:`reference-varnishstat` or some other
16
tool. If you have a lot of LRU activity then your cache is evicting
17
objects due to space constraints and you should consider increasing
18
the size of the cache.
20
Be aware that every object that is stored also carries overhead that
21
is kept outside the actually storage area. So, even if you specify -s
22
malloc,16G varnish might actually use **double** that. Varnish has a
23
overhead of about 1k per object. So, if you have lots of small objects
24
in your cache the overhead might be significant.