Machine Bias in Profiler-Based Optimization
Join the DZone community and get the full member experience.
Join For Freetake a look at the following profilers results. they both showcase pretty much the same codebase, without any major changes in between. however, they have been both run on different machines, and they result in very different performance optimization paths.
main machine:
laptop:
as you can see, when running the code on my main machine, the most expensive thing is actually writing to disk (writetojournal). however, on my laptop, writing to disk is actually very cheap. the likely reason is, again, my laptop is faking writing to disk in favor of buffering writes, even though we explicitly tell it not to. that means that it behaves as if it is we already optimized writing to disk. my main machine behaves more like a server, and we see a lot more i/o costs, which pretty much mask any other costs that we might have.
using the profiler to guide you with regards to how to optimize the system on any one of those machines would lead you in very different paths. with voron, we are testing it in a variety of scenarios, to make sure that we aren’t optimizing for one particular machine and hurting another.
Published at DZone with permission of Oren Eini, DZone MVB. See the original article here.
Opinions expressed by DZone contributors are their own.
Comments