[GH-ISSUE #271] [performance] heavy CPU usage on a Ryzen 5 5600GT with 6 cores and 12 threads #68

Closed
opened 2026-11-02 15:36:05 +07:00 by bsakaguchi · 2 comments
Owner

Originally created by @Online5277 on GitHub (Oct 15, 2026).
Original GitHub issue: https://github.com/horizon-rust/horizon/issues/271

Claudes explanation of the problem:
The problem: with workers:0 (automatic), the game creates as many workers as there are threads on the CPU minus one (graphics.rs:251). Your Ryzen 5 5600GT has 6 cores and 12 threads, so 11 workers came out.

Those 11 workers, plus the main thread, occupied the 12 threads of the CPU, and all with the same priority. Windows divided time equally and the main thread had to wait its turn.
Furthermore, 2 threads that share the same physical core (SMT) perform much less than two real cores. The main thread ended up sharing a core with a worker.
With more chunks there is more generation work, so the workers were busy all the time. That's why at 32 chunks it was more noticeable.

This may be getting fixed in one of the pull requests waiting to get merged

Originally created by @Online5277 on GitHub (Oct 15, 2026). Original GitHub issue: https://github.com/horizon-rust/horizon/issues/271 Claudes explanation of the problem: The problem: with workers:0 (automatic), the game creates as many workers as there are threads on the CPU minus one (graphics.rs:251). Your Ryzen 5 5600GT has 6 cores and 12 threads, so 11 workers came out. Those 11 workers, plus the main thread, occupied the 12 threads of the CPU, and all with the same priority. Windows divided time equally and the main thread had to wait its turn. Furthermore, 2 threads that share the same physical core (SMT) perform much less than two real cores. The main thread ended up sharing a core with a worker. With more chunks there is more generation work, so the workers were busy all the time. That's why at 32 chunks it was more noticeable. This may be getting fixed in one of the pull requests waiting to get merged
Author
Owner

@ludovic111 commented on GitHub (Oct 15, 2026):

Progress: #354 makes a fresh install cap at 120 FPS, like vanilla, instead of running uncapped. #352 cuts chunk remeshing after a world loads by about two thirds, and #355 makes mob spawning cheaper. All three ship in the next release. Profiling shows mob AI is the next big cost on the main thread, and that's what we're working on next. If you can, try the next release and tell us whether the CPU use drops on your 5600GT.

<!-- gh-comment-id:6197310572 --> @ludovic111 commented on GitHub (Oct 15, 2026): Progress: #354 makes a fresh install cap at 120 FPS, like vanilla, instead of running uncapped. #352 cuts chunk remeshing after a world loads by about two thirds, and #355 makes mob spawning cheaper. All three ship in the next release. Profiling shows mob AI is the next big cost on the main thread, and that's what we're working on next. If you can, try the next release and tell us whether the CPU use drops on your 5600GT.
Author
Owner

@Online5277 commented on GitHub (Oct 17, 2026):

Probably fixed

<!-- gh-comment-id:6229347071 --> @Online5277 commented on GitHub (Oct 17, 2026): Probably fixed
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
horizon-rust/horizon#68
No description provided.