Intel® Ethernet Controller E810 Data Plane Development Kit (DPDK) 22.11/23.03
Configuration Guide
Hugepages Setup
Hugepage support is required for the large memory pool allocation used for packet buffers. By using hugepage allocations, performance is increased since fewer pages are needed, and therefore less Translation Lookaside Buffers (TLBs, high speed translation caches), which reduce the time it takes to translate a virtual page address to a physical page address. Without hugepages, high TLB miss rates would occur with the standard 4K page size, slowing performance.
For 1 GB pages
It is not possible to reserve the hugepage memory after the system has booted. The size must be specified explicitly and can also be optionally set as the default hugepage size for the system.
The 1 GB hugepage option can be added in Grub along with IOMMU in kernel command line, as shown in High Performance of Small Packets on 100G NIC- Use 16 Bytes Rx Descriptor Size.
To reserve 4 GB of hugepage memory in the form of four 1 GB pages, the following options should be passed to the kernel:
Once the hugepage memory is reserved, to make the memory available for DPDK use, execute the following:
For 1 GB pages, the mount point can be made permanent across reboots, by adding the following line to the /etc/fstab file:
- Create a mounting point for huge pages with auto-mount.
cd /mnt mkdir huge - Modify /etc/fstab to include:
nodev /mnt/huge hugetlbfs pagesize=1GB 0 0 - Modify and update grub to set up hugepages.
# /etc/default/grub GRUB_CMDLINE_LINUX="default_hugepagesz=1G hugepagesz=1G hugepages=4" For RHEL:
grub2-mkconfig -o /boot/grub/grub.cfg For Ubuntu:
Update-grub - Reboot the system and check Huge Page allocation.
# cat /proc/meminfo | grep HugePages_Total HugePages_Total: 4 # cat /proc/meminfo | grep Hugepagesize Hugepagesize: 1048576 kB
For 2 MB pages
Hugepages can be allocated after the system has booted. This is done by echoing the number of hugepages required to a nr_hugepages file in the /sys/devices/ directory.
For a single-node system, the command to use is as follows (assuming that 1024 pages are required):
On a NUMA machine, pages should be allocated explicitly on separate nodes: