<html><body><div style="color:#000; background-color:#fff; font-family:verdana, helvetica, sans-serif;font-size:12pt"><div>
<div><span>Hi,</span></div><div><span><br></span></div><div><span>You are</span><span> right about that, the "drop cache" command doesn't affect Varnish cash if I use malloc and Per (Buer) has confirmed it.</span></div><div><span><br></span></div><div><span>I'll disable </span>cache drops and try to fix the memory leak issue in my PHP application.<span><br></span></div><div><br></div><div>Thanks for your answer.</div><div><br></div><div>Best Regards,</div><div>Ali</div>
<span></span><span><br></span></div><div><br></div><div style='font-size: 12pt; font-family: "verdana", "helvetica", sans-serif'><div style='font-size: 12pt; font-family: "times new roman", "new york", "times", serif'><font size="2" face="Arial"><hr size="1"></font>Le 20 sept. 2011 à 08:57,  a écrit :<br><br><div id="yiv905704545"><div>Hello,</div><div><br></div><blockquote type="cite"><div><div style='color: rgb(0, 0, 0); background-color: rgb(255, 255, 255); font-size: 12pt; font-family: "verdana", "helvetica", sans-serif'><div><br></div><div>I'm using malloc for Varnish. I'm using a php application which runs deamons for live streaming (text-streaming) and has a big issue with memory, also memory leak so I desided to use echo 1 > /proc/sys/vm/drop_caches.</div><div><br></div></div></div></blockquote><div><br></div><div>I'm not exactly sure of what you mean by leaking memory. On a Linux system, unused memory is considered wasted. The kernel
 uses this memory to store caches. It will however recycle the pages should an application need some.</div><div><br></div><div>Here you are dropping the caches, so there is "free" memory, but i dont see the point of doing that.</div><div><br></div><div>To have a good estimate of how much memory is available to your applications, look on the second line, in the +/- buffers/caches column of the output of the command "free".</div><br><blockquote type="cite"><div><div style='color: rgb(0, 0, 0); background-color: rgb(255, 255, 255); font-size: 12pt; font-family: "verdana", "helvetica", sans-serif'><div>Here comes the problem! I think this command resets varnish's cache! (not 100% sure.)</div></div></div></blockquote><div><br></div><div>Malloc cache should be considered as application data, not as clean pages, and should not be affected by this operation (can someone confirm this ?)</div><br><blockquote type="cite"><div><div style='color: rgb(0, 0, 0);
 background-color: rgb(255, 255, 255); font-size: 12pt; font-family: "verdana", "helvetica", sans-serif'><div><br></div><div>How can I stop memory leaking without resetting Varnish cache? (my php application is the latest version and I can't replace it with an other application)</div></div></div></blockquote><div><br></div><div>If your application is relatively standard (not using mmap() or other exotic functions (for a php app), you should try to disable cache drops. Nothing should change, and your apps may even run faster.</div><div><br></div>Best regards,<br><span class="yiv905704545Apple-style-span" style=""><div>-- </div><div>Aurélien GUILLAUME</div></span></div><br><br></div></div></div></body></html>