Performance Optimization¶
This section presents some guidelines to get optimal performance from the fast path with FPN-SDK Add-on for DPDK.
Set up your BIOS¶
To get optimal performance, you may have to edit your BIOS settings.
For instance, the following parameters can enhance performance on an Intel Ivy-Bridge platform:
BIOS CPU Setting |
Value |
---|---|
Intel(R) QPI Frequency Select |
Auto Max |
Intel(R) Turbo Boost Technology |
Disabled |
Enhanced Intel SpeedStep(R) Tech |
Disabled |
Processor C3 |
Disabled |
Processor C6 |
Disabled |
Intel(R) Hyper-Threading Tech |
Enabled |
Active Processor Cores |
All |
Execute Disable Bit |
Enabled |
Intel(R) Virtualization Technology |
Enabled |
Intel(R) VT for Directed I/O |
Enabled |
|
Enabled |
|
Disabled |
|
Enabled |
|
Enabled |
Intel(R) TXT |
Disabled |
Enhanced Error Containment Mode |
Disabled |
MLC Streamer |
Enabled |
MLC Spatial Prefetcher |
Enabled |
DCU Data Prefetcher |
Enabled |
DCU Instruction Prefetcher |
Enabled |
Direct Cache Access (DCA) |
Enabled |
Extended ATR |
0x01 |
See also
Allocate logical cores to the fast path¶
NICs, PCI slots, ports and cores¶
NICs are attached to PCI slots, which are attached to sockets. NICs are recognized as fast path ports.
Cores allocation¶
When starting the fast path via the fast-path.sh
script, some logical cores are
allocated to the fast path, and other logical cores, to the other Linux processes.
You can specify which logical cores are allocated to the fast path via the
/etc/fast-path.env
fast path configuration file FP_MASK
parameter.
Important
Never allocate core 0
to the fast path.
Example
Allocate logical cores 2
, 3
, 18
and 19
to the fast path:
: ${FP_MASK:=2,3,18,19}
Note
Logical core numbering can change between platforms and should be determined beforehand.
Make sure logical cores poll only ports located on the same socket¶
As the fast path constantly polls the NICs, it is critical that logical cores allocated to the fast path do not poll ports located on a different socket. Otherwise, memory accesses constantly traverse the processor interconnect, which may lead to a bottleneck.
Map ports and logical cores¶
If you set CORE_PORT_MAPPING
manually in the fast path configuration file, you must
map ports and logical cores to fit your network architecture, as illustrated in the
topologies below. By default (when CORE_PORT_MAPPING
is set to auto
), the
core/port mapping already matches these constraints.
To specify which fast path logical cores poll which ports, edit the fast path fast-path.env
configuration file CORE_PORT_MAPPING
parameter.
Topology 1: as many logical cores as ports on the same socket¶
When there are as many fast path logical cores as ports, each core should poll one different port:
Topology 2: not as many logical cores as ports on the same socket¶
When there are not as many fast path logical cores as ports, the easiest topology to implement is one of the following, where all fast path logical cores poll all ports. These topologies often offer a good support of borderline cases.
You can also test other configurations to better suit your needs.
Prevent packets from being processed on different sockets¶
For even better performance, try to prevent too many packets from being processed on different sockets. This avoids overloading the processor interconnect.