diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2009-07-03 15:26:16 -0400 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2009-07-03 15:27:22 -0400 |
commit | 059b1aa74b3a3a692a6dba82b7511d56cd91f054 (patch) | |
tree | 532f5a8dd79f692c53a056141a26694267ce0224 /etc/inc/pfsense-utils.inc | |
parent | c66f54e4c8290dde2534454a438ee04f980d9247 (diff) | |
download | pfsense-059b1aa74b3a3a692a6dba82b7511d56cd91f054.zip pfsense-059b1aa74b3a3a692a6dba82b7511d56cd91f054.tar.gz |
Set kern.polling.idle_poll to 1 to match the FreeBSD 4.x behavior. Message from the mailing list:
"Polling and kern.polling.idle_poll" -- freebsd-net -- Jun 30 2009
"A while back I upgraded some old gateways from FreeBSD 4.x to FreeBSD 6.x.
I thought the upgrade had went smoothly, but a while later I started having
users complaining about throughput. Luckly I still had a backup of the
FreebSD 4.x install. Did some throughput tests with iperf. Low and behold
4.x appeared to have twice the throughput. After lots of experimenting I
determined that turning off polling fixed the issue. So I started digging
through the kernel code to see what had changed in the polling logic.
Finally arived at the fact that "kern.polling.idle_poll" defaults to 1 in
4.x and 0 in 6.x and above. Turning polling back on with idle-poll enabled
fixed the performance issue.
The man page for polling states:
kern.polling.idle_poll
Controls if polling is enabled in the idle loop. There are no
reasons (other than power saving or bugs in the scheduler's han-
dling of idle priority kernel threads) to disable this."
Diffstat (limited to 'etc/inc/pfsense-utils.inc')
-rw-r--r-- | etc/inc/pfsense-utils.inc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/etc/inc/pfsense-utils.inc b/etc/inc/pfsense-utils.inc index 8038a63..7e6b5b4 100644 --- a/etc/inc/pfsense-utils.inc +++ b/etc/inc/pfsense-utils.inc @@ -409,6 +409,7 @@ function setup_polling() { } if(isset($config['system']['polling'])) { mwexec("/sbin/ifconfig {$real_interface} polling"); + mwexec("/sbin/sysctl kern.polling.idle_poll=1"); } else { mwexec("/sbin/ifconfig {$real_interface} -polling"); } @@ -1637,4 +1638,4 @@ function compare_hostname_to_dnscache($hostname) { } } -?> +?>
\ No newline at end of file |