Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add mining threads user control #319

Merged
merged 2 commits into from
Feb 19, 2024

Conversation

hansieodendaal
Copy link
Contributor

@hansieodendaal hansieodendaal commented Feb 16, 2024

Description

Completed wiring of mining SHA3 and RandomX mining threads into the backend cntainers as this was not implemented fully.

Note: Setting the number of XMRig threads has no effect at this time; it may start to work when the new XMRig Docker image is generated as this default user config file will have been removed:

image

The Docker console screen capture below illustrates that XMRig are started with the correct parameters, but that it has no effect.

/ $ top

Mem: 12756268K used, 19955696K free, 37196K shrd, 1184488K buff, 5864140K cached
CPU:  99% usr   0% sys   0% nic   0% idle   0% io   0% irq   0% sirq
Load average: 15.81 18.38 16.62 22/1051 65
  PID  PPID USER     STAT   VSZ %VSZ CPU %CPU COMMAND
    1     0 tari     S    2408m   7%   7  56% /usr/local/bin/xmrig --config=/dev/null --url=tari_mm_proxy:18081 --user=${TARI_MONERO_WALLET_ADDRESS} --coin=monero --daemon --log-file=/home/tari/xmrig.log --verbose --threads=${TARI_RANDOM_X_NUM_MINING_THREADS} --asm=auto
   57     0 tari     S     1668   0%  19   0% /bin/sh
   65    57 tari     R     1596   0%   4   0% top
/ $ 

/ $ echo /usr/local/bin/xmrig --config=/dev/null --url=tari_mm_proxy:18081 --user=${TARI_MONERO_WALLET_ADDRESS} --coin=monero --daemon --log-file=/home/tari/xmrig.log --verbose --threads=${TARI_RANDOM_X_NUM_MINING_THREADS} --asm=auto
/usr/local/bin/xmrig --config=/dev/null --url=tari_mm_proxy:18081 --user=489r43gR8bDMJNBf4Q6sL9CNERvZQrTqjRCSESqgWQEWWq2UGAfj2voaw3zBtD7U8CQ391Nc1PDHUHiN85yhbZnCDasqzyX --coin=monero --daemon --log-file=/home/tari/xmrig.log --verbose --threads=4 --asm=auto
/ $ 
2024-02-16 13:09:20 [2024-02-16 11:09:20.243] 
2024-02-16 13:09:20 [2024-02-16 11:09:20.243] ^
2024-02-16 13:09:20 [2024-02-16 11:09:20.243] /dev/null<line:1, position:1>: "The document is empty."
2024-02-16 13:09:20  * ABOUT        XMRig/6.21.0 gcc/12.2.1 (built for Linux x86-64, 64 bit)
2024-02-16 13:09:20  * LIBS         libuv/1.44.2 OpenSSL/1.1.1s hwloc/2.9.0
2024-02-16 13:09:20  * HUGE PAGES   supported
2024-02-16 13:09:20  * 1GB PAGES    disabled
2024-02-16 13:09:20  * CPU          12th Gen Intel(R) Core(TM) i7-12700H (1) 64-bit AES VM
2024-02-16 13:09:20                 L2:12.5 MB L3:24.0 MB 10C/20T NUMA:1
2024-02-16 13:09:20  * MEMORY       2.0/31.2 GB (6%)
2024-02-16 13:09:20  * DONATE       1%
2024-02-16 13:09:20  * ASSEMBLY     auto:intel
2024-02-16 13:09:20  * POOL #1      tari_mm_proxy:18081 coin Monero
2024-02-16 13:09:20  * COMMANDS     hashrate, pause, resume, results, connection
2024-02-16 13:09:21 [2024-02-16 11:09:21.717]  net      use daemon tari_mm_proxy:18081  192.168.80.4
2024-02-16 13:09:21 [2024-02-16 11:09:21.717]  net      new job from tari_mm_proxy:18081 diff 29301K algo rx/0 height 3085453 (55 tx)
2024-02-16 13:09:21 [2024-02-16 11:09:21.717]  cpu      use argon2 implementation AVX2
2024-02-16 13:09:21 [2024-02-16 11:09:21.718]  msr      msr kernel module is not available
2024-02-16 13:09:21 [2024-02-16 11:09:21.718]  msr      FAILED TO APPLY MSR MOD, HASHRATE WILL BE LOW
2024-02-16 13:09:21 [2024-02-16 11:09:21.718]  randomx  init dataset algo rx/0 (20 threads) seed 649517a9399403f7...
2024-02-16 13:09:21 [2024-02-16 11:09:21.718]  randomx  allocated 2336 MB (2080+256) huge pages 0% 0/1168 +JIT (0 ms)
2024-02-16 13:09:24 [2024-02-16 11:09:24.188]  randomx  dataset ready (2470 ms)
2024-02-16 13:09:24 [2024-02-16 11:09:24.188]  cpu      use profile  rx  (12 threads) scratchpad 2048 KB
2024-02-16 13:09:24 [2024-02-16 11:09:24.196]  cpu      READY threads 12/12 (12) huge pages 100% 12/12 memory 24576 KB (7 ms)
2024-02-16 13:09:38 [2024-02-16 11:09:38.160]  net      new job from tari_mm_proxy:18081 diff 29301K algo rx/0 height 3085453 (59 tx)
2024-02-16 13:09:54 [2024-02-16 11:09:54.167]  net      new job from tari_mm_proxy:18081 diff 29301K algo rx/0 height 3085453 (64 tx)
2024-02-16 13:10:10 [2024-02-16 11:10:10.153]  net      new job from tari_mm_proxy:18081 diff 29301K algo rx/0 height 3085453 (68 tx)
2024-02-16 13:10:24 [2024-02-16 11:10:24.232]  miner    speed 10s/60s/15m 2900.9 n/a n/a H/s max 3298.5 H/s

Motivation and Context

Users were not able to control the amount of mining threads to use

How Has This Been Tested?

System-level testing

hansieodendaal and others added 2 commits February 16, 2024 12:52
Completed wiring of mining SHA3 and RandomX mining threads
@SWvheerden SWvheerden merged commit 7206849 into tari-project:main Feb 19, 2024
7 checks passed
@hansieodendaal hansieodendaal deleted the ho_mining_threads branch February 19, 2024 10:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants