mirror of
https://github.com/pithings/unkernel.git
synced 2026-12-02 01:59:43 +08:00
67 lines
4.2 KiB
HTML
67 lines
4.2 KiB
HTML
<!doctype html>
|
|
<!-- SPDX-License-Identifier: MIT -->
|
|
<!-- Copyright (C) 2026 Pooya Parsa <pooya@pi0.io> -->
|
|
<!--
|
|
/smp-probe.html: why is the SMP kernel slower on several CPUs than on one
|
|
in this browser? Engine probes without a kernel (workers, timed waits,
|
|
wake latency, wasm on a shared memory, compile scaling, GC) and kernel
|
|
experiments (CPU counts, the JIT, the wait parameters), with a heuristic
|
|
reading of which cause the numbers point at (src/smp-probe.ts).
|
|
-->
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
<meta name="color-scheme" content="dark">
|
|
<meta name="robots" content="noindex">
|
|
<title>unkernel: SMP probe</title>
|
|
<style>
|
|
body { margin: 0; padding: 1rem; background: #000; color: #ddd; font: 13px/1.45 ui-monospace, SFMono-Regular, Menlo, monospace; }
|
|
main { max-width: 72rem; margin: 0 auto; }
|
|
h1 { font-size: 1.1rem; color: #fff; margin: 0 0 .5rem; }
|
|
h2 { font-size: 1rem; color: #fff; margin: 1.25rem 0 .5rem; }
|
|
fieldset { border: 1px solid #333; border-radius: 4px; margin: .5rem 0; padding: .5rem .75rem; }
|
|
legend { color: #aaa; }
|
|
label { display: inline-flex; gap: .3rem; align-items: center; margin: .15rem .9rem .15rem 0; }
|
|
select, input[type=number], input[type=text] { font: inherit; background: #111; color: #ddd; border: 1px solid #444; border-radius: 3px; padding: .1rem .3rem; }
|
|
button { font: inherit; padding: .35rem .9rem; background: #222; color: #fff; border: 1px solid #555; border-radius: 4px; cursor: pointer; margin: .25rem .5rem .25rem 0; }
|
|
button:disabled { opacity: .5; cursor: default; }
|
|
pre { white-space: pre-wrap; word-break: break-word; background: #111; padding: .6rem; border-radius: 4px; margin: .5rem 0; }
|
|
#report { white-space: pre; overflow-x: auto; word-break: normal; }
|
|
#log { max-height: 16rem; overflow: auto; color: #999; }
|
|
#warn { color: #fc6; }
|
|
#warn:empty { display: none; }
|
|
.dim { color: #888; }
|
|
#spinner { display: inline-block; width: .8rem; height: .8rem; border-radius: 50%; background: #8cf; animation: pulse 1s linear infinite; vertical-align: middle; }
|
|
@keyframes pulse { 0% { transform: translateX(0); } 50% { transform: translateX(1.5rem); } 100% { transform: translateX(0); } }
|
|
a { color: #8cf; }
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<main>
|
|
<h1>unkernel SMP probe</h1>
|
|
<p class="dim">Engine probes (A, no kernel, about a minute) and kernel experiments (B, a few minutes at 1x) to find out why several guest CPUs run slower than one in this browser. Keep this tab visible and in front, and other tabs and apps quiet, while it runs. When it is done, press Copy text (or Copy JSON) and paste the result. <a href="/profile.html">profile.html</a> · <a href="/">the page</a></p>
|
|
<pre id="warn"></pre>
|
|
<pre id="env"></pre>
|
|
<fieldset><legend>A: engine probes (no kernel)</legend><div id="probes"></div>
|
|
<label>probe memory MiB <input type="number" id="pmem" min="16" step="16" value="512" style="width:5rem"></label>
|
|
<label><input type="checkbox" id="nested" checked> workers nested in one worker (as the kernel's CPUs)</label>
|
|
</fieldset>
|
|
<fieldset><legend>B: kernel experiments</legend><div id="configs"></div><div id="variants"></div>
|
|
<label>distro <select id="distro"></select></label>
|
|
<label>memory MiB <input type="number" id="mem" min="64" step="64" value="512" style="width:5rem"></label>
|
|
<label>runs <input type="number" id="runs" min="1" max="10" value="1" style="width:3rem"></label>
|
|
<label>size <select id="scale"><option value="0.25">0.25x</option><option value="0.5">0.5x</option><option value="1" selected>1x</option><option value="2">2x</option></select></label>
|
|
<label>sizes <input type="text" id="sizes" placeholder="calibrated; or compute:N,syscall:N,fork:N" style="width:22rem"></label>
|
|
</fieldset>
|
|
<button id="runall">Run all</button><button id="runa">Run A</button><button id="runb">Run B</button><button id="stop" disabled>Stop</button><button id="copytext" disabled>Copy text</button><button id="copyjson" disabled>Copy JSON</button>
|
|
<span id="spinner"></span> <span id="status" class="dim">idle</span>
|
|
<h2>Report</h2>
|
|
<pre id="report" class="dim">Press Run all.</pre>
|
|
<h2>Log</h2>
|
|
<pre id="log"></pre>
|
|
</main>
|
|
<script type="module" src="/src/smp-probe.ts"></script>
|
|
</body>
|
|
</html>
|