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
    Commented Feb 20, 2018 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
    Commented Feb 21, 2018 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
    Commented Feb 27, 2018 at 0:02

2 Answers 2


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!

  • 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
    Commented Feb 20, 2018 at 3:05

I guess that Huge pages are supported from Raspberry PI 4B. The supported huge page sizes are:

 - 1 GB
 - 32 MB
 - 2 MB (default)
 - 64 KB

As a side note, for more details, I posted an answer on StackOverflow which explains how to configure and use them. But it is for Raspberry Pi OS 64 bits (formerly called Raspbian).

  • Your answer doesn't fit the question. For a start, you cannot run Raspbian Strech on a Pi 4. You'd better ask a new question (and answer it) if you feel like sharing your findings. And don't just link to an SO question, explain how to enable huge pages on a Pi and what are the benefits of doing so. Commented Nov 25, 2020 at 10:28
  • @DmitryGrigoryev: The answer at least says that Huge Pages are likely not supported on RPI3 which is part of the question no ?
    – Rachid K.
    Commented Nov 25, 2020 at 15:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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