We continue our exploration of PostgreSQL build system performance. A
long time ago, I wrote an
article
about how to optimize the performance of make install
. This was
quite helpful, as it reduced the time from 10.493 s by default to
1.654 s with some tweaks (6x faster). Now, with different hardware, a
much newer PostgreSQL, and a new build system looming, let’s take
another look.
First, let’s check the time for a standard make install
run and then
how the optimizations suggested in the old article work.
Command | macOS 13 | Ubunty 22.04 |
---|---|---|
make install |
2.384 s | 1.472 s |
make install enable_nls=no |
1.634 s | 1.090 s |
make install -s |
2.342 s | 1.326 s |
make install -jN |
0.984 s | 0.666 s |
make install enable_nls=no -s -jN |
0.784 s | 0.464 s |
Ok, the default is already much better than in the olden days. But
with some additional techniques applied it’s still 3x faster!
There are two tricks suggested in the old article that I did not show
here: First, it suggested using dash instead of the default shell bash
at the time. The Ubuntu system used here already uses dash by
default. I tried dash on the macOS system, but it performed much
worse (weird?). Second, the old article suggested overriding the
install
program. That information is obsolete, because configure
has been changed — in response to that article — to pick up an
available install
program automatically (commit
9db7ccae20).
Now, in order to compare this to Meson below, we need to check make
, so that we install the same set of files. So
install-world-bin
let’s get some baselines with that command.