Skip to content

RISC-V: vectorized RandomX main loop#3746

Merged
xmrig merged 1 commit into
xmrig:devfrom
SChernykh:dev
Dec 27, 2025
Merged

RISC-V: vectorized RandomX main loop#3746
xmrig merged 1 commit into
xmrig:devfrom
SChernykh:dev

Conversation

@SChernykh

@SChernykh SChernykh commented Dec 26, 2025

Copy link
Copy Markdown
Contributor

This hasn't been tested on a real hardware yet, but it works in QEMU.

@Slayingripper if you have time, please test this PR against the latest release. Both must be built with

cmake .. -DCMAKE_BUILD_TYPE=Release -DARCH=native

Vector version should be faster, but I don't know by how much.

@xmrig xmrig added this to the v6 milestone Dec 27, 2025
@xmrig xmrig merged commit e3d0135 into xmrig:dev Dec 27, 2025
@SChernykh

Copy link
Copy Markdown
Contributor Author

Finally did a test, got an improvement from 107.4 to 110.1 H/s.
Screenshot from 2026-01-04 18-02-55

@Slayingripper

Copy link
Copy Markdown
Contributor

I'm not sure why we have such a big difference in numbers. The only thing running on my PI is PiHole
image

@SChernykh

Copy link
Copy Markdown
Contributor Author

You mistyped (missed M), need to type sudo ./xmrig --bench=1M --randomx-1gb-pages

@Slayingripper

Copy link
Copy Markdown
Contributor
image

@SChernykh

Copy link
Copy Markdown
Contributor Author

I don't know why it's slower for you. My RV2 has only heatsinks but no fan like on yours, so your RV2 is definitely not overheating. But you had 101.8 h/s all the way back here: #3725 (comment)
Maybe OS reinstall will help you.

@Slayingripper

Copy link
Copy Markdown
Contributor

I'll explain what I've done. I've deleted the repository, redownloaded it, switched to this pr like so gh pr checkout 3746. Then just proceeded as normal, mkdir buildcd build/cmake .. -DCMAKE_BUILD_TYPE=Release -DARCH=native make -j8sudo ./xmrig --bench=1M --randomx-1gb-pages .

Am I missing something?

I don't know why it's slower for you. My RV2 has only heatsinks but no fan like on yours, so your RV2 is definitely not overheating. But you had 101.8 h/s all the way back here: #3725 (comment) Maybe OS reinstall will help you.

@SChernykh

Copy link
Copy Markdown
Contributor Author

Everything looks correct. I think either something is using a lot of CPU in background, or you set power governor to "power saving" mode or something like this.

@SChernykh

Copy link
Copy Markdown
Contributor Author

@Slayingripper I now have the same problem. Hashrate dropped to 85 H/s and I can't do anything to get it back to 110 H/s. --randomx-1gb-pages doesn't help, in fact hashrate stays the same as with the regular huge pages. So I suspect that 1 GB huge pages stopped working, and OS is allocating the regular huge pages in the background.

@Slayingripper

Copy link
Copy Markdown
Contributor

@Slayingripper I now have the same problem. Hashrate dropped to 85 H/s and I can't do anything to get it back to 110 H/s. --randomx-1gb-pages doesn't help, in fact hashrate stays the same as with the regular huge pages. So I suspect that 1 GB huge pages stopped working, and OS is allocating the regular huge pages in the background.

At least I now know I didn't do anything on purpose. I tried disabling everything (Docker, PiHole, etc) to see if it would do anything, but nothing happened. Maybe Huge pages is something we should look into. I don't think this is a RISC-V problem, more likely an OS issue.

@SChernykh

Copy link
Copy Markdown
Contributor Author

@Slayingripper I don't know what changed, but now I get 118.3 h/s with the latest XMRig. It seems that it's random between reboots, and I think it depends on which parts of physical memory get allocated for the dataset:
image

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.

3 participants