3
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
6
<html xmlns="http://www.w3.org/1999/xhtml">
8
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
10
<title>Sizing your cache — Varnish version 3.0.2 documentation</title>
11
<link rel="stylesheet" href="../_static/default.css" type="text/css" />
12
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
13
<script type="text/javascript">
14
var DOCUMENTATION_OPTIONS = {
17
COLLAPSE_INDEX: false,
22
<script type="text/javascript" src="../_static/jquery.js"></script>
23
<script type="text/javascript" src="../_static/underscore.js"></script>
24
<script type="text/javascript" src="../_static/doctools.js"></script>
25
<link rel="top" title="Varnish version 3.0.2 documentation" href="../index.html" />
26
<link rel="up" title="Using Varnish" href="index.html" />
27
<link rel="next" title="Put Varnish on port 80" href="putting_varnish_on_port_80.html" />
28
<link rel="prev" title="Logging in Varnish" href="logging.html" />
34
<li class="right" style="margin-right: 10px">
35
<a href="../genindex.html" title="General Index"
36
accesskey="I">index</a></li>
38
<a href="putting_varnish_on_port_80.html" title="Put Varnish on port 80"
39
accesskey="N">next</a> |</li>
41
<a href="logging.html" title="Logging in Varnish"
42
accesskey="P">previous</a> |</li>
43
<li><a href="../index.html">Varnish version 3.0.2 documentation</a> »</li>
44
<li><a href="index.html" accesskey="U">Using Varnish</a> »</li>
48
<div class="document">
49
<div class="documentwrapper">
50
<div class="bodywrapper">
53
<div class="section" id="sizing-your-cache">
54
<h1>Sizing your cache<a class="headerlink" href="#sizing-your-cache" title="Permalink to this headline">¶</a></h1>
55
<p>Picking how much memory you should give Varnish can be a tricky
56
task. A few things to consider:</p>
58
<div><ul class="simple">
59
<li>How big is your <em>hot</em> data set. For a portal or news site that
60
would be the size of the front page with all the stuff on it, and
61
the size of all the pages and objects linked from the first page.</li>
62
<li>How expensive is it to generate an object? Sometimes it makes sense
63
to only cache images a little while or not to cache them at all if
64
they are cheap to serve from the backend and you have a limited
65
amount of memory.</li>
66
<li>Watch the n_lru_nuked counter with <a class="reference internal" href="../reference/varnishstat.html#reference-varnishstat"><em>varnishstat</em></a> or some other
67
tool. If you have a lot of LRU activity then your cache is evicting
68
objects due to space constraints and you should consider increasing
69
the size of the cache.</li>
72
<p>Be aware that every object that is stored also carries overhead that
73
is kept outside the actually storage area. So, even if you specify -s
74
malloc,16G varnish might actually use <strong>double</strong> that. Varnish has a
75
overhead of about 1k per object. So, if you have lots of small objects
76
in your cache the overhead might be significant.</p>
83
<div class="sphinxsidebar">
84
<div class="sphinxsidebarwrapper">
85
<h4>Previous topic</h4>
86
<p class="topless"><a href="logging.html"
87
title="previous chapter">Logging in Varnish</a></p>
89
<p class="topless"><a href="putting_varnish_on_port_80.html"
90
title="next chapter">Put Varnish on port 80</a></p>
92
<ul class="this-page-menu">
93
<li><a href="../_sources/tutorial/sizing_your_cache.txt"
94
rel="nofollow">Show Source</a></li>
96
<div id="searchbox" style="display: none">
98
<form class="search" action="../search.html" method="get">
99
<input type="text" name="q" size="18" />
100
<input type="submit" value="Go" />
101
<input type="hidden" name="check_keywords" value="yes" />
102
<input type="hidden" name="area" value="default" />
104
<p class="searchtip" style="font-size: 90%">
105
Enter search terms or a module, class or function name.
108
<script type="text/javascript">$('#searchbox').show(0);</script>
111
<div class="clearer"></div>
113
<div class="related">
116
<li class="right" style="margin-right: 10px">
117
<a href="../genindex.html" title="General Index"
120
<a href="putting_varnish_on_port_80.html" title="Put Varnish on port 80"
123
<a href="logging.html" title="Logging in Varnish"
125
<li><a href="../index.html">Varnish version 3.0.2 documentation</a> »</li>
126
<li><a href="index.html" >Using Varnish</a> »</li>
130
© Copyright 2010, Varnish Project.
131
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7.
b'\\ No newline at end of file'