From ab90376264f9344a3c95579b15ee7932e43fc179 Mon Sep 17 00:00:00 2001 From: Scott Ullrich Date: Tue, 27 Apr 2010 15:14:49 -0400 Subject: Allow defining of minworkers, maxworkers and timeoutworkers values for the number of operating threads --- config/varnish64/varnish.inc | 16 ++++++++++++++-- config/varnish64/varnish_settings.xml | 18 ++++++++++++++++++ 2 files changed, 32 insertions(+), 2 deletions(-) (limited to 'config') diff --git a/config/varnish64/varnish.inc b/config/varnish64/varnish.inc index 5011d878..4bdd06ed 100644 --- a/config/varnish64/varnish.inc +++ b/config/varnish64/varnish.inc @@ -54,7 +54,19 @@ function sync_package_varnish() { if($vs['listeningport']) $listeningport = "-a :{$vs['listeningport']}"; else - $listeningport = "-a :80"; + $listeningport = "-a :80"; + if($vs['minworkers']) + $minworkers = "{$vs['minworkers']}"; + else + $minworkers = "200"; + if($vs['maxworkers']) + $maxworkers = "{$vs['maxworkers']}"; + else + $maxworkers = "4000"; + if($vs['timeoutworkers']) + $timeoutworkers = "{$vs['timeoutworkers']}"; + else + $timeoutworkers = "50"; } $fd = fopen("/usr/local/etc/rc.d/varnish.sh", "w"); $rc_file = <<Enter the port you would like varnish to listen on. Defaults to 80. input + + Minimum worker threads + minworkers + Enter the minimum number of varnish worker threads. + input + + + Maximum worker threads + maxworkers + Enter the maximum number of varnish worker threads. + input + + + Worker thread timeout + timeoutworkers + Enter the timeout time for the worker threads. + input + -- cgit v1.2.3