<html><body bgcolor="#FFFFFF"><div><br><div><br></div></div><div>Le 20 sept. 2011 à 08:57, Your Friend <<a href="mailto:parsimail2001@yahoo.se">parsimail2001@yahoo.se</a>> a écrit :<br><br></div><div>Hello,</div><div><br></div><blockquote type="cite"><div><div style="color:#000; background-color:#fff; font-family:verdana, helvetica, sans-serif;font-size:12pt"><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:#000; background-color:#fff; font-family:verdana, helvetica, sans-serif;font-size:12pt"><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:#000; background-color:#fff; font-family:verdana, helvetica, sans-serif;font-size:12pt"><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="Apple-style-span" style="-webkit-tap-highlight-color: rgba(26, 26, 26, 0.296875); -webkit-composition-fill-color: rgba(175, 192, 227, 0.230469); -webkit-composition-frame-color: rgba(77, 128, 180, 0.230469); "><div>-- </div><div>Aurélien GUILLAUME</div></span></body></html>