From 50e76a52ed5b612864427e88b0ea8827927a6ce6 Mon Sep 17 00:00:00 2001 From: ssm Date: Mon, 10 Mar 2008 06:02:00 +0000 Subject: [PATCH] Debian packaging: Allow adjustment of maximum locked memory size git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2580 d4fa192b-c00b-0410-8231-f00ffab90ce4 --- varnish-cache/debian/varnish.default | 5 +++++ varnish-cache/debian/varnish.init | 3 +++ 2 files changed, 8 insertions(+) diff --git a/varnish-cache/debian/varnish.default b/varnish-cache/debian/varnish.default index 07301b55..69164982 100644 --- a/varnish-cache/debian/varnish.default +++ b/varnish-cache/debian/varnish.default @@ -7,6 +7,11 @@ # Maximum number of open files (for ulimit -n) NFILES=131072 +# Maximum locked memory size (for ulimit -l) +# Used for locking the shared memory log in memory. If you increase log size, +# you need to increase this number as well +MEMLOCK=82000 + # Default varnish instance name is the local nodename. Can be overridden with # the -n switch, to have more instances on a single server. INSTANCE=$(uname -n) diff --git a/varnish-cache/debian/varnish.init b/varnish-cache/debian/varnish.init index 9003dbac..1e13a33c 100644 --- a/varnish-cache/debian/varnish.init +++ b/varnish-cache/debian/varnish.init @@ -34,6 +34,9 @@ fi # Open files (usually 1024, which is way too small for varnish) ulimit -n ${NFILES:-131072} +# Maxiumum locked memory size for shared memory log +ulimit -l ${MEMLOCK:-82000} + # If $DAEMON_OPTS is not set at all in /etc/default/varnish, use minimal useful # defaults (Backend at localhost:8080, a common place to put a locally # installed application server.) -- 2.39.5