pfsense:network:configure_gigabit_speed_networking
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
pfsense:network:configure_gigabit_speed_networking [2020/11/30 10:49] – created peter | pfsense:network:configure_gigabit_speed_networking [2021/01/06 09:36] (current) – [Edit the bootloader] peter | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== PFSense - Network - Configure Gigabit Speed Networking ====== | ====== PFSense - Network - Configure Gigabit Speed Networking ====== | ||
+ | |||
+ | Some systems may struggle to get full gigabit. | ||
+ | |||
+ | There are many factors that can influence this: | ||
+ | |||
+ | * pfSense by design is able to use only 1 core per connection. | ||
+ | * Routers rarely open just one connection, so a single connection is rarely a bottleneck in the real world. | ||
+ | * Web browsers opens about 8 TCP connections per website, Torrent clients open hundreds of connections, | ||
+ | |||
+ | Many modern NICs have multiple transmit and receive queues, being able to work simultaneously on many connections. | ||
+ | * Intel I210-AT Network Interfaces have 4 transmit and 4 receive queues, and can simultaneously handle 4 connections. | ||
+ | * I211-AT Network Interfaces have 2 transmit/ | ||
+ | |||
+ | With some fine tuning, pfSense can take advantage of this and route at 1Gbit when using more than one connection. | ||
+ | |||
+ | ---- | ||
+ | |||
+ | ===== Configure pfSense ===== | ||
+ | |||
+ | Navigate to **System -> Advanced -> Networking**. | ||
+ | |||
+ | In **Network Interfaces**, | ||
+ | |||
+ | * Hardware Checksum Offloading: | ||
+ | * Hardware TCP Segmentation Offloading | ||
+ | * Hardware Large Receive Offloading | ||
+ | |||
+ | ---- | ||
+ | |||
+ | ===== Edit the bootloader ===== | ||
+ | |||
+ | Edit some settings from the shell. | ||
+ | |||
+ | SSH to the box or connect with the serial cable. | ||
+ | |||
+ | Edit **/ | ||
+ | |||
+ | <file bash / | ||
+ | # agree with Intel license terms | ||
+ | legal.intel_ipw.license_ack=1 | ||
+ | legal.intel_iwi.license_ack=1 | ||
+ | |||
+ | # This is the magic. If you don't set this, queues won't be utilized properly. | ||
+ | # Allow multiple processes for receive/ | ||
+ | hw.igb.rx_process_limit=" | ||
+ | hw.igb.tx_process_limit=" | ||
+ | |||
+ | # More settings to play with below. | ||
+ | |||
+ | # Force NIC to use 1 queue (Don't really need this). | ||
+ | # hw.igb.num_queues=1 | ||
+ | |||
+ | # Give enough RAM to network buffers (default is usually OK). | ||
+ | # kern.ipc.nmbclusters=" | ||
+ | |||
+ | # | ||
+ | # | ||
+ | # | ||
+ | |||
+ | # | ||
+ | # | ||
+ | </ | ||
+ | |||
+ | After saving this file, reboot the router to apply it. | ||
+ | |||
+ | ---- | ||
+ | |||
+ | ===== Test ===== | ||
+ | |||
+ | Run some tests to verify that your settings worked properly. | ||
+ | |||
+ | The easiest way it to use **iperf3** with multiple connections, | ||
+ | |||
+ | On the server run the following command: | ||
+ | |||
+ | <code bash> | ||
+ | iperf3 -s | ||
+ | </ | ||
+ | |||
+ | On your LAN run this command: | ||
+ | |||
+ | <code bash> | ||
+ | iperf3 -c SERVER_IP_HERE -P 4 | ||
+ | </ | ||
+ | |||
+ | If everything went well, you should be seeing about 940Mbit/s throughput, similar to the snippet below: | ||
+ | |||
+ | <code bash> | ||
+ | - - - - - - - - - - - - - - - - - - - - - - - - - | ||
+ | [ 5] 43.00-44.00 | ||
+ | [ 7] 43.00-44.00 | ||
+ | [SUM] 43.00-44.00 | ||
+ | - - - - - - - - - - - - - - - - - - - - - - - - - | ||
+ | [ 5] 44.00-45.00 | ||
+ | [ 7] 44.00-45.00 | ||
+ | [SUM] 44.00-45.00 | ||
+ | - - - - - - - - - - - - - - - - - - - - - - - - - | ||
+ | [ 5] 45.00-46.00 | ||
+ | [ 7] 45.00-46.00 | ||
+ | [SUM] 45.00-46.00 | ||
+ | - - - - - - - - - - - - - - - - - - - - - - - - - | ||
+ | [ 5] 46.00-47.00 | ||
+ | [ 7] 46.00-47.00 | ||
+ | [SUM] 46.00-47.00 | ||
+ | - - - - - - - - - - - - - - - - - - - - - - - - - | ||
+ | [ 5] 47.00-48.00 | ||
+ | [ 7] 47.00-48.00 | ||
+ | [SUM] 47.00-48.00 | ||
+ | </ | ||
+ | |||
+ | If everything went well, you should be seeing about 940Mbit/s throughput. | ||
+ | |||
+ | ---- | ||
+ | |||
pfsense/network/configure_gigabit_speed_networking.1606733394.txt.gz · Last modified: 2020/11/30 10:49 by peter