Ulimits and varnish - should I increase?

Lars Jørgensen lajo at kb.dk
Fri Aug 5 15:22:43 CEST 2011


> So, What are those NFILES,MEMLOCK and DAEMON_COREFILE_LIMIT doing... I mean that obviously those are not enough to
> raise those limits in the system? Should I put to security/limits-conf those values for varnish-user or to sysctl
> for all?

No, not enough to raise the limits in the system, but enough to raise them for the (presumably) root user session executing the startup script. If you look at /etc/init.d/varnish, you'll see this in the "start" function:

        # Open files (usually 1024, which is way too small for varnish)
        ulimit -n ${NFILES:-131072}

        # Varnish wants to lock shared memory log in memory.
        ulimit -l ${MEMLOCK:-82000}


-- 
Lars




More information about the varnish-misc mailing list