Memory: a GPUI desktop app peaks at ~9 GB RSS under the JIT (~24 GB with GPUI test-support), oomd-killed on a 30 GB host

Open
#169 1 comment 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
43/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
linux, rust

Research direction

Start by reproducing the reported memory peaks for the harness-app with and without GPUI's test-support feature, using the listed systemd-run command and cgroup MemoryPeak. Compare the runs with --ahead=minimal and the native binary to narrow down whether compilation state or runtime dependencies drive the footprint. Done means explaining the large RSS and identifying a supported way to reduce or bound it.

Written by the indexing model from the issue text.

Description

Summary

Running a GPUI desktop app under relax run costs ~9 GB RSS at steady state, and ~24 GB when GPUI's test-support feature is on. On a 30 GB host systemd-oomd killed the test-support run (23.9 GB peak, 17.4 GB swap) after 2m22s, before its first frame. The plain run works — window up, no compile errors — but the footprint is far above the native binary and is the practical limit for desktop apps on a 32 GB dev box.

Measured on makolate's harness-app (gpui-pre 0.3.10 via gpui-kit 0.8.1, wgpu/wayland/x11 stack), main 553877e, Linux x86-64, 30 GB RAM, cgroup MemoryPeak from a transient systemd-run unit:

run peak result
relax run --allow-c harness-app 9.17 GB window up (Makolate Harness — Badge Horizontal), renders, 0 compile errors
same with --ahead=minimal 9.2 GB (plain) same
relax run --allow-c harness-app --features dev-capture (GPUI test-support) 23.9 GB + 17.4 GB swap oomd kill at 2m22s, no frame
native cargo binary (same app) ~0.3–0.5 GB reference

The dev-capture feature is just GPUI's test-support; it adds dependencies (e.g. av-scenechange) and code, but a 2.6× RSS jump for that is surprising. --ahead=minimal did not change the figure, so it does not look like compile-ahead speculation.

The run itself is clean: no E0xxx, no panics, and the only diagnostic is the expected global_asm! of crate pulp left out warning (AVX-512/EVEX), which does not stop it.

What would help

  • Is a ~9 GB footprint expected for a graph this size, or is state being retained that a dev-loop run could drop (per-function lowering/type tables, RIR, caches)?
  • Is there a supported way to bound it (a zone/compiler cache budget, --ahead levels, or a flag to keep only what runs and discard compile state once code is published)?
  • Anything to know about test-support specifically — it roughly triples the graph here.

This matters for the "relax as the dev loop" case: a desktop app is exactly the target, and a 30 GB machine is a normal dev box.

Repro (needs the app, not public):

systemd-run --user --unit=studio --collect --working-directory=$PWD \
  --setenv=RELAX_CACHE_DIR=$HOME/.cache/relax/app \
  /path/to/relax run --allow-c harness-app
journalctl --user -u studio -o cat | tail -3   # MemoryPeak / oomd line if killed

A smaller public GPU-less app would make a better regression; happy to help build one if the shape is interesting.

Dominant language
Rust
Stars
601
Forks
34
Avg merge
1h 58m
Merged PRs (30d)
45

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from makepad/relax

All issues in makepad/relax

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.