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

オープン
#169 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
43/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
linux, rust

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

説明

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.

主要言語
Rust
スター
601
フォーク
34
平均マージ
1時間 58分
マージ済み PR(30日)
45

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

makepad/relax のほかの issue

makepad/relax の issue をすべて見る

似ている issue

Rust の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。