<HTML>
<HEAD>
<TITLE>Re: Vanrish 2.1.5 eating memory, hit % decrease</TITLE>
</HEAD>
<BODY>
<FONT SIZE="4"><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'>Thanks for those advises, I’ll try with 131072 and see If I can get a better behavior already.<BR>
<BR>
Jef<BR>
<BR>
<BR>
Le 08/04/11 23:09, « Ken Brownfield » a écrit :<BR>
<BR>
</SPAN></FONT></FONT><BLOCKQUOTE><FONT SIZE="4"><SPAN STYLE='font-size:11pt'><FONT FACE="Georgia, Times New Roman">I forgot about your min_free_kbytes question:<BR>
<BR>
While I would personally recommend 131072 as <I>a starting point</I>, this value does not translate directly to what is actually retained as free RAM.  In my experience, the kernel's behavior is non-linear, non-deterministic, and very delicate.  Usually the kernel will keep much more free RAM than specified (2-3x), and modifying this value too often under load will cause permanent behavior problems in the kernel.<BR>
<BR>
Setting it to 10% is a terrible idea under any circumstance I can imagine.  The goal with this setting in the context of a backing-store cache is to set it high enough that you have 5-15 seconds of read/write I/O throughput available for bursts.  For example, if Varnish is committing 5MB/s to/from disk, make sure you have 25-75MB of RAM free at a minimum.  This might only translate to a min_free_kbytes of 12000-30000.<BR>
<BR>
I'd strongly suggest modifying the value slowly and carefully, ideally only once after a reboot via sysctl.conf.  But once done, my 1TB -spersistent Varnish instances became very stable.<BR>
-- <BR>
kb<BR>
</FONT><FONT FACE="Calibri, Verdana, Helvetica, Arial"><BR>
<BR>
<BR>
On Fri, Apr 8, 2011 at 13:55, Ken Brownfield <kbrownfield@google.com> wrote:<BR>
</FONT></SPAN></FONT><BLOCKQUOTE><FONT SIZE="4"><SPAN STYLE='font-size:11pt'><FONT FACE="Georgia, Times New Roman">This means the child process died and restarted (the reason for this should appear earlier in the log; perhaps your cli_timeout is too low under a heavily loaded system -- try 20s).<BR>
<BR>
"-sfile" is not persistent storage, so when the child process restarts it uses a new, empty storage structure.  You should have luck with "-spersistent" on the latest Varnish or trunk, at least for child process restarts.<BR>
<BR>
FWIW,<BR>
-- <BR>
kb<BR>
</FONT><FONT FACE="Calibri, Verdana, Helvetica, Arial"><BR>
<BR>
<BR>
On Fri, Apr 8, 2011 at 01:55, Jean-Francois Laurens <jean-francois.laurens@rts.ch> wrote:<BR>
</FONT></SPAN></FONT><BLOCKQUOTE><FONT SIZE="4"><SPAN STYLE='font-size:11pt'><FONT FACE="Calibri, Verdana, Helvetica, Arial">Hi Ken,<BR>
<BR>
Thanks for the hint ! <BR>
You’re affecting here 128Mb, how did you get to this munber ? I read somewhere that this value can be set to 10% of the actual memory size which would be in my case 800Mb, does it make sense for you ?<BR>
I read aswell that setting this value to high would crash the system immediately.<BR>
<BR>
<BR>
Yesterday evening, the system was in heavy load but varnish did not hang !<BR>
Instead it dropped all its objects ! Then the load went back fine.<BR>
It seems setting –sfile to 40Gb suits better the memory capability for this server.<BR>
A question remains though ... Why all the objects were dropped ?<BR>
Attached is a plot from cacti regarding the number of objects.<BR>
<BR>
The only thing I could get form the messages log is this :<BR>
Apr  7 19:00:29 server-01-39 varnishd[3732]: Child (3733) died signal=3<BR>
Apr  7 19:00:29 server-01-39 varnishd[3732]: Child cleanup complete<BR>
Apr  7 19:00:29 server-01-39 varnishd[3732]: child (29359) Started<BR>
Apr  7 19:00:29 server-01-39 varnishd[3732]: Child (29359) said <BR>
Apr  7 19:00:29 server-01-39 varnishd[3732]: Child (29359) said Child starts<BR>
Apr  7 19:00:29 server-01-39 varnishd[3732]: Child (29359) said managed to mmap 42949672960 bytes of 42949672960<BR>
<BR>
<BR>
How could I get to know what is realy happening that could explain this behaviour ?<BR>
<BR>
Cheers,<BR>
Jef<BR>
</FONT></SPAN></FONT></BLOCKQUOTE></BLOCKQUOTE><FONT SIZE="4"><SPAN STYLE='font-size:11pt'><FONT FACE="Calibri, Verdana, Helvetica, Arial"><BR>
<BR>
<HR ALIGN=CENTER SIZE="3" WIDTH="95%"></FONT></SPAN><FONT FACE="Consolas, Courier New, Courier"><SPAN STYLE='font-size:10pt'>_______________________________________________<BR>
varnish-misc mailing list<BR>
varnish-misc@varnish-cache.org<BR>
<a href="http://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc">http://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc</a><BR>
</SPAN></FONT></FONT></BLOCKQUOTE><FONT SIZE="4"><FONT FACE="Consolas, Courier New, Courier"><SPAN STYLE='font-size:10pt'><BR>
</SPAN></FONT></FONT><FONT COLOR="#808080"><FONT FACE="Arial"><SPAN STYLE='font-size:9pt'>Jean-Francois Laurens<BR>
</SPAN><FONT SIZE="4"><SPAN STYLE='font-size:10pt'>Ingénieur Système Unix<BR>
Resources et Développement<BR>
Secteur Backend<BR>
</SPAN></FONT><SPAN STYLE='font-size:9pt'><B>RTS - Radio Télévision Suisse<BR>
</B>Quai Ernest-Ansermet 20                        <BR>
Case postale 234                                    <BR>
CH - 1211 Genève 8<BR>
T +41 (0)58 236 81 63<BR>
</SPAN></FONT></FONT><FONT SIZE="4"><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:10pt'><BR>
</SPAN></FONT></FONT>
</BODY>
</HTML>