Squid performance on pfSense 2.3
-
Hi,
The settings below were copied from a forum post, that I used to help improve performance of squid on pfSense 2.2. Could anyone advise if these settings are still needed on 2.3?
add this to the /boot/loader.conf kern.ipc.nmbclusters=32768 kern.maxfiles=65536 kern.maxfilesperproc=32768 net.inet.ip.portrange.last=65535 or just delete it and replace with autoboot_delay="1" #kern.ipc.nmbclusters="0" hint.apic.0.disabled=1 kern.hz=100 #for squid kern.ipc.nmbclusters="32768" kern.maxfiles="65536" kern.maxfilesperproc="32768" net.inet.ip.portrange.last="65535" you might ask why squid is so slow? its because default configuration of pfsense is router not as a server thats why kern.ipc.nmbclusters="0" <- is set to zero. if you just simply remove this squid will be just fine. but to tune the squid i add this kern.ipc.nmbclusters: 32768 kern.maxfiles=65536 kern.maxfilesperproc=32768 net.inet.ip.portrange.last: 65535
-
Hi,
The settings below were copied from a forum post, that I used to help improve performance of squid on pfSense 2.2. Could anyone advise if these settings are still needed on 2.3?
add this to the /boot/loader.conf kern.ipc.nmbclusters=32768 kern.maxfiles=65536 kern.maxfilesperproc=32768 net.inet.ip.portrange.last=65535 or just delete it and replace with autoboot_delay="1" #kern.ipc.nmbclusters="0" hint.apic.0.disabled=1 kern.hz=100 #for squid kern.ipc.nmbclusters="32768" kern.maxfiles="65536" kern.maxfilesperproc="32768" net.inet.ip.portrange.last="65535" you might ask why squid is so slow? its because default configuration of pfsense is router not as a server thats why kern.ipc.nmbclusters="0" <- is set to zero. if you just simply remove this squid will be just fine. but to tune the squid i add this kern.ipc.nmbclusters: 32768 kern.maxfiles=65536 kern.maxfilesperproc=32768 net.inet.ip.portrange.last: 65535
I believe kern.ipc.nmbclusters is the only /boot/loader.conf.local variable you need to set. All of the other settings are managed by pfSense/FreeBSD and are bigger than the values recommended for pfSense 2.2 and earlier:
[2.3.2-DEVELOPMENT][root@pfSense.lan]/root/scripts: sysctl net.inet.ip.portrange.last net.inet.ip.portrange.last: 65535 [2.3.2-DEVELOPMENT][root@pfSense.lan]/root/scripts: sysctl kern.maxfilesperproc kern.maxfilesperproc: 232389 [2.3.2-DEVELOPMENT][root@pfSense.lan]/root/scripts: sysctl kern.maxfiles kern.maxfiles: 258216 [2.3.2-DEVELOPMENT][root@pfSense.lan]/root/scripts: sysctl kern.ipc.nmbclusters kern.ipc.nmbclusters: 1000000 [2.3.2-DEVELOPMENT][root@pfSense.lan]/root/scripts:
Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.