How can I enable huge pages in Raspbian Stretch? I have followed instructions for Debian (https://wiki.debian.org/Hugepages#Enabling_HugeTlbPage) without success (reboot puts my Pi 3 into 'emergency' mode, can't log back in, have to start with a fresh image). I have also tried (from https://github.com/xmrig/xmrig/issues/32):

sudo sysctl -w vm.nr_hugepages=5

But this has no effect (since the file 'nr_hugepages' does not exist).

Is there something specific for Raspbian that I'm missing?

  • And you are shure that the kernel have been compiled with hugepages support? – MatsK Feb 20 '18 at 7:09
  • 1
    I'm not fully sure. I've had no luck finding specific discussion of huge pages in the official Raspberry Pi forums (raspberrypi.org/forums), but huge pages are supported in Debian (from which Raspbian is ported). I've submitted a post with the same question to the official Raspberry Pi forum: we'll see what they say. – whit Feb 21 '18 at 12:46
  • My thread at raspberrypi.org/forums/viewtopic.php?t=206014 hasn't gained much traction: It has supplied a few new references, which might be useful to someone with more experience, but nothing I'm able to distill into a procedure so far... – whit Feb 27 '18 at 0:02

Based on the information I can find online (example here), I don't believe the ARM Cortex-A7 used in the Raspberry Pi supports Huge Pages in the L1 TLB, so it most likely won't work properly due to the Hardware itself.

If someone finds a more definitive answer, please let us know!

| improve this answer | |
  • 1
    Great reference! I hadn't seen that, and I can't pretend to understand it all (my linux-fu is not strong). The capabilities of the ARM are of importance here: the Cortex-A7 for the Pi 2 and the Cortex-A53 for the later Pi 2's and Pi 3's. I'll keep looking. – whit Feb 20 '18 at 3:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.