I am wondering if the graphics memory consumption could be reduced, since it limits the amount of open wezterm instances substantially.
It also seems that new wezterm instances start with 65 MiB of memory and growing slowly, while alacritty stays at 13MiB.
โฏ nvidia-smi
Fri Oct 23 10:50:59 2020
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 455.28 Driver Version: 455.28 CUDA Version: 11.1 |
|-------------------------------+----------------------+----------------------+
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
| | | MIG M. |
|===============================+======================+======================|
| 0 Quadro K1100M Off | 00000000:01:00.0 Off | N/A |
| N/A 44C P8 N/A / N/A | 855MiB / 1999MiB | 0% Default |
| | | N/A |
+-------------------------------+----------------------+----------------------+
+-----------------------------------------------------------------------------+
| Processes: |
| GPU GI CI PID Type Process name GPU Memory |
| ID ID Usage |
|=============================================================================|
| 0 N/A N/A 175768 G wezterm 65MiB |
| 0 N/A N/A 2014487 G /usr/lib/Xorg 174MiB |
| 0 N/A N/A 2020473 G alacritty 13MiB |
| 0 N/A N/A 2022739 G wezterm 68MiB |
| 0 N/A N/A 2026162 G wezterm 68MiB |
| 0 N/A N/A 2062930 G wezterm 96MiB |
| 0 N/A N/A 2080660 G wezterm 108MiB |
| 0 N/A N/A 2282967 G wezterm 88MiB |
| 0 N/A N/A 2341131 G wezterm 96MiB |
| 0 N/A N/A 4150352 G wezterm 65MiB |
+-----------------------------------------------------------------------------+
open some wezterm instances
local wezterm = require 'wezterm';
return {
default_prog = {"/usr/bin/bash"},
check_for_updates = false,
enable_tab_bar = false,
font = wezterm.font_with_fallback(
{
"JetBrains Mono",
"FiraCode Nerd Font",
"Unifont",
"Noto Color Emoji",
}
),
font_size = 11.5,
dpi = 96.0,
default_cursor_style = "SteadyBlock",
scrollback_lines = 9999,
}
Constant and comparable low memory consumption.
I've pushed a commit that uses a smaller initial atlas size. Right now the strategy is simply to double that size whenever
we overflow (eg: have more distinct glyphs/sizes to rasterize) but it would be possible to alter the logic to try zero'ing out the existing texture on the first pass and then only actually allocate if the second pass still doesn't fit.
I'm curious about the instances that have ~100MB of usage; is there anything unusual about their workload? Lots of distinct emoji/glyphs?
I use https://starship.rs/ for my prompt. My IDE is basically awsome wm + wezterm + neovim, so normally I keep my terminals open for a long time, e.g. cd into a project, start a detached https://github.com/daa84/neovim-gtk and leave the terminal to run dev-specific commands, e.g. tests, rg, fd, etc. after a working day I suspend and resume the next day. Since my actual project is quite complex, I have multiple such wezterm/neovim sessions running on several awesome tags plus here and there some extra terminals for unrelated stuff.
In addition I have an alacritty scratchpad terminal (a leftover before switching to wezterm, where I track my time or run other regular commands), which basically stays there the whole uptime and it keeps its memory constantly at 13MiB.
With the current nightly, I'm seeing 2-4MiB:
+-----------------------------------------------------------------------------+
| Processes: |
| GPU GI CI PID Type Process name GPU Memory |
| ID ID Usage |
|=============================================================================|
| 0 N/A N/A 1439 G /usr/libexec/Xorg 59MiB |
| 0 N/A N/A 2237 G /usr/libexec/Xorg 160MiB |
| 0 N/A N/A 2503 G wezterm 4MiB |
+-----------------------------------------------------------------------------+
Initial memory is 2MiB now.
I keep watching this issue the next week and tell you later...
BTW thanks for the great work and response!
so far all my wezterm instances stay below 10MiB.
Most helpful comment
so far all my wezterm instances stay below 10MiB.