1

Today, when I ran DPDK on Ubuntu, I got this error:

$ sudo mount -t hugetlbfs -o pagesize=1G none /dev/hugepages
mount: mount point /dev/hugepages does not exist

Can anyone tell me how to fix this? Thanks.

David
  • 3,367

3 Answers3

0

In order to use 1GB huge pages for DPDK please follow the steps as

  1. edit the /etc/default/grub as grub default_hugepagesz=1G hugepagesz=1G hugepages=1 (for 1GB 1 Huge page)
  2. update the grub settings via update-grub tool.
  3. to mount the huge page to desired mkdir /dev/huge1G; mount -t hugetlbfs -o pagesize=1G none /dev/huge1G
  4. Start DPDK application with rte_eal_init args as --huge-dir=/dev/huge1G

Note: these can be performed on a Linux Kernel which has enabled Huge pages. To check if huge pages are built execute grep -nr HUGE /boot/config*

CONFIG_HUGETLBFS=y
CONFIG_HUGETLB_PAGE=y
0

I am using DPDK on ubuntu with low latency kernel (3.16.0-33-lowlatency #44~14.04.1-Ubuntu SMP PREEMPT). I used the quick start link below to configure it and it works okay for me.

http://dpdk.org/doc/quick-start

For 1G huge pages support, did you set the kernel parameters "default_hugepagesz=1G hugepagesz=1G hugepages=4" in /boot/grub/grub.conf file?

https://embedded.communities.intel.com/thread/6681

But I haven't tried this though.

0

for Ubuntu 16.04 the init scripts in the packaging can help you to get this persistent and taken care of the mountpoints.

Essentially you can set NR_2M_PAGES=4096 or NR_1G_PAGES=8 The scripts will try to allocate them early (not as early as the kernel command line solution) and ensure that some dpdk compatible hugepage mountpoints are available.

See more at: https://help.ubuntu.com/16.04/serverguide/DPDK.html#dpdk-config-hp