Background information:
We have latency/freeze problems with our pfSense. To be able to answer the question i will first give some general background information:
- We run pfSense V2.6.0 on following hardware:
- Supermicro mainboard
- Intel(R) Pentium(R) CPU N3710 / AES-NI CPU Crypto: Yes (inactive) / QAT Crypto: No
- 4Gb memory
- CPU load never exceed 50% usage(spikes) / Iddle 5-8%
- Memory never exceeds 15% usage
- Swap usage always 0%
- We have around 45 active ipSec connections
Our problem:
We have an internal PBX (3CX) which we use with their (smartphone) app when we are out of the office. We noticed hick ups/freezes in the conversations so we started searching for the cause.
We noticed that pfSense has sometimes really high ping latencies. When i ping pfSense from my desktop the latency is in general 1ms. Sometimes we see spikes from 2000+ms (see image) These spikes correspond with the freezings during a phone call. Note that the spike occur randomly.
After some testing we noticed that disabling all ipSec connections fixes these spikes. The ipSec connections are only used for really small amounts of data which are send periodically between internal an customer sytems. Most of the time there is no data send over the connections.
We also monitored our incoming and outgoing bandwidth and its never even close to our DSL limits.
ipSec configurations
The most ipSec connections use the same configuration. For the investigation we disabled all different (ca. 5) configurations but still have the issue. The "default" ipSec configuration we use:
<phase1>
<ikeid>*********</ikeid>
<iketype>ikev2</iketype>
<interface>wan</interface>
<remote-gateway>*********</remote-gateway>
<protocol>inet</protocol>
<myid_type>myaddress</myid_type>
<myid_data></myid_data>
<peerid_type>fqdn</peerid_type>
<peerid_data>*********</peerid_data>
<encryption>
<item>
<encryption-algorithm>
<name>aes</name>
<keylen>128</keylen>
</encryption-algorithm>
<hash-algorithm>sha256</hash-algorithm>
<dhgroup>14</dhgroup>
</item>
</encryption>
<lifetime>28800</lifetime>
<pre-shared-key>*********</pre-shared-key>
<private-key></private-key>
<certref></certref>
<caref></caref>
<authentication_method>pre_shared_key</authentication_method>
<descr>*********</descr>
<nat_traversal>on</nat_traversal>
<mobike>off</mobike>
<closeaction></closeaction>
<startaction>none</startaction>
</phase1>
<phase2>
<ikeid>*********</ikeid>
<uniqid>*********</uniqid>
<mode>tunnel</mode>
<reqid>39</reqid>
<localid>
<type>network</type>
<address>*********</address>
<netbits>16</netbits>
</localid>
<remoteid>
<type>network</type>
<address>*********</address>
<netbits>24</netbits>
</remoteid>
<protocol>esp</protocol>
<encryption-algorithm-option>
<name>aes</name>
<keylen>128</keylen>
</encryption-algorithm-option>
<encryption-algorithm-option>
<name>aes128gcm</name>
<keylen>128</keylen>
</encryption-algorithm-option>
<hash-algorithm-option>hmac_sha256</hash-algorithm-option>
<pfsgroup>14</pfsgroup>
<lifetime>3600</lifetime>
<pinghost>*********</pinghost>
<descr>*********</descr>
</phase2>
Question: How can we solve these high pings/freezes?