Why Aren’t More Users More Happy With Our VMs? Part 1 (2018)
1–10 of 93 posts
Re: Why Aren’t More Users More Happy With Our VMs? Part 1 (2018)
#2I think that the use of small benchmarks obscures what’s going on. The VM is trying to win in the average. It’s like a professional gambler. Observing that the VM did something dumb for a program is like observing that a professional gambler lost a bet. That’s not interesting. In a game of chance, even a really great strategy will have its outliers.
I think that to understand the quality of a VM you have to throw millions of lines of code at it and see if the optimizing JIT can consistently produced speedups or at least produced speedups more often than not using some aggregate metric. As someone who studies the behavior of JSC on million line code bases, I can tell you that a pretty good outcome is if only a small number of functions experience an “upside down” effect from optimization and ends up running slower over time.
Finally, the whole search for a methodology to pinpoint warmup is broken. It’s pure brain damage. VMs need to be fast even for small programs that don’t have a chance to warmup. Startup time is absolutely important. So it’s a methodological antipattern to even try to find the warmup.
The questions worth asking are:
- for some program, how long does it take to run that program. Start to finish. No ignoring warmup.
- how long does it take to run some very long program or the average running time of a small program averaged over many iterations
- some percentile of behavior, like the 99th, to get an average of the janky behavior.
Ideally you measure all of those things and include both short running and long running programs.
This tells you how good a VM is.
If you’re doing math or methodology to identify the warmup point then you’re effectively biasing your experiment to forgive VMs for bad behavior so long as that bad behavior happens early. Nothing could be sillier. Users care about the perf of their VMs at startup not just in steady state.
Anyway, that’s the way I like to do optimizations in JSC.
Re: Why Aren’t More Users More Happy With Our VMs? Part 1 (2018)
#3Re: Why Aren’t More Users More Happy With Our VMs? Part 1 (2018)
#4I suspect that part of the issue is that when devs are writing and testing their code, they rarely keep the VM running for long enough to reach peak performance. So the performance still feels slow to developers, and performance issues still block the develop/reload/test cycle.
Some programs don’t “run long enough” in the way the VM needs even when users run those programs.
Re: Why Aren’t More Users More Happy With Our VMs? Part 1 (2018)
#5Re: Why Aren’t More Users More Happy With Our VMs? Part 1 (2018)
#6It would be better if VM comparisons included JSC rather than, or in addition to, V8. JSC tends to outperform V8 so if you find a pathology in V8 it’s just not so surprising. It would be more interesting if you found a pathology in JSC. I think that the use of small benchmarks obscures what’s going on. The VM is trying to win in the average. It’s like a professional gambler. Observing that the VM did something dumb f…
Re: Why Aren’t More Users More Happy With Our VMs? Part 1 (2018)
#7I suspect that part of the issue is that when devs are writing and testing their code, they rarely keep the VM running for long enough to reach peak performance. So the performance still feels slow to developers, and performance issues still block the develop/reload/test cycle.
I'd be surprised if the VM developers didn't run these.
More likely, the environment the VMs are run in has changed in the decades since their development: amount of RAM, cache size, latency of one subsystem over another....
Re: Why Aren’t More Users More Happy With Our VMs? Part 1 (2018)
#8Ugh at risk of being the grumpy old programmer: jit code is just never going to touch actual handwritten native code in performance. It's been like 50 years. If we care about performance we need languages for it.
Re: Why Aren’t More Users More Happy With Our VMs? Part 1 (2018)
#9Ugh at risk of being the grumpy old programmer: jit code is just never going to touch actual handwritten native code in performance. It's been like 50 years. If we care about performance we need languages for it.
I don't think JITs are the only way to address that trade-off in compilation time vs runtime performance metrics, and whether their benefits are worth their other costs is an interesting, program-dependant question, but they have strictly more information available than a naive compiler and can potentially use that to make better decisions.