Skip to content

RandomX: added parameter for scratchpad prefetch mode - #1823

Merged
xmrig merged 1 commit into
xmrig:devfrom
SChernykh:dev
Sep 4, 2020
Merged

xmrig merged 1 commit into
xmrig:devfrom
SChernykh:dev

Conversation

@SChernykh

Copy link
Copy Markdown
Contributor

scratchpad_prefetch_mode can have 4 values:

0: off
1: use prefetcht0 instruction (default, same as previous XMRig versions)
2: use prefetchnta instruction (faster on Coffee Lake and a few other CPUs)
3: use mov instruction

`scratchpad_prefetch_mode` can have 4 values:
0: off
1: use `prefetcht0` instruction (default, same as previous XMRig versions)
2: use `prefetchnta` instruction (faster on Coffee Lake and a few other CPUs)
3: use `mov` instruction
@xmrig xmrig added this to the v6 milestone Sep 4, 2020
@xmrig
xmrig merged commit 0f09883 into xmrig:dev Sep 4, 2020
@Lonnegan

Copy link
Copy Markdown

Can you please explane for non-programmers what the different parameters do and where the advantages and disadvantages might be? Is there an advantage on systems, that are not dedicated for mining but are used for daily work when prefetch is set to 0, so that inner core traffic is reduced? Why is prefetchnta faster on Coffee Lake than prefetcht0? Might mov be an advantage on CPUs, that have bad built-in prefetchers and if, what CPUs are that for example? :)

@SChernykh

Copy link
Copy Markdown
Contributor Author

I don't have answers to some of these questions. I only observed that mode 2 is a tiny bit faster on some Intel CPUs, but didn't find a clear pattern. There should be no difference for other programs running together with miner.

@kowalabearhugs

Copy link
Copy Markdown

I observe a small hashrate increase on some Intel Xeon Westmere CPUs when switching prefetch modes.

2x xeon X5650 w/ 24gb in tri-channel (6x 4gb sticks)
msr: enabled
huge pages: true
1gb pages: true

prefetch mode 1
~3250 h/s

prefetch mode 2
~3320 h/s

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.

4 participants