GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||
GeezerVison is showing github.com — Guest CPU time includes host load: expose steal time (or a PMU) to the Linux VM · Issue #2788 · orbstack/orbstack Open DescriptionIs your feature request related to a problem? Please describe. Inside OrbStack's Linux VM, a process's CPU time grows with the host's load, because the guest is never told when its vCPU was descheduled. The steal column in That makes CPU time useless inside the VM as a measure of how much work a process did. That's the usual way a build or test runner tells a process that is slow from one that is spinning, so the runner gets killed for host load it can't see. Measured on an M1 Pro, macOS 26.3.1, OrbStack 2.0.5, with the same fixed loop (2e9 iterations in Node, CPU read through
On macOS the work's CPU time doesn't move with load. In the guest it tripled, and it matched the wall time exactly: the whole time the vCPU was waiting for the host was counted as the process's own CPU. To reproduce: # steal stays 0 in the guest, idle or under host load docker run --rm alpine sh -c 'head -1 /proc/stat' # fixed work, CPU time as the guest accounts it; run once with the Mac idle and once with it saturated docker run --rm --cpus 2 node:24-bookworm node -e 'const c=process.cpuUsage();let x=0;for(let i=0;i<2e9;i++)x+=i%7;const u=process.cpuUsage(c);console.log((u.user+u.system)/1e6)' The other load-independent measure of work, retired-instruction counts, isn't available either: the guest has no CPU PMU ( Describe the solution you'd like Either of:
Describe alternatives you've considered
Additional context Cloud CI on KVM hypervisors has steal accounting, so the same runner code does get accurate CPU time there. OrbStack is where it doesn't. ActivityMetadataMetadataAssigneesLabelsNo labels TypeProjectsMilestoneRelationshipsDevelopmentIssue actions | |||||||||
| You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |