varnish cach question
footplus at gmail.com
Tue Sep 20 09:24:48 CEST 2011
Le 20 sept. 2011 à 08:57, Your Friend <parsimail2001 at yahoo.se> a écrit :
> 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.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the varnish-misc