WyvernTKC / cpuminer-gr-avx2

Optimised Version of GR miner for RTM
GNU General Public License v2.0
375 stars 195 forks source link

Huge Pages allocation failed on Ubuntu 21.10 #136

Open jmakov opened 2 years ago

jmakov commented 2 years ago

Thanks for your work!

Using Ubuntu 21.10, compiled from source and run with sudo I get Huge Pages allocation failed. I've followed https://github.com/WyvernTKC/cpuminer-gr-avx2/issues/35 and managed to reduce 12 warning to 2. Would be glad to get any hints.

$ cat /proc/meminfo|grep -i huge
AnonHugePages:    944128 kB
ShmemHugePages:        0 kB
FileHugePages:         0 kB
HugePages_Total:      41
HugePages_Free:       41
HugePages_Rsvd:        0
HugePages_Surp:        0
Hugepagesize:       2048 kB
Hugetlb:           83968 kB

Log:

$ sudo ./cpuminer -a gr --benchmark --tune-full

         **********  cpuminer-opt-gr 1.2.4  *********** 
     A CPU miner with multi algo support and optimized for CPUs
     with AVX512, SHA and VAES extensions by JayDDee.
     with Ghostrider Algo by Ausminer & Delgon.
     Jay D Dee's BTC donation address: 12tdvfF7KmAsihBXQXynT6E6th2c2pByTT

Prepared for Linux
CPU: Intel(R) Core(TM) i9-8950HK CPU @ 2.90GHz
SW built on Nov 27 2021 with GCC 11.2.0
CPU features:  AVX2    AES
SW features:   AVX2    AES
Algo features: AVX2   VAES

[2021-11-27 04:31:31] Could not load 'tune_config' file
[2021-11-27 04:31:31] Could not find/load 'tune_config' file. Miner will perform tuning operation.
[2021-11-27 04:31:31] Default tuning process takes ~154 minutes to finish.
[2021-11-27 04:31:31] "tune-full": true, takes ~222 minutes.
[2021-11-27 04:31:31] Starting tune-full tuning (~222 minutes)
[2021-11-27 04:31:31] Add "no-tune": true, to your config to disable it.
[2021-11-27 04:31:31] Failed to initialize Large Pages on node0
[2021-11-27 04:31:31] Huge Pages set up successfully.
[2021-11-27 04:31:31] MSR set up successfully.
[2021-11-27 04:31:31] 12 of 12 miner threads started using 'gr' algorithm
[2021-11-27 04:31:32] Huge Pages allocation failed.
[2021-11-27 04:31:32] Huge Pages allocation failed.
[2021-11-27 04:31:32] Testing rotation: 01.1 (0 0 X X 0 X) -> Dark + Darklite + Fast
[2021-11-27 04:31:32] Testing: Dark (1way) + Darklite (1way) + Fast (1way) - 0/2160 0.0% ~220.0 min remaining.
[2021-11-27 04:31:38] Hashrate (Avg. for rotation 01.1):        387.09 H/s      -> 32.26 H/s per thread.
[2021-11-27 04:31:44] Hashrate (Avg. for rotation 01.1):        367.49 H/s      -> 30.62 H/s per thread.
[2021-11-27 04:31:44] Testing: Dark (2way) + Darklite (1way) + Fast (1way) - 2/2160 0.1% ~219.8 min remaining.
[2021-11-27 04:31:51] Hashrate (Avg. for rotation 01.1):        366.91 H/s      -> 30.58 H/s per thread.
michal-zurkowski commented 2 years ago

Try this for now. I'll try to investigate what might be the problem on 21.10. sudo sysctl -w vm.nr_hugepages=64

jmakov commented 2 years ago

Thank you for the super fast response! Sadly that doesn't change anything. On 20.04 everything works out of the box though. I've also tried to set memlock in /etc/security/limits.conf without success.

For some reason only now (after a few hours after applying your suggestion) HugePages_Total changed from 42 to 47, leaving me with only 1 warning left. While running cpuminer:

$ cat /proc/meminfo|grep -i huge
AnonHugePages:    944128 kB
ShmemHugePages:        0 kB
FileHugePages:         0 kB
HugePages_Total:      47
HugePages_Free:        3
HugePages_Rsvd:        0
HugePages_Surp:        0
Hugepagesize:       2048 kB
Hugetlb:           96256 kB
Professor333 commented 2 years ago

I'm also on 21.10 and getting the Huge Pages allocation failed error. Commenting for visibility