How to debug slowness #6288
-
What Operating System(s) are you running on?Linux X11 Which Wayland compositor or X11 Window manager(s) are you using?i3 WezTerm version20240203-110809-5046fc22-gentoo Ask your question!Wezterm is pretty slow on my:
I have tried using software emulation, I have tried webgpu (which I am not sure if it makes sense without a gpu). I removed all fonts and stuff, but still it is way to slow. And gets slower as time goes on. Config How to debug this? Also, i was wondering if my system configuration is slow for wezterm, or am I missing any drivers. On the MAC M1 it works fine. It's slower than terminator, but its supposed to be as fast as Logs from linux Debug Overlay
wezterm version: 20240203-110809-5046fc22-gentoo x86_64-unknown-linux-gnu
Window Environment: X11 i3
Lua Version: Lua 5.4
WebGPU: name=llvmpipe (LLVM 18.1.8, 256 bits), device_type=Cpu, backend=Gl, vendor=65541, device=0
Enter lua statements or expressions and hit Enter.
Press ESC or CTRL-D to exit
08:03:46.344 WARN window::os::x11::connection > Unable to resolve appearance using xdg-desktop-portal: get_appearance.read_setting: Reading xdg-portal org.freedesktop.appearance color-scheme: org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.portal.Desktop was not provided by any .service files
> wezterm.gui.enumerate_gpus()
[
{
"backend": "Gl",
"device": 0,
"device_type": "Cpu",
"name": "llvmpipe (LLVM 18.1.8, 256 bits)",
"vendor": 65541,
},
] wezterm --config periodic_stat_logging=10 &
kaiju8@kaiju8 /h/d/d/devtools (master)> libEGL warning: DRI2: failed to authenticate
libEGL warning: MESA-LOADER: failed to open zink: /usr/lib64/dri/zink_dri.so: cannot open shared object file: No such file or directory (search paths /usr/lib64/dri, suffix _dri)
libEGL warning: DRI2: failed to authenticate
libEGL warning: MESA-LOADER: failed to open zink: /usr/lib64/dri/zink_dri.so: cannot open shared object file: No such file or directory (search paths /usr/lib64/dri, suffix _dri)
08:09:28.767 WARN window::os::x11::connection > Unable to resolve appearance using xdg-desktop-portal: get_appearance.read_setting: Reading xdg-portal org.freedesktop.appearance color-scheme: org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.portal.Desktop was not provided by any .service files
STAT current p50 p75 p95
Key(glyph_cache.glyph_cache.hit.rate) 0 189 189 189
Key(glyph_cache.glyph_cache.miss.rate) 0 41 41 41
Key(gui.paint.impl.rate) 0 3 10 10
Key(line_quad_cache.hit.rate) 0 58 583 583
Key(line_quad_cache.miss.rate) 0 58 116 116
Key(line_state_cache.hit.rate) 0 174 527 527
Key(line_to_ele_shape_cache.hit.rate) 0 64 117 117
Key(line_to_ele_shape_cache.miss.rate) 0 4 4 4
Key(mux.pane_output_event.rate) 0 1 1 1
Key(read_from_pane_pty.bytes.rate) 0 399 399 399
Key(send_actions_to_mux.rate) 0 5 5 5
Key(shape_cache.hit.rate) 0 18 63 63
Key(shape_cache.miss.rate) 0 24 24 24
Key(window.atlas.allocate.success.rate) 0 1 43 43
STAT p50 p75 p95
Key(cached_cluster_shape) 1.87µs 6.11µs 512.00µs
Key(executor.spawn_delay) 313.34µs 3.75ms 106.95ms
Key(gui.paint.impl) 2.21ms 2.54ms 36.70ms
Key(paint_pane.lines) 344.06µs 393.22µs 16.71ms
Key(quad.map) 36.86µs 38.91µs 51.20µs
Key(quad_buffer_apply) 97.00ns 105.00ns 1.04µs
Key(render_screen_line) 799.00ns 895.00ns 134.14µs
Key(send_actions_to_mux.perform_actions.latency) 41.22µs 72.19µs 153.60µs
Key(shape.harfbuzz) 88.06µs 175.10µs 458.75µs
Key(window.atlas.allocate.latency) 10.11µs 12.99µs 33.79µs
STAT COUNT |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Okay. This is what I did on my gentoo. The error was there, but I didn't think it would be as much an issue. So i decided to solve my video driver issue first. llvmpipe, gosh took me some time to get rid of it. kaiju8@kaiju8 ~> doas emerge --depclean x11-drivers/xf86-video-intel
kaiju8@kaiju8 ~> cat /etc/portage/package.use/mesa
media-libs/mesa iris vulkan egl gbm dri3 zink
kaiju8@kaiju8 ~> cat /etc/portage/package.use/xorg-server
x11-base/xorg-server glamor udev From this, the zink vulkan egl dri3 and iris I added. Also had to make sure glamor was getting used. It is probably not-required, unless you had the kaiju8@kaiju8 ~> glxinfo| grep -i 'opengl'
OpenGL vendor string: Intel
OpenGL renderer string: llvmpipe was the first result. After installing these and override the x org input conf for intel to looks like this:
The AccelMethod 'glamor' did the trick. Upon reboot, I could see my glxinfo doin:
with that, when I ran the As a finishing step, I reverted my wezterm.lua, to load the fonts, and them, and use "WebGpu" frontend. The initial load took some time, which I spent freaking out. But now It works like butter STAT current p50 p75 p95
Key(glyph_cache.glyph_cache.hit.rate) 0 125 189 189
Key(glyph_cache.glyph_cache.miss.rate) 0 41 41 41
Key(gui.paint.impl.rate) 0 54 55 55
Key(line_quad_cache.hit.rate) 0 3471 3519 3519
Key(line_quad_cache.miss.rate) 0 64 64 64
Key(line_state_cache.hit.rate) 0 3407 3519 3519
Key(line_to_ele_shape_cache.hit.rate) 0 55 90 113
Key(line_to_ele_shape_cache.miss.rate) 0 1 4 4
Key(mux.pane_output_event.rate) 0 2 5 5
Key(read_from_pane_pty.bytes.rate) 0 250 399 399
Key(send_actions_to_mux.rate) 0 2 5 5
Key(shape_cache.hit.rate) 0 327 331 331
Key(shape_cache.miss.rate) 0 1 24 24
Key(window.atlas.allocate.success.rate) 0 1 43 43
STAT p50 p75 p95
Key(cached_cluster_shape) 1.80µs 2.19µs 5.54µs
Key(executor.spawn_delay) 75.26µs 128.51µs 2.23ms
Key(gui.paint.impl) 1.97ms 2.13ms 4.00ms
Key(paint_pane.lines) 327.68µs 364.54µs 413.70µs
Key(quad.map) 7.62µs 8.13µs 8.96µs
Key(quad_buffer_apply) 94.00ns 116.00ns 2.59µs
Key(render_screen_line) 44.03µs 122.88µs 140.29µs
Key(send_actions_to_mux.perform_actions.latency) 40.70µs 83.97µs 86.02µs
Key(shape.harfbuzz) 13.50µs 20.10µs 167.94µs
Key(window.atlas.allocate.latency) 4.67µs 6.72µs 35.33µs I can see significant difference in the STATS p95 after the changes |
Beta Was this translation helpful? Give feedback.
Okay. This is what I did on my gentoo. The error was there, but I didn't think it would be as much an issue. So i decided to solve my video driver issue first. llvmpipe, gosh took me some time to get rid of it.
From this, the zink vulkan egl dri3 and iris I added. Also had to make sure glamor was getting used. It is probably not-required, unless you had the
minimal
flag set. Anyway, these are mostly system setup to move away from the…