~ubuntu-branches/debian/sid/varnish/sid

« back to all changes in this revision

Viewing changes to doc/sphinx/=build/html/tutorial/sizing_your_cache.html

  • Committer: Package Import Robot
  • Author(s): Stig Sandbeck Mathisen
  • Date: 2011-10-29 15:23:24 UTC
  • mfrom: (0.1.15)
  • Revision ID: package-import@ubuntu.com-20111029152324-tdtlsurrv22ysknj
Tags: 3.0.2-1
* New upstream release
* Build from upstream tarball instead of git tag
* debian/watch: more specific regular expression

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
 
 
2
 
 
3
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
 
4
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
5
 
 
6
<html xmlns="http://www.w3.org/1999/xhtml">
 
7
  <head>
 
8
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
 
9
    
 
10
    <title>Sizing your cache &mdash; 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 = {
 
15
        URL_ROOT:    '../',
 
16
        VERSION:     '3.0.2',
 
17
        COLLAPSE_INDEX: false,
 
18
        FILE_SUFFIX: '.html',
 
19
        HAS_SOURCE:  true
 
20
      };
 
21
    </script>
 
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" /> 
 
29
  </head>
 
30
  <body>
 
31
    <div class="related">
 
32
      <h3>Navigation</h3>
 
33
      <ul>
 
34
        <li class="right" style="margin-right: 10px">
 
35
          <a href="../genindex.html" title="General Index"
 
36
             accesskey="I">index</a></li>
 
37
        <li class="right" >
 
38
          <a href="putting_varnish_on_port_80.html" title="Put Varnish on port 80"
 
39
             accesskey="N">next</a> |</li>
 
40
        <li class="right" >
 
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> &raquo;</li>
 
44
          <li><a href="index.html" accesskey="U">Using Varnish</a> &raquo;</li> 
 
45
      </ul>
 
46
    </div>  
 
47
 
 
48
    <div class="document">
 
49
      <div class="documentwrapper">
 
50
        <div class="bodywrapper">
 
51
          <div class="body">
 
52
            
 
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>
 
57
<blockquote>
 
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>
 
70
</ul>
 
71
</div></blockquote>
 
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>
 
77
</div>
 
78
 
 
79
 
 
80
          </div>
 
81
        </div>
 
82
      </div>
 
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>
 
88
  <h4>Next topic</h4>
 
89
  <p class="topless"><a href="putting_varnish_on_port_80.html"
 
90
                        title="next chapter">Put Varnish on port 80</a></p>
 
91
  <h3>This Page</h3>
 
92
  <ul class="this-page-menu">
 
93
    <li><a href="../_sources/tutorial/sizing_your_cache.txt"
 
94
           rel="nofollow">Show Source</a></li>
 
95
  </ul>
 
96
<div id="searchbox" style="display: none">
 
97
  <h3>Quick search</h3>
 
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" />
 
103
    </form>
 
104
    <p class="searchtip" style="font-size: 90%">
 
105
    Enter search terms or a module, class or function name.
 
106
    </p>
 
107
</div>
 
108
<script type="text/javascript">$('#searchbox').show(0);</script>
 
109
        </div>
 
110
      </div>
 
111
      <div class="clearer"></div>
 
112
    </div>
 
113
    <div class="related">
 
114
      <h3>Navigation</h3>
 
115
      <ul>
 
116
        <li class="right" style="margin-right: 10px">
 
117
          <a href="../genindex.html" title="General Index"
 
118
             >index</a></li>
 
119
        <li class="right" >
 
120
          <a href="putting_varnish_on_port_80.html" title="Put Varnish on port 80"
 
121
             >next</a> |</li>
 
122
        <li class="right" >
 
123
          <a href="logging.html" title="Logging in Varnish"
 
124
             >previous</a> |</li>
 
125
        <li><a href="../index.html">Varnish version 3.0.2 documentation</a> &raquo;</li>
 
126
          <li><a href="index.html" >Using Varnish</a> &raquo;</li> 
 
127
      </ul>
 
128
    </div>
 
129
    <div class="footer">
 
130
        &copy; Copyright 2010, Varnish Project.
 
131
      Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7.
 
132
    </div>
 
133
  </body>
 
134
</html>
 
 
b'\\ No newline at end of file'