SChernykh / p2pool

Decentralized pool for Monero mining
GNU General Public License v3.0
1.03k stars 124 forks source link

Rock64Pro problems: "couldn't allocate randomx cache using large pages" #200

Closed ghost closed 1 year ago

ghost commented 1 year ago

Hello. I have a RockPro64 that I have monerod and p2pool running on at the same time. I am mining to the Rock64Pro with a Ryzen 3950X. The Rock64Pro board has 4GB of RAM. Monero daemon and p2pool combined use up 3.5GB of RAM. When I start p2pool, I get the yellow warning message "couldn't allocate randomx cache using large pages". I set the large pages to 3072, which seems to work, but the error still comes up. The board regularly freezes.

Questions:

  1. Is the "couldn't allocate randomx cache using large pages" warning impacting performance at all?
  2. How might I fix the problem?
  3. Does this board have enough RAM to run p2pool alongside Monero daemon, or should I get a second board to divide up the work?

Thank you in advance for your help

steba000 commented 1 year ago

I'm using a Raspberry pi4 8Gb with monerod and p2pool. xmrig is running in other systems. I setted-up vm.nr_hugepages=525 and this value is right in my configuration. Maybe I can reduce this value to 515-516.

# grep -i huge /proc/meminfo
AnonHugePages:         0 kB
ShmemHugePages:        0 kB
FileHugePages:         0 kB
HugePages_Total:     525
HugePages_Free:       10
HugePages_Rsvd:        0
HugePages_Surp:        0
Hugepagesize:       2048 kB
Hugetlb:         1075200 kB
ghost commented 1 year ago

How do you think I should set huge pages with Rock64Pro that has 4GB of RAM?

SChernykh commented 1 year ago

If you are RAM limited, you should consider --light-mode or --no-randomx option for p2pool.

steba000 commented 1 year ago

How do you think I should set huge pages with Rock64Pro that has 4GB of RAM?

English is not my first language and I don't know if you are kidding me or not... anyway... 5252048 kb=1075200 kB ---> 1Gb 3072 2048 =6291456 kb ---> 6Gb 1Gb < 4Gb < 6Gb Maybe it's still not enough if the kernel uses a lot of memory. I have got also a rockpro64 used for a different project

ghost commented 1 year ago

@SChernykh Will the p2pool be able to handle my Ryzen 3950X @ 20k hashes/sec if it is using --light-mode?

SChernykh commented 1 year ago

hashes/sec doesn't matter, p2pool only checks submitted shares. So any hashrate should work with autodiff or high enough difficulty (30 seconds per share is recommended).

ghost commented 1 year ago

Ok. Does enabling --light-mode hurt my p2pool instance in any way?

SChernykh commented 1 year ago

It will check shares and new p2pool blocks slower (1-2 ms in fast mode vs 10-15 ms in light mode), but it's not critical.

ghost commented 1 year ago

Thank you for your help :)