Isolates scaling problem #55713
Labels
area-vm
Use area-vm for VM related issues, including code coverage, FFI, and the AOT and JIT backends.
library-isolate
P2
A bug or feature request we're likely to work on
triaged
Issue has been triaged by sub team
type-performance
Issue relates to performance or code size
On the CFE team we have quite a bit of "suites", to speed things up (and integrate with the approval system and whatnot) we have a "unit test suites" runner which launches the suites in isolates (using #cores-1 isolates).
My machine has 12 cores (with hyperthreading) and so it launches 11 isolates. According to
htop
though it only uses 4-500% CPU though. Prepending a run withtime
gives this:(Runs on f774ec5)
Using (user+sys)/real this becomes ~494% CPU.
If instead launching two processes, asking each to do half and only use 5 isolates each:
(run in two different terminals at the same time)
I get these numbers:
Using (user+sys)/real this becomes ~381% CPU.
and
Using (user+sys)/real this becomes ~374% CPU.
Adding up these numbers it becomes ~755% CPU (or ~747% if doing (user1+sys1+user2+sys2)/max(real1, real2)) --- in both cases quite a bit more than the <500% (more than 50% more actually).
Looking at the (real) runtime it's almost twice as fast (~87% faster, taking ~53.5% of the time).
So: Are isolates expected to be slower, is it being held wrong or is something else up?
@mraleph suggested that "the answer is probably our GC does not scale well for this usecase" and suggested I file a bug, so here we are.
The text was updated successfully, but these errors were encountered: