Bitcoin Forum

Alternate cryptocurrencies => Mining (Altcoins) => Topic started by: SYMbtc on November 10, 2017, 11:45:59 PM



Title: MEMORY ALLOC FAILED: mlock failed
Post by: SYMbtc on November 10, 2017, 11:45:59 PM
New PC for mining:

AMD Ryzen 1600 CPU
ASRock AB350 Pro 4 Mobo
PowerColor Red Devil RX 580 8GB GPU
4GB Crucial DDR4 RAM
1TB WD Blue SATA HD
EVGA 750W 80+ Platinum PSU
Ubuntu 16.04

First time mining, first time using Linux...

Using XMR-STAK-CPU to mine Monero... With the CPU only, initially the highest I was getting was 220 H/s +/-. After changing the config for the threads now I get high of 452 H/s. And after OC Ryzen to to 3700MHz (stock cooling) I got a high of 502 H/s.

However I am getting an error when running the miner "MEMORY ALLOC FAILED: mlock failed"

Any ideas how to fix it? Thanks!


Title: Re: MEMORY ALLOC FAILED: mlock failed
Post by: harut on November 11, 2017, 01:46:15 AM
From config.txt:

On Linux you will need to configure large page support sudo sysctl -w vm.nr_hugepages=128 and increase your ulimit -l. To do do this you need to add following lines to /etc/security/limits.conf:

* soft memlock 262144
* hard memlock 262144
Save file. You WILL need to log out and log back in for these settings to take affect on your user (no need to reboot, just relogin in your session).

You can also do it Windows-style and simply run-as-root, but this is NOT recommended for security reasons.

Illegal instruction (core dumped)

This typically means you are trying to run it on a CPU that does not have AES. This only happens on older version of miner, new version gives better error message (but still wont' work since your CPU doesn't support the required instructions).


Title: Re: MEMORY ALLOC FAILED: mlock failed
Post by: SYMbtc on November 11, 2017, 02:43:59 AM
I did that earlier today (w/ the stars) and after I rebooted it said it was running in low graphics mode and would not boot into the desktop.  I had to reinstall Ubuntu and kept my personal files.

Did something wrong in the nano text editor? IDK, any other ideas? Thx


Title: Re: MEMORY ALLOC FAILED: mlock failed
Post by: SYMbtc on November 12, 2017, 04:37:23 AM
Looks like fixing that is good for 20% increase H/s so I'm still looking for the solution. 


Title: Re: MEMORY ALLOC FAILED: mlock failed
Post by: SYMbtc on November 22, 2017, 06:30:24 AM
bump :)


Title: Re: MEMORY ALLOC FAILED: mlock failed
Post by: SYMbtc on December 08, 2017, 07:50:50 AM
i will  keep looking i guess :)


Title: Re: MEMORY ALLOC FAILED: mlock failed
Post by: smaxz on December 08, 2017, 08:37:09 AM
whats your config?

run it sudo


Title: Re: MEMORY ALLOC FAILED: mlock failed
Post by: SYMbtc on December 13, 2017, 04:06:09 AM
The only things I have changed in the config file are pool address, my wallet addy and I've configured the cpu threads for my Ryzen 1600 like so;

"cpu_threads_conf" :
[
    { "low_power_mode" : false, "no_prefetch" : true, "affine_to_cpu" : 1 },
    { "low_power_mode" : false, "no_prefetch" : true, "affine_to_cpu" : 3 },
    { "low_power_mode" : false, "no_prefetch" : true, "affine_to_cpu" : 4 },
    { "low_power_mode" : false, "no_prefetch" : true, "affine_to_cpu" : 5 },
    { "low_power_mode" : false, "no_prefetch" : true, "affine_to_cpu" : 7 },
    { "low_power_mode" : false, "no_prefetch" : true, "affine_to_cpu" : 9 },
    { "low_power_mode" : false, "no_prefetch" : true, "affine_to_cpu" : 10 },
    { "low_power_mode" : false, "no_prefetch" : true, "affine_to_cpu" : 11 },
],

but that's about it.