-
I've been adding graal support to a project I maintain, and one thing's been bugging me: even though the benchmarks are completely single threaded, Graal somehow peaks at 400% CPU (this is on an M1 Pro, so 8 P cores and 2 E cores). I figure GC is probably part of it but 3 cycles of GC per cycle of program seems high even if the bench was ridiculously garbage heavy. And the bench runs for nearly 2 minutes (~110 seconds) so it seems unlikely that the JIT is still JIT-ing at this point, kinda. I tried running some of the bundled tools, but they (pretty logically) only report my own code, it doesn't really talk about graal's side hustles. Is there a way to get insight into that? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
Which version of GraalPy have you tried? release or master?
Background compilation is done on separate threads. You can control the number of threads using the engine options:
In case you haven't looked at: One additional option you can try |
Beta Was this translation helpful? Give feedback.
-
It's possible that there are still some compilations happening. It could be a bug on our side or you keep creating new code (running |
Beta Was this translation helpful? Give feedback.
It's possible that there are still some compilations happening. It could be a bug on our side or you keep creating new code (running
eval
on changing code, creating new regexes) . You can see those with--experimental-options --engine.TraceCompilation=true