How do you allocate the hugepages needed by DPDK after the system is already up and running?

How do you allocate the hugepages needed by DPDK after the system is already up and running?

If the Linux system is already running, you can dynamically allocate (or deallocate) hugepages in /sys/kernel/mm/hugepages
For example, the command to allocate 24  2MB pages would be:
echo 24 > /sys/kernel/mm/hugepages/hugepages-2048kB/nr_hugepages

To see the current hugepage allocation, query /proc/meminfo
% grep Huge /proc/meminfo

To set hugepages from grub, edit /etc/grub.conf, adding "hugepages=nnn" to the end of the kernel line for the default kernel and reboot.

1 条帖子 / 0 全新
如需更全面地了解编译器优化,请参阅优化注意事项