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

[Improvement] Simplify multihash settings #209

Closed
electroape opened this issue Nov 5, 2018 · 12 comments
Closed

[Improvement] Simplify multihash settings #209

electroape opened this issue Nov 5, 2018 · 12 comments

Comments

@electroape
Copy link

Make 'threads' option controls both main threads and multihash threads.

If 'threads' is greater than CPU's logical threads count then miner adds additional multihash threads with the same mask\priority as main threads. I.e, first physical cores, then logical cores.

PS: One question about multihash. Why automatic settings with CN-Lite (1MB footprint) on 4-core CPU with 6 MB LLC is 3 main threads + 3 multihash threads ? In that case 4 main threads + 2 multihash threads yield better HR by my experience. Or i'm wrong here ?

@djfinch
Copy link

djfinch commented Nov 5, 2018

Because 4 main threads will occupy physical cores and multihash thread will be assigned to logical core which is not effective. It's always better to run threads on physical cores only. So 3x 1MB scratchpad on first three physical (3MB of L2) and then 3*Multihash on last physical core (remaining 3MB of L2).

@electroape
Copy link
Author

No, it not like that. If i let it assign threads automatically it assigns 3 main threads and 2x multihash on all 3 main threads.

And i may be wrong but to assign multihash you need to have main thread, so 3 main threads and 3x multihash on one more thread as you described will be 4 main threads and 4x multihash on one of them.

@electroape
Copy link
Author

electroape commented Nov 5, 2018

Atleast it's what i assume it does. I see 3 main threads and hf=2 so there will be additional 3 2x multihash threads on those 3 main threads.

[2018-11-05 19:57:22] * CPU: Intel(R) Core(TM) i5-3470 CPU @ 3.20GHz (1) x64 AES-NI ASM-INTEL
[2018-11-05 19:57:22] * CPU L2/L3: 1.0 MB/6.0 MB
[2018-11-05 19:57:22] * THREADS: 3, cryptonight-lite, aes=1, hf=2, donate=1%, affinity=auto
[2018-11-05 19:57:22] * POOL #1: x:3388
[2018-11-05 19:57:22] * POOL #2: trtl.pool.mine2gether.com:1115
[2018-11-05 19:57:22] * CC Server: x:3344
[2018-11-05 19:57:22] * COMMANDS: hashrate, pause, resume, quit
[2018-11-05 19:57:22] Starting thread 2/3 affined to core: #2 -> huge pages: 1/1 scratchpad: 2.0 MB
[2018-11-05 19:57:22] Starting thread 1/3 affined to core: #0 -> huge pages: 1/1 scratchpad: 2.0 MB
[2018-11-05 19:57:22] Starting thread 3/3 affined to core: #1 -> huge pages: 1/1 scratchpad: 2.0 MB

@Bendr0id
Copy link
Owner

Bendr0id commented Nov 5, 2018

Is max cpu usage set to 100?

@electroape
Copy link
Author

It was 99, chaned it to 100 and now it assigns only 4 main threads and no multihash ...

[2018-11-05 20:10:54] * VERSIONS: XMRigCC/1.8.1 (based on XMRig) libuv/1.14.1 gcc/7.3.0 (RELEASE with TLS)
[2018-11-05 20:10:54] * CPU: Intel(R) Core(TM) i5-3470 CPU @ 3.20GHz (1) x64 AES-NI ASM-INTEL
[2018-11-05 20:10:54] * CPU L2/L3: 1.0 MB/6.0 MB
[2018-11-05 20:10:54] * THREADS: 4, cryptonight-lite, aes=1, hf=1, donate=1%, affinity=auto
[2018-11-05 20:10:54] * POOL #1: x:3388
[2018-11-05 20:10:54] * POOL #2: trtl.pool.mine2gether.com:1115
[2018-11-05 20:10:54] * CC Server: x:3344
[2018-11-05 20:10:54] * COMMANDS: hashrate, pause, resume, quit
[2018-11-05 20:10:54] Starting thread 4/4 affined to core: #3 -> huge pages: 1/1 scratchpad: 1.0 MB
[2018-11-05 20:10:54] Starting thread 3/4 affined to core: #1 -> huge pages: 1/1 scratchpad: 1.0 MB
[2018-11-05 20:10:54] Starting thread 2/4 affined to core: #2 -> huge pages: 1/1 scratchpad: 1.0 MB
[2018-11-05 20:10:54] Starting thread 1/4 affined to core: #0 -> huge pages: 0/1 scratchpad: 1.0 MB

@Bendr0id
Copy link
Owner

Bendr0id commented Nov 5, 2018

Ok thats what i expected. The whole multihash auto adjustment is really basic implemented. It doesnt fill all the cache up with as much as it can. Only works if cache >= threads * scratchpadsize * 2 (or 3,4,5). So if all threads would fit in.

@electroape
Copy link
Author

Yeah, i think i seen that behaviour earlier, that's why i configure each miner's thread\multihash config manually, but that's pain in the ass with ~100 ish miners, even with CC. What do you think about my templates suggestion ? Too much work ?

@Bendr0id
Copy link
Owner

Bendr0id commented Nov 5, 2018

Template implementation like you described is a 0.5btc task. Basic template is already on the roadmap. But if you have 100+ different types of miners that isnt useful at all. So for this case improving the auto detect feature is more useful i guess.

@djfinch
Copy link

djfinch commented Nov 5, 2018

Looking back into your #206 and your problem is Windows :/ .. I have just 15 machines which need very different configs, too, and using Ansible to put pre-configured variants of config there. To switch pools --> use proxy.

@electroape
Copy link
Author

Template implementation like you described is a 0.5btc task. Basic template is already on the roadmap. But if you habe 100+ different types of miners that isnt useful at all. So for this case improving the auto detect feature is more useful i guess.

Oh, i seen your reply to #206 now. Yeah, basic template just for switching pools\algo will be great, maybe add miner's version dependence to assign another pool+algo to old version miners which is impossible to update yet for PoW change.

@electroape
Copy link
Author

In the light of addition of CN-Ultralight and it's ultra-tiny scratchpad - this stuff becomes even more useful.

There's no way to say, assign multihash factors of 2x to 2 threads and 3x to other 2 threads. Other miners can do that, but not XMRig.

xmr-stak for example has config for each core separately, but the way i suggested (only by 'threads' control, assuming 'multihash-factor' is set to 0\auto) must be easier to implement and use.

@Bendr0id
Copy link
Owner

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants