[GH-ISSUE #494] [performance] 8 FPS on Linux, CPU-bound: 121 ms CPU vs 2.2 ms GPU per frame at low settings #144

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

Originally created by @ludovic111 on GitHub (Oct 16, 2026).
Original GitHub issue: https://github.com/horizon-rust/horizon/issues/494

Reported on Discord by skills.issue in #horizon-chat (2026-10-16).

Asked for: CPU/GPU, distro and X11 or Wayland, Horizon version, render distance, an F3 screenshot, and ~/.local/share/horizon/logs/latest.log.

Possibly related: #271 (Ryzen 5 5600GT, 100% CPU, 20 FPS), #480 (clouds, fixed by #485: about 2 ms, far too small to explain 120 ms).

Originally created by @ludovic111 on GitHub (Oct 16, 2026). Original GitHub issue: https://github.com/horizon-rust/horizon/issues/494 Reported on Discord by skills.issue in #horizon-chat (2026-10-16). - Screenshot (low settings, Linux, KDE-style window, sky and a few sheep in view): **8 FPS, frame 119.2 ms (max 711.5), CPU 121.0 ms, GPU 2.2 ms**. The GPU is idle; something on the main thread takes over 100 ms a frame. https://cdn.discordapp.com/attachments/1559242412121919620/1560619391446417448/image.png - A friend of theirs, on an RTX 3060 + 11th-gen Intel i7, gets about 30 FPS at medium settings. Asked for: CPU/GPU, distro and X11 or Wayland, Horizon version, render distance, an F3 screenshot, and `~/.local/share/horizon/logs/latest.log`. Possibly related: #271 (Ryzen 5 5600GT, 100% CPU, 20 FPS), #480 (clouds, fixed by #485: about 2 ms, far too small to explain 120 ms).
bsakaguchi 2026-11-02 15:36:44 +07:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

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

skills.issue's setup (Discord): Debian, KDE Plasma on Wayland, AMD Radeon 680M iGPU, Ryzen 7 (7000 series, likely a 6800H/7735H-class laptop APU). The 8 FPS at 121 ms of CPU per frame is on that machine.

<!-- gh-comment-id:6216594220 --> @ludovic111 commented on GitHub (Oct 16, 2026): skills.issue's setup (Discord): Debian, KDE Plasma on **Wayland**, AMD **Radeon 680M** iGPU, Ryzen 7 (7000 series, likely a 6800H/7735H-class laptop APU). The 8 FPS at 121 ms of CPU per frame is on that machine.
Author
Owner

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

🤖 Agent: update from skills.issue on Discord (#general, 2026-10-17 21:20Z): the 8 FPS is "half fixed" on today's builds, but still below Minecraft Java at the same settings on their Linux machine. They suspect the distribution and desktop environment, and wgpu's overhead compared with native Vulkan: wgpu validates pipelines, bind groups and resource transitions, and encodes passes that wgpu-hal then translates to Vulkan.

Before considering native Vulkan, measure wgpu's share of the frame on Linux. That means a perf or Tracy profile of the render thread at the same settings, split into time inside wgpu_core/wgpu_hal and Horizon's own CPU work. Since #742 the frame spans show CPU vs GPU per phase. Today's merges that should help on CPU-bound machines: #743 (fewer draw calls, Metal only), #735 (entity culling), and the server-thread work still in progress (#731).

skills.issue's numbers that would help: FPS and the F3 frame chart (CPU ms / GPU ms) at the same settings in Horizon and Java, with the GPU, distro, desktop environment (X11/Wayland) and Horizon version.

<!-- gh-comment-id:6241451054 --> @ludovic111 commented on GitHub (Oct 17, 2026): 🤖 Agent: update from **skills.issue** on Discord ([#general, 2026-10-17 21:20Z](https://discord.com/channels/1559227979002028052/1559227979559731353/1561126680226173000)): the 8 FPS is "half fixed" on today's builds, but still below Minecraft Java at the same settings on their Linux machine. They suspect the distribution and desktop environment, and wgpu's overhead compared with native Vulkan: wgpu validates pipelines, bind groups and resource transitions, and encodes passes that wgpu-hal then translates to Vulkan. Before considering native Vulkan, measure wgpu's share of the frame on Linux. That means a `perf` or Tracy profile of the render thread at the same settings, split into time inside `wgpu_core`/`wgpu_hal` and Horizon's own CPU work. Since #742 the frame spans show CPU vs GPU per phase. Today's merges that should help on CPU-bound machines: #743 (fewer draw calls, Metal only), #735 (entity culling), and the server-thread work still in progress (#731). skills.issue's numbers that would help: FPS and the F3 frame chart (CPU ms / GPU ms) at the same settings in Horizon and Java, with the GPU, distro, desktop environment (X11/Wayland) and Horizon version.
Author
Owner

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

🤖 Agent: profiled on a Linux iGPU weaker than the reporter's. Neither the 8 FPS nor the 120 ms CPU frames reproduce, and wgpu's own share of the render thread is about 9%, so a native Vulkan backend would not be worth it. This issue is closed. If it still runs badly on the Radeon 680M under KDE Wayland, please reopen with the F3 screen (CPU ms / GPU ms) and latest.log, or post the report from horizon-client --benchmark standard --render-distance 8 (written to benchmarks/).

Setup: ThinkPad, i7-7500U (4 threads), Intel HD 620 (Mesa 26.1.8 ANV, Vulkan), NixOS. Main as of 2026-10-21 15:09. horizon-client --benchmark standard --render-distance 8 --offscreen, 1280x720, default video settings, under Xvfb (X11: no Wayland compositor on that machine). Recorded with perf record -F 499 for the whole run (169,188 samples).

Frames (12 s flights):

Scene Avg FPS 1% low p50 frame p50 CPU p50 GPU
village 179 26 2.7 ms 2.4 ms 2.2 ms
forest 184 21 2.7 ms 2.3 ms 2.6 ms
ocean 132 24 4.7 ms 3.1 ms 2.8 ms
mountain 169 14 3.8 ms 2.0 ms 2.3 ms

Where the render thread's CPU time goes (its samples only, grouped by library and crate):

share
Horizon's own crates (horizon_client, horizon_core, horizon_world, horizon_assets) 35%
Rust std, core, alloc, hashbrown and friends (mostly called from Horizon) 14%
libc: malloc/free 11%, memset/memmove/memcmp 8% 22%
Mesa's Vulkan driver (libvulkan_intel.so) 19%
wgpu (wgpu_core 6.2%, wgpu_hal 1.5%, wgpu 0.9%) 8.6%

The top single function is Renderer::draw_frame (6.7% of the thread). The rest is spread across many functions: PalettedContainer::get, item rendering, block collision scans and entity geometry.

What's left on CPU-bound machines is the 1% lows (14–26 FPS). Those are world ticks on the render thread, which #1072 (single player on its server thread by default) moves off it.

<!-- gh-comment-id:6320351408 --> @ludovic111 commented on GitHub (Oct 21, 2026): 🤖 Agent: profiled on a Linux iGPU weaker than the reporter's. Neither the 8 FPS nor the 120 ms CPU frames reproduce, and wgpu's own share of the render thread is about 9%, so a native Vulkan backend would not be worth it. This issue is closed. If it still runs badly on the Radeon 680M under KDE Wayland, please reopen with the F3 screen (CPU ms / GPU ms) and `latest.log`, or post the report from `horizon-client --benchmark standard --render-distance 8` (written to `benchmarks/`). **Setup:** ThinkPad, i7-7500U (4 threads), Intel HD 620 (Mesa 26.1.8 ANV, Vulkan), NixOS. Main as of 2026-10-21 15:09. `horizon-client --benchmark standard --render-distance 8 --offscreen`, 1280x720, default video settings, under Xvfb (X11: no Wayland compositor on that machine). Recorded with `perf record -F 499` for the whole run (169,188 samples). **Frames (12 s flights):** | Scene | Avg FPS | 1% low | p50 frame | p50 CPU | p50 GPU | | --- | --- | --- | --- | --- | --- | | village | 179 | 26 | 2.7 ms | 2.4 ms | 2.2 ms | | forest | 184 | 21 | 2.7 ms | 2.3 ms | 2.6 ms | | ocean | 132 | 24 | 4.7 ms | 3.1 ms | 2.8 ms | | mountain | 169 | 14 | 3.8 ms | 2.0 ms | 2.3 ms | **Where the render thread's CPU time goes** (its samples only, grouped by library and crate): | | share | | --- | --- | | Horizon's own crates (`horizon_client`, `horizon_core`, `horizon_world`, `horizon_assets`) | 35% | | Rust std, core, alloc, hashbrown and friends (mostly called from Horizon) | 14% | | libc: malloc/free 11%, memset/memmove/memcmp 8% | 22% | | Mesa's Vulkan driver (`libvulkan_intel.so`) | 19% | | **wgpu** (`wgpu_core` 6.2%, `wgpu_hal` 1.5%, `wgpu` 0.9%) | **8.6%** | The top single function is `Renderer::draw_frame` (6.7% of the thread). The rest is spread across many functions: `PalettedContainer::get`, item rendering, block collision scans and entity geometry. What's left on CPU-bound machines is the 1% lows (14–26 FPS). Those are world ticks on the render thread, which #1072 (single player on its server thread by default) moves off it.
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#144
No description provided.