From 04f4a1160a20f77f74ad25acd37aaecc41b58f72 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ermal=20Lu=C3=A7i?= Date: Tue, 22 Jul 2008 15:41:04 +0000 Subject: Make the GUI fast and capable of working in environments with RAM less than 128. Actually this make the GUI on this system respond faster than in an ALIX with 256MB RAM. Tested on: Soekris, Wrap, VMware environments --- etc/inc/system.inc | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) (limited to 'etc') diff --git a/etc/inc/system.inc b/etc/inc/system.inc index c882aad..98c8034 100644 --- a/etc/inc/system.inc +++ b/etc/inc/system.inc @@ -738,12 +738,12 @@ function system_generate_lighty_config($filename, } if($avail > 97 and $avail < 128) { - $max_procs = 2; - $max_requests = 1; + $max_procs = 1; + $max_requests = 3; } if($avail > 127 and $avail < 256) { - $max_procs = 2; + $max_procs = 1; $max_requests = 5; } @@ -765,9 +765,16 @@ function system_generate_lighty_config($filename, ), EOC; - } else { + } else if ($avail > 0 and $avail < 128) { + $bin_environment = << ( + "PHP_FCGI_CHILDREN" => "1", + "PHP_FCGI_MAX_REQUESTS" => "{$max_requests}" + ), + +EOC; + } else $bin_environment = ""; - } if($fast_cgi_enable == true) { $module = "\"mod_fastcgi\", \"mod_cgi\""; @@ -1303,4 +1310,4 @@ function enable_watchdog() { } } -?> \ No newline at end of file +?> -- cgit v1.1