Hi,

You areright about that, the "drop cache" command doesn't affect Varnish cash 
if I use malloc and Per (Buer) has confirmed it.

I'll disable cache drops and try to fix the memory leak issue in my PHP 
application.


Thanks for your answer.

Best Regards,
Ali



________________________________
Le 20 sept. 2011 à 08:57,  a écrit :


Hello,


>
>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.
>
>

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.

Here you are dropping the caches, so there is "free" memory, but i dont see the 
point of doing that.

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".

Here comes the problem! I think this command resets varnish's cache! (not 100% 
sure.)

Malloc cache should be considered as application data, not as clean pages, and 
should not be affected by this operation (can someone confirm this ?)


>
>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)

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.
Best regards,
-- 
Aurélien GUILLAUME
_______________________________________________
varnish-misc mailing list
[email protected]
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc

Reply via email to