[PATCH] Purge all expired matching objects except the most recent one during hash lookup

Jingyi Wei jyw at epochtimes.com
Wed Dec 17 00:43:06 CET 2014


Hello,

I see that varnish 4.0.2 does not free duplicate objects when ttl is
expired but grace is not expired. Every time when ttl expired it will
fetch a new object and increase memory usage. I set ttl to 1ms and grace
to 1 day and did stress test. Varnish memory usage continued to increase
and soon exceeded the max memory limit, but remained stable at a point.

I made a testing patch on 4.0.2 source release and tried to purge all
expired matching objects except the most recent one during hash lookup,
so the memory of duplicate graced objects will be freed. Any comments?

Thanks,
Jingyi Wei

-------------- next part --------------
A non-text attachment was scrubbed...
Name: purge.patch
Type: text/x-patch
Size: 1394 bytes
Desc: not available
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-dev/attachments/20141216/febd8f37/attachment.bin>


More information about the varnish-dev mailing list