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

[RX] randomx linux booster script #2637

Merged

Conversation

psychocrypt
Copy link
Collaborator

Add booster script to enable huge pages and manipulate the caching
behavior.

@psychocrypt psychocrypt added feature backend cpu randomX issue with xmr-stak-rx labels Dec 16, 2019
@psychocrypt psychocrypt changed the title randomx linux booster script [RX] randomx linux booster script Dec 16, 2019
elif cat /proc/cpuinfo | grep -q "Intel" ;
then
echo "Detected Intel"
wrmsr -a 0x1a4 6
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

7 is a better number there.

wrmsr -a 0xc001102b 0x1808cc16
wrmsr -a 0xc0011020 0
wrmsr -a 0xc0011021 0x40
echo "MSR register values for Ryzen applied"
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Non blocking comment - those numbers are correct only for gen1 zen cores. Some testing is needed as they will set collateral bits with unknown function on gen2.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Numbers for C001_1020 and C001_1021 registers were taken from R7 3700X (Geekbench performance bias option in BIOS). Funny to see how you copy my work without any clue of what it does or how it was obtained :D AMD doesn't change MSR registers (at least these ones) within same family CPUs, and all Zen, Zen+ and Zen2 CPUs so far are family 17h.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Numbers for C001_1020 and C001_1021 registers were taken from R7 3700X (Geekbench performance bias option in BIOS).
AMD doesn't change MSR registers (at least these ones) within same family CPUs, and all Zen, Zen+ and Zen2 CPUs so far are family 17h.

+1, for the info

Funny to see how you copy my work without any clue of what it does or how it was obtained :D

please stop craying

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Funny to see how you copy my work without any clue of what it does or how it was obtained :D

Of course I know - you copied it from RagerX. That's why you have 2 gen2 MSRs and 2 gen1 MSRs. If you don't stop rocking your arse off, we will ban you from this repo.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OMG lol. I figured the last two values myself, and the first two were sent to me by xnbya who tested prefetcher options in BIOS on some other AM4 board (that I didn't have). Your RagerX is a joke. Have you even implemented MSR mod there yet?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI this is the screenshot of #monero-pools IRC from December 11th (everyone with IRC logs can check it): https://imgur.com/a/cE5XqHE
This where I got the info about the first 2 MSR registers and then I figured out the other two on my own, testing my BIOS.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

RagerX came out on the 9th -> see, it only works on people who are dumb enough not to fact-check you.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, it came out on the 9th and it didn't have MSR mod back then because I tested it and I didn't see anything faster than I already had with xmrig on windows (without the mod). Maybe It has MSR mod now (of course), but I don't really care.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's very convenient to claim you had something before XMRig without proof when everything RagerX is closed source and people have no way of checking it. You're a pathological liar.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You have been hanging out with pathological liars a bit too much.

https://medium.com/@crypto_ryo/senior-nasa-engineer-calls-out-howard-chu-hyc-symas-monero-developer-on-being-a-fraud-db0b46688041

But, hey, if "Look! I got this magic undocumented number of some guy on IRC. I totally don't know where it came from!!" is your story, that's your story.

Follow up question - do you think we would be dumb enough to put all our improvements at once :P. You will need to start looking harder for dodgy guys on IRC to find stuff for you =]

Add booster script to enable huge pages and manipulate the caching
behavior.
@psychocrypt
Copy link
Collaborator Author

updated

@fireice-uk fireice-uk merged commit 3137396 into fireice-uk:xmr-stak-rx-dev Dec 17, 2019
@pjwelsh
Copy link

pjwelsh commented Jan 5, 2020

Not much of a dev, but have a suggestion on slight change to script. It includes an example (quoted )awk replacement to the cat|grep|cut chain to remove the false negative error on huge pages:
required_num_huge_pages=1280
num_huge_pages_total="$(awk '/HugePages_Total/ {print $2}' /proc/meminfo)"
num_huge_pages=$(cat /proc/meminfo | grep "HugePages_Free" | sed 's/ {2,}/ /g' | cut -d" " -f2)

if [ $num_huge_pages_total -ge $required_num_huge_pages ] ; then
echo "already active 2 MiB pages"
else
if [ $num_huge_pages -lt $required_num_huge_pages ] ; then
echo "active 2 MiB pages"
echo "execute: sysctl -w vm.nr_hugepages=$required_num_huge_pages"
sysctl -w vm.nr_hugepages="$required_num_huge_pages"
fi
# verify number of huge pages
num_huge_pages=$(cat /proc/meminfo | grep "HugePages_Free" | sed 's/ {2,}/ /g' | cut -d" " -f2)
num_memsets=$((num_huge_pages/required_num_huge_pages))

if [ $num_memsets -eq 0 ] ; then
    echo "Error: not enough 2 MiB pages $num_huge_pages/$required_num_huge_pages" >&2
fi

fi

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend cpu feature randomX issue with xmr-stak-rx
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants