From 639aaa954cc2c87aa0d85fef1659d3f0c5afdcb9 Mon Sep 17 00:00:00 2001 From: Bill Marquette Date: Wed, 17 Oct 2007 23:51:26 +0000 Subject: MFC of change [19782] per request from sullrich@ Scale state table size with memory, never allocate more than 10% system ram, this leads to 12K states on 128M and 102K on 1G systems - this should be a good default --- usr/local/www/includes/functions.inc.php | 6 +++--- usr/local/www/system_advanced.php | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'usr/local') diff --git a/usr/local/www/includes/functions.inc.php b/usr/local/www/includes/functions.inc.php index 7cb93fb..21a89f3 100644 --- a/usr/local/www/includes/functions.inc.php +++ b/usr/local/www/includes/functions.inc.php @@ -71,14 +71,14 @@ function get_pfstate() { global $config; $matches = ""; if (isset($config['system']['maximumstates']) and $config['system']['maximumstates'] > 0) - $maxstates="/{$config['system']['maximumstates']}"; + $maxstates="{$config['system']['maximumstates']}"; else - $maxstates="/10000"; + $maxstates=pfsense_default_state_size(); $curentries = `/sbin/pfctl -si |grep current`; if (preg_match("/([0-9]+)/", $curentries, $matches)) { $curentries = $matches[1]; } - return $curentries . $maxstates; + return $curentries . "/" . $maxstates; } function has_temp() { diff --git a/usr/local/www/system_advanced.php b/usr/local/www/system_advanced.php index f4c9bd4..b0adaa1 100755 --- a/usr/local/www/system_advanced.php +++ b/usr/local/www/system_advanced.php @@ -626,7 +626,7 @@ include("head.inc");
Maximum number of connections to hold in the firewall state table.
- Note: Leave this blank for the default of 10000 + Note: Leave this blank for the default. On your system the default size is: -- cgit v1.1