Symptom:
- Apply to pfSense starting version 2.0 and still seen in version 2.3.3 (I have no idea about older builds)- Issue occurs in Kernel-based VM and VirtualBox, I have not tested in other virtualization platform as well as a pfSense physical box - Relatively high CPU utilization is observed through the hypervisor level (e.g. Linux "top" command in Kernel-based VM)
- Depending on virtualization platform, the issue may not be easily noticed. The most significant scenario for me is a VirtualBox deployment within Windows 10 on an Intel Core i5-2510M which the pfSense will utilize a full core (25% CPU utilization observed from Windows Task Manager)
- Changing the virtualized hardware architecture doesn't help (e.g. changing CPU emulation type, changing between standard hardware or virtio drivers)
Causes:
- The system timer of the pfSense is drawing excessive CPU time, interestingly the utilization cannot be observed within the pfSense (either dashboard or other monitoring pages), it is only the hypervisor host who reports the high CPU utilization. This leads to a long troubleshooting time as one might not convinced that this is a guest-only issue.- Seems the root cause relies on FreeBSD but I did not confirm this.
Resolution:
- Below resolution will resolve the high CPU utilization (reduce from 25% CPU utilization observed above in Core i5-2510M environment down to 3% with no additional changes made) but will result in lower response time. However I did not notice any difference in daily usage (as a normal home user).- Add the below lines to /boot/loader.conf.local within the pfSense environment
(Enter the Shell by SSH to the pfSense machine with admin account and Enter "8")
# disable CPU frequency/voltage throttling control
hint.p4tcc.0.disabled=1
hint.acpi_throttle.0.disabled=1
# disable local APIC timers
hint.apic.0.clock=0
kern.hz=100
# saves 128 interrupts per second per core at the cost of reduced scheduling precision
hint.atrtc.0.clock=0
- The pfSense requires a restart to make the changes effective Reference: