Huge system load when starting Varnish Cache

Pentium100 pentium100 at gmail.com
Sat Feb 18 00:20:32 CET 2017


Hello,

I am using Varnish Cache to cache IPTV (hls format) segments. It usually
works really well, serving 1-3gpbs of traffic. However, if, for some
reason, I need to restart it, then shortly after it starts it takes up all
CPU (all 24 threads) for "system" until it allocates the set memory limit
(malloc,6GB).

During that time (a few minutes), the requests from clients are served
slow. This is expected since the cache is still not populated, however, the
huge system load slows down the whole sever and makes other services slow
as well.

This problem happens with Varnish version 2.1.5 (the one in the default
repository for CentOS6) and with version 4.0.4.

If the backend is too slow for some reason, then Varnish usually just keeps
using all CPU all the time. Increasing the memory limit above 6GB makes the
startup process much longer (too long to wait for it in higher load
conditions).

Is there a way to limit the system load during this process?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-misc/attachments/20170218/18b1b0ca/attachment.html>


More information about the varnish-misc mailing list