xmr-stak starts with MEMORY ALLOC FAILED

Let’s start to mine some worthy coins, we load our xmr-stak and get the error of memory allocation field:

root@ubuntu-System-Product-Name:~/xmr-stak/build/bin# ./xmr-stak 
[2018-01-26 16:41:02] : MEMORY ALLOC FAILED: mmap failed
[2018-01-26 16:41:02] : MEMORY ALLOC FAILED: mmap failed
[2018-01-26 16:41:02] : MEMORY ALLOC FAILED: mmap failed
[2018-01-26 16:41:02] : MEMORY ALLOC FAILED: mmap failed
[2018-01-26 16:41:02] : MEMORY ALLOC FAILED: mmap failed
-------------------------------------------------------------------
xmr-stak 2.2.0 2ae7260

[2018-01-26 16:41:02] : Start mining: MONERO
[2018-01-26 16:41:02] : Starting NVIDIA GPU thread 0, no affinity.
[2018-01-26 16:41:02] : MEMORY ALLOC FAILED: mmap failed
[2018-01-26 16:41:02] : WARNING: No AMD OpenCL platform found. Possible driver issues or wrong vendor driver.
[2018-01-26 16:41:02] : WARNING: backend AMD disabled.
[2018-01-26 16:41:02] : Starting 1x thread, affinity: 0.
[2018-01-26 16:41:02] : hwloc: memory pinned
[2018-01-26 16:41:02] : Starting 1x thread, affinity: 1.
[2018-01-26 16:41:02] : MEMORY ALLOC FAILED: mmap failed
[2018-01-26 16:41:02] : hwloc: memory pinned
[2018-01-26 16:41:02] : Starting 1x thread, affinity: 2.
[2018-01-26 16:41:02] : MEMORY ALLOC FAILED: mmap failed
[2018-01-26 16:41:03] : hwloc: memory pinned

Ok, no problem, just increase the number of the huge pages available to the system with:

sysctl -w vm.nr_hugepages=128

And now you can start xmr-stak without errors of this kind!

Leave a Reply

Your email address will not be published. Required fields are marked *