Swap flushes all objects in cache

MAGNIEN, Thierry thierry.magnien at sfr.com
Mon Nov 17 14:12:43 CET 2014


Hi,

Are you sure you're not hitting a case where your kernel OOM kills varnish child ? In that case, obviously you lose all your cached content.

Regards,
Thierry

---------------------
De : varnish-dev-bounces+thierry.magnien=sfr.com at varnish-cache.org [mailto:varnish-dev-bounces+thierry.magnien=sfr.com at varnish-cache.org] De la part de Anand Shah
Envoyé : lundi 17 novembre 2014 14:05
À : varnish-dev at varnish-cache.org; phk
Objet : Swap flushes all objects in cache

Hello,

When Linux pages outs data to disk; it destroys all cached objects which is contrary to the architecture published by PHK.

When physical memory becomes scarce the Linux memory management subsystem must attempt to free physical pages. This task falls to the kernel swap daemon (kswapd). Linux does not swap out all of the swappable pages of the process that it has selected; instead it removes only a small number of pages.

Pages cannot be swapped or discarded if they:

are locked in memory,
are shared; there is a separate, explicit, mechanism for swapping out these pages.


Here we have been observing anything that swaps discards all the objects present in the cache and all items are disqualified from a successful HIT object. We have been extensively using Ganglia to observe the system behaviour. I am also attaching two images that describes the condition mentioned in the email. Here i am not certain if varnish should behave this way or not? 


Varnish version : varnishd (varnish-4.0.1 revision 4354e5e)




Regards,
Anand


More information about the varnish-dev mailing list