diff options
author | Ermal Luçi <eri@pfsense.org> | 2008-07-22 15:41:04 +0000 |
---|---|---|
committer | Ermal Luçi <eri@pfsense.org> | 2008-07-22 15:41:04 +0000 |
commit | 04f4a1160a20f77f74ad25acd37aaecc41b58f72 (patch) | |
tree | 0cafe4593c3c18f8596251d78ebc218f3eb17927 | |
parent | 2b937162d1065625ecceff72c333146c0ac34be9 (diff) | |
download | pfsense-04f4a1160a20f77f74ad25acd37aaecc41b58f72.zip pfsense-04f4a1160a20f77f74ad25acd37aaecc41b58f72.tar.gz |
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
-rw-r--r-- | etc/inc/system.inc | 19 |
1 files changed, 13 insertions, 6 deletions
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 = <<<EOC + "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 +?> |