Monitor: the GPU load card says what it measures (#5484, part 1)

NVML, amdgpu and the Mac's IOKit all report GPU load as the share of time
the GPU had work scheduled, so a Mac decoding at its memory bandwidth
read 95-99 % and looked "maxed out". The GPU load label now carries the
coordinator-approved sentence as its tooltip: "Share of the time the GPU
had work to do. It does not say how much of its compute is in use."

App Monitor: new catalog key s9101 in all nine catalogs ([DRAFT]
translations; the id is outside GUI-1116's s9039-s9051 so the branches
merge without a clash). Web Monitor: English, like the rest of that view.

Test: tests/monitor-gpu-load-hint.test.mjs (3 fail on 959689382, 3 pass);
languages-and-catalog, locale-gaps, french-catalog, monitor-dashboard
pass with it (35/35); serve web monitor tests pass; tsc clean.
This commit is contained in:
Niko1221 committed 2026-11-16 17:22:09 +01:00
1 parent 2a43d823ef
commit fd67c5fa91
12 files changed
+59 -14

No files matched your search

+2 -1
View File
@@ -3527,5 +3527,6 @@
"s9035": "Diese Modelldateien fehlen: {0}.",
"s9036": "Drücken Sie noch einmal auf „Herunterladen und laden“, um sie zu holen. Vorhandene Dateien bleiben erhalten. Werden dieselben Dateien wieder aufgelistet, öffnen Sie die Details und teilen Sie sie mit, wenn Sie um Hilfe bitten.",
"s9037": "Dieses Update wurde beim Neustart der App unterbrochen. Ein späteres Update ist abgeschlossen, Sie müssen nichts tun.",
"s9038": "Dieses System erlaubt Strata nicht, Port {0} zu verwenden. Unter Linux und macOS brauchen Ports unter 1024 Administratorrechte. Starten Sie Strata mit einem anderen Port (STRATA_PORT), zum Beispiel 8801."
"s9038": "Dieses System erlaubt Strata nicht, Port {0} zu verwenden. Unter Linux und macOS brauchen Ports unter 1024 Administratorrechte. Starten Sie Strata mit einem anderen Port (STRATA_PORT), zum Beispiel 8801.",
"s9101": "Anteil der Zeit, in der die GPU Arbeit hatte. Er sagt nicht, wie viel ihrer Rechenleistung genutzt wird."
}
+2 -1
View File
@@ -3527,5 +3527,6 @@
"s9035": "These model files are missing: {0}.",
"s9036": "Press Download & load again to fetch them. Files that are already there are kept. If the same files are listed again, open Details and share them when you ask for help.",
"s9037": "This update was cut short when the app restarted. A later update finished, so nothing needs doing.",
"s9038": "This system does not let Strata use port {0}. On Linux and macOS, ports below 1024 need administrator rights. Start Strata with another port (STRATA_PORT), for example 8801."
"s9038": "This system does not let Strata use port {0}. On Linux and macOS, ports below 1024 need administrator rights. Start Strata with another port (STRATA_PORT), for example 8801.",
"s9101": "Share of the time the GPU had work to do. It does not say how much of its compute is in use."
}
+2 -1
View File
@@ -3527,5 +3527,6 @@
"s9035": "Faltan estos archivos del modelo: {0}.",
"s9036": "Pulse de nuevo «Descargar y cargar» para obtenerlos. Los archivos que ya están se conservan. Si vuelven a aparecer los mismos archivos, abra los detalles y compártalos cuando pida ayuda.",
"s9037": "Esta actualización se interrumpió cuando la aplicación se reinició. Una actualización posterior terminó, así que no hay nada que hacer.",
"s9038": "Este sistema no deja que Strata use el puerto {0}. En Linux y macOS, los puertos por debajo de 1024 necesitan derechos de administrador. Inicia Strata con otro puerto (STRATA_PORT), por ejemplo 8801."
"s9038": "Este sistema no deja que Strata use el puerto {0}. En Linux y macOS, los puertos por debajo de 1024 necesitan derechos de administrador. Inicia Strata con otro puerto (STRATA_PORT), por ejemplo 8801.",
"s9101": "Parte del tiempo en que la GPU tenía trabajo. No indica cuánta de su capacidad de cálculo se está usando."
}
+2 -1
View File
@@ -3527,5 +3527,6 @@
"s9035": "Ces fichiers du modèle sont manquants : {0}.",
"s9036": "Appuyez à nouveau sur Télécharger et charger pour les récupérer. Les fichiers déjà présents sont conservés. Si les mêmes fichiers sont listés à nouveau, ouvrez Détails et partagez-les quand vous demandez de l’aide.",
"s9037": "Cette mise à jour a été interrompue au redémarrage de l’application. Une mise à jour plus récente s’est terminée, il n’y a donc rien à faire.",
"s9038": "Ce système ne laisse pas Strata utiliser le port {0}. Sous Linux et macOS, les ports inférieurs à 1024 nécessitent des droits d’administrateur. Lancez Strata avec un autre port (STRATA_PORT), par exemple 8801."
"s9038": "Ce système ne laisse pas Strata utiliser le port {0}. Sous Linux et macOS, les ports inférieurs à 1024 nécessitent des droits d’administrateur. Lancez Strata avec un autre port (STRATA_PORT), par exemple 8801.",
"s9101": "Part du temps pendant laquelle le GPU avait du travail. Cela n’indique pas quelle part de sa puissance de calcul est utilisée."
}
+2 -1
View File
@@ -3527,5 +3527,6 @@
"s9035": "次のモデルファイルが見つかりません: {0}。",
"s9036": "もう一度「ダウンロードして読み込む」を押すと取得します。すでにあるファイルはそのまま残ります。同じファイルがまた表示される場合は、詳細を開き、助けを求めるときに共有してください。",
"s9037": "このアップデートは、アプリの再起動で中断されました。その後のアップデートが完了しているため、対応は不要です。",
"s9038": "このシステムでは、Strataによるポート{0}の使用が許可されていません。LinuxとmacOSでは、1024未満のポートには管理者権限が必要です。別のポート(STRATA_PORT)、たとえば8801でStrataを起動してください。"
"s9038": "このシステムでは、Strataによるポート{0}の使用が許可されていません。LinuxとmacOSでは、1024未満のポートには管理者権限が必要です。別のポート(STRATA_PORT)、たとえば8801でStrataを起動してください。",
"s9101": "GPU が処理を抱えていた時間の割合です。計算能力のどれだけが使われているかを示すものではありません。"
}
+2 -1
View File
@@ -3527,5 +3527,6 @@
"s9035": "다음 모델 파일이 없습니다: {0}.",
"s9036": "'다운로드 및 불러오기'를 다시 누르면 가져옵니다. 이미 있는 파일은 그대로 둡니다. 같은 파일이 다시 표시되면 자세히 보기를 열어 도움을 요청할 때 함께 알려 주세요.",
"s9037": "이 업데이트는 앱이 다시 시작되면서 중단되었습니다. 이후 업데이트가 완료되었으므로 할 일은 없습니다.",
"s9038": "이 시스템은 Strata의 포트 {0} 사용을 허용하지 않습니다. Linux와 macOS에서는 1024 미만의 포트에 관리자 권한이 필요합니다. 다른 포트(STRATA_PORT), 예를 들어 8801로 Strata를 시작하세요."
"s9038": "이 시스템은 Strata의 포트 {0} 사용을 허용하지 않습니다. Linux와 macOS에서는 1024 미만의 포트에 관리자 권한이 필요합니다. 다른 포트(STRATA_PORT), 예를 들어 8801로 Strata를 시작하세요.",
"s9101": "GPU에 할 일이 있었던 시간의 비율입니다. 연산 능력이 얼마나 쓰이고 있는지는 알려 주지 않습니다."
}
+2 -1
View File
@@ -3527,5 +3527,6 @@
"s9035": "Estes arquivos do modelo estão faltando: {0}.",
"s9036": "Pressione Baixar e carregar de novo para buscá-los. Os arquivos que já estão aí são mantidos. Se os mesmos arquivos aparecerem de novo, abra os Detalhes e compartilhe-os ao pedir ajuda.",
"s9037": "Esta atualização foi interrompida quando o aplicativo reiniciou. Uma atualização posterior terminou, então não há nada a fazer.",
"s9038": "Este sistema não deixa o Strata usar a porta {0}. No Linux e no macOS, as portas abaixo de 1024 precisam de direitos de administrador. Inicie o Strata com outra porta (STRATA_PORT), por exemplo 8801."
"s9038": "Este sistema não deixa o Strata usar a porta {0}. No Linux e no macOS, as portas abaixo de 1024 precisam de direitos de administrador. Inicie o Strata com outra porta (STRATA_PORT), por exemplo 8801.",
"s9101": "Parte do tempo em que a GPU tinha trabalho. Não diz quanto da sua capacidade de cálculo está em uso."
}
+2 -1
View File
@@ -3527,5 +3527,6 @@
"s9035": "Не хватает этих файлов модели: {0}.",
"s9036": "Нажмите «Скачать и загрузить» ещё раз, чтобы получить их. Уже имеющиеся файлы сохраняются. Если те же файлы снова появятся в списке, откройте «Подробности» и приложите их, когда будете просить о помощи.",
"s9037": "Это обновление прервалось при перезапуске приложения. Более позднее обновление завершилось, так что делать ничего не нужно.",
"s9038": "Эта система не разрешает Strata использовать порт {0}. В Linux и macOS порты ниже 1024 требуют прав администратора. Запустите Strata с другим портом (STRATA_PORT), например 8801."
"s9038": "Эта система не разрешает Strata использовать порт {0}. В Linux и macOS порты ниже 1024 требуют прав администратора. Запустите Strata с другим портом (STRATA_PORT), например 8801.",
"s9101": "Доля времени, когда у GPU была работа. Она не показывает, какая часть её вычислительной мощности используется."
}
+2 -1
View File
@@ -3527,5 +3527,6 @@
"s9035": "缺少这些模型文件:{0}。",
"s9036": "再按一次“下载并加载”即可获取。已有的文件会保留。如果再次列出同样的文件,请打开详情,并在求助时一并提供。",
"s9037": "此更新在应用重启时被中断。之后的更新已完成,无需任何操作。",
"s9038": "此系统不允许 Strata 使用端口 {0}。在 Linux 和 macOS 上,1024 以下的端口需要管理员权限。请用其他端口(STRATA_PORT)启动 Strata,例如 8801。"
"s9038": "此系统不允许 Strata 使用端口 {0}。在 Linux 和 macOS 上,1024 以下的端口需要管理员权限。请用其他端口(STRATA_PORT)启动 Strata,例如 8801。",
"s9101": "GPU 有任务在执行的时间占比。它不表示有多少算力正在被使用。"
}
+5 -3
View File
@@ -30,8 +30,10 @@ function ReadingBar({ label, value, tone = 'accent' }: {
}) {
return hasReading(value) ? <Bar label={tr(label)} value={value} tone={tone}/> : <div className="st-progress" role="img" aria-label={tr("{0}: unavailable", [label])}/>;
}
function MonitorMetric({ label, icon, value, unit, sub, chart, source, secondary }: {
function MonitorMetric({ label, icon, value, unit, sub, chart, source, secondary, hint }: {
label: string;
/** What the reading is, as the label's tooltip (#5484). */
hint?: string;
icon: IconName;
value: ReactNode;
unit?: string;
@@ -41,7 +43,7 @@ function MonitorMetric({ label, icon, value, unit, sub, chart, source, secondary
secondary?: ReactNode;
}) {
return <section className="st-card monitor-metric" aria-label={tr(label)}>
<div className="st-metric__label"><Icon name={icon} size={18}/>{tr(label)}<span className="monitor-metric__source xs">{tr(source)}</span></div>
<div className="st-metric__label" title={hint}><Icon name={icon} size={18}/>{tr(label)}<span className="monitor-metric__source xs">{tr(source)}</span></div>
<div className={secondary ? 'monitor-speed-values' : 'monitor-metric__reading'}><div><div className="st-metric__value">{tr(value)}{tr(unit ? <span className="st-metric__unit">{tr(unit)}</span> : null)}</div><div className="monitor-metric__sub xs muted">{tr(sub)}</div></div>{tr(secondary)}</div>
{tr(chart)}
</section>;
@@ -190,7 +192,7 @@ function LegacyMonitorScreen({ native }: {
</section>
<div className="monitor-metrics">
{tr(!multipleScope ? <MonitorMetric label={tr("Speed")} icon="gauge" value={number(decode, 1)} unit={hasReading(decode) ? 'tok/s' : ''} source={throughput} sub={writing ? 'Decode now' : last ? 'Decode last request' : 'Decode'} secondary={<div><div className="st-metric__value">{tr(number(prefill))}{tr(hasReading(prefill) ? <span className="st-metric__unit">{tr("tok/s")}</span> : null)}</div><div className="monitor-metric__sub xs muted">{tr(data.phase === 'reading' ? 'Prefill now' : writing ? 'Prefill this request' : last ? 'Prefill last request' : 'Prefill')}</div></div>} chart={<ReferenceSpark label={tr("Speed")} data={history.map(s => throughputKnown ? s.outputTps : null)} secondary={{ data: history.map(s => throughputKnown ? s.promptTps : null), label: 'Prefill', tone: 'var(--st-chart-prefill)' }} tone="var(--st-chart-decode)" unit="tok/s" timestamps={timestamps}/>}/> : null)}
<MonitorMetric label={tr("GPU load")} icon="gpu" value={number(gpuLoad)} unit={hasReading(gpuLoad) ? '%' : ''} source={gpuSource('utilizationPct', 'mean')} sub={whose('utilizationPct', 'mean') ?? gpuName} chart={chart('GPU load', historyGpu('utilizationPct', 'gpuLoad', 'mean'), '%', 100)}/>
<MonitorMetric label={tr("GPU load")} hint={tr("Share of the time the GPU had work to do. It does not say how much of its compute is in use.")} icon="gpu" value={number(gpuLoad)} unit={hasReading(gpuLoad) ? '%' : ''} source={gpuSource('utilizationPct', 'mean')} sub={whose('utilizationPct', 'mean') ?? gpuName} chart={chart('GPU load', historyGpu('utilizationPct', 'gpuLoad', 'mean'), '%', 100)}/>
<MonitorMetric label={tr(shared ? 'Shared GPU memory' : 'VRAM')} icon="layers" value={number(vram, 1)} unit={hasReading(vram) ? vramTotal ? `/ ${number(vramTotal, 0)} GB` : 'GB' : ''} source={gpuSource('memoryUsedGb')} sub={whose('memoryUsedGb') ?? (shared ? 'Same memory pool as system RAM' : multipleGpus ? 'Total across selected GPUs' : cacheKnown && devices.length === 1 ? `${number(data.expertCache.used)} experts cached` : 'GPU memory')} chart={chart(shared ? 'Shared GPU memory' : 'VRAM', historyGpu('memoryUsedGb', 'vramUsedGb'), 'GB', vramTotal)}/>
<MonitorMetric label={tr("GPU temp")} icon="thermometer" value={number(temperature)} unit={hasReading(temperature) ? '°C' : ''} source={gpuSource('temperatureC', 'max')} sub={whose('temperatureC', 'max') ?? (multipleGpus ? 'Hottest selected GPU' : selectedGpus[0]?.name ?? (selectedInstance && !selectedInstance.gpuIds.length ? native ? 'Automatic GPU placement' : 'CPU only · no GPU assigned' : 'No GPU detected'))} chart={chart('GPU temperature', historyGpu('temperatureC', 'gpuTempC', 'max'), '°C', 90, 'var(--st-warn)')}/>
<MonitorMetric label={tr("Power")} icon="bolt" value={number(power)} unit={hasReading(power) ? 'W' : ''} source={gpuSource('powerW')} sub={whose('powerW') ?? (hasReading(powerLimit) ? `of ${number(powerLimit)} W limit` : multipleGpus ? 'Total across selected GPUs' : 'GPU power draw')} chart={chart('GPU power', historyGpu('powerW', 'powerW'), 'W', powerLimit ?? undefined)}/>
@@ -0,0 +1,32 @@
/** #5484: the GPU load card says what it measures (the share of time the GPU had work, not compute in use), as the label's
* tooltip in the app's Monitor (all nine languages) and on the web page's Monitor (English-only view). */
import test from 'node:test';
import assert from 'node:assert/strict';
import { readFile } from 'node:fs/promises';
const TEXT = 'Share of the time the GPU had work to do. It does not say how much of its compute is in use.';
const read = (p) => readFile(new URL(p, import.meta.url), 'utf8');
test('the app Monitor gives the GPU load label its tooltip, translated', async () => {
const src = await read('../src/screens/Monitor.tsx');
assert.match(src, /<div className="st-metric__label" title=\{hint\}>/);
assert.ok(src.includes(`<MonitorMetric label={tr("GPU load")} hint={tr("${TEXT}")}`));
});
test('the sentence is in all nine catalogs, translated in eight', async () => {
const langs = ['en', 'zh', 'ja', 'de', 'es', 'ru', 'pt', 'ko', 'fr'];
const ids = new Set();
for (const lang of langs) {
const cat = JSON.parse(await read(`../src/locales/${lang}.json`));
const id = Object.keys(cat).find((k) => (lang === 'en' ? cat[k] === TEXT : false));
if (lang === 'en') { assert.ok(id, 'English entry'); ids.add(id); continue; }
const [en] = ids;
assert.ok(cat[en] && cat[en] !== TEXT, `${lang}: ${cat[en]}`);
}
});
test('the web Monitor shows the same sentence on its GPU load label', async () => {
const app = await read('../../../serve/web/app.js');
assert.ok(app.includes(`{key: "gpu", label: "GPU load", icon: "gpu", unit: "%", series: "gpu_util", max: 100,\n hint: "${TEXT}"}`));
assert.ok(app.includes('<span class="st-metric__label"${m.hint ? ` title="${esc(m.hint)}"` : ""}>'));
});
+4 -2
View File
@@ -128,7 +128,9 @@ async function loadHealth() {
// ------------------------------------------------------------------ Monitor
const METRICS = [
{key: "speed", label: "Speed", icon: "gauge", unit: "t/s", series: "tok_s"},
{key: "gpu", label: "GPU load", icon: "gpu", unit: "%", series: "gpu_util", max: 100},
// #5484: what the load is (NVML, amdgpu and the Mac report time busy, not compute in use)
{key: "gpu", label: "GPU load", icon: "gpu", unit: "%", series: "gpu_util", max: 100,
hint: "Share of the time the GPU had work to do. It does not say how much of its compute is in use."},
{key: "vram", label: "VRAM", icon: "layers", unit: "GB", series: "gpu_mem_used"},
{key: "temp", label: "GPU temp", icon: "thermometer", unit: "°C", series: "gpu_temp", tone: "warn"},
{key: "power", label: "Power", icon: "bolt", unit: "W", series: "gpu_power"},
@@ -138,7 +140,7 @@ const METRICS = [
];
$("metrics").innerHTML = METRICS.map((m) => `
<div class="st-card metric-card"><div class="st-metric">
<span class="st-metric__label">${icon(m.icon, "st-icon st-icon--sm")}${esc(m.label)}</span>
<span class="st-metric__label"${m.hint ? ` title="${esc(m.hint)}"` : ""}>${icon(m.icon, "st-icon st-icon--sm")}${esc(m.label)}</span>
${m.key === "speed" ? `<div class="speed-values">
<div><span class="st-metric__value" id="mv-speed">-</span><span class="st-metric__sub" id="ms-speed">Decode</span></div>
<div class="speed-prefill"><span class="st-metric__value" id="mv-prefill">-</span><span class="st-metric__sub" id="ms-prefill">Prefill</span></div>