3 ms·
Anyone who is using a distro package of pg has the largest opportunity because they are all built wrong. A peak-optimized binary will get you much more than 4%
by jeffbee 5y ago
Anyone who is using a distro package of pg has the largest opportunity because they are all built wrong. A peak-optimized binary will get you much more than 4% speed up over generic packages.
- Bootvis 5y agoCan you please elaborate, what’s wrong and what do I need to do when building from source?
- adgjlsfhk1 5y agocompile with --march=native can often be significant.
- jeffbee 5y agoCompiling for your target is good, not using the PLT for mem* functions helps a ton, feedback-directed optimization and LTO and/or post-link optimization helps the most. For CPU-bound workloads of course.
- mayama 5y agoWill native march option work in case of cloud where you're not in control of cpu?
- jeffbee 5y agoI haven't used a cloud where you don't dictate the exact CPU you want. EC2, GCE, and Azure all provide specific guarantees. Even if you wanted a generic any-cloud binary you would probably compile with -march=skylake or, if truly paranoid, sandybridge. Many distro packages are, by contrast, compiled for k8-generic. Freaking Opteron! BTW "native" is not really recommendable. One really ought to target a particular platform.
- brianwawok 5y agoDo google and AWS hosted postgres do this? I assume, but I am not sure how to check.
- jeffbee 5y agoI don't know but it would be out-of-character for Google to have a C program that wasn't optimized to the hilt.
- brightball 5y agoUsing PG for years and this is the first time somebody made me aware of this, so thank you.