f77e3bc0ad
## Proposed Changes Add a new Cargo compilation profile called `maxperf` which enables more aggressive compiler optimisations at the expense of compilation time. Some rough initial benchmarks show that this can provide up to a 25% reduction to run time for CPU bound tasks like block processing: https://docs.google.com/spreadsheets/d/15jHuZe7lLHhZq9Nw8kc6EL0Qh_N_YAYqkW2NQ_Afmtk/edit The numbers in that spreadsheet compare the `consensus-context` branch from #3604 to the same branch compiled with the `maxperf` profile using: ``` PROFILE=maxperf make install-lcli ``` ## Additional Info The downsides of the maxperf profile are: - It increases compile times substantially, which will particularly impact low-spec hardware. Compiling `lcli` is about 3x slower. Compiling Lighthouse is about 5x slower on my 5950X: 17m 38s rather than 3m 28s. As a result I think we should not enable this everywhere by default. - **Option 1**: enable by default for our released binaries. This gives the majority of users the fastest version of `lighthouse` possible, at the expense of slowing down our release CI. Source builds will continue to use the default `release` profile unless users opt-in to `maxperf`. - **Option 2**: enable by default for source builds. This gives users building from source an edge, but makes them pay for it with compilation time. I think I would prefer Option 1. I'll try doing some benchmarking to see how long a maxperf build of Lighthouse would take on GitHub actions. Credit to Nicholas Nethercote for documenting these options in the Rust Performance Book: https://nnethercote.github.io/perf-book/build-configuration.html. |
||
---|---|---|
.. | ||
css | ||
js | ||
advanced_database.md | ||
advanced_metrics.md | ||
advanced_networking.md | ||
advanced-datadir.md | ||
advanced-pre-releases.md | ||
advanced-release-candidates.md | ||
advanced.md | ||
api-bn.md | ||
api-lighthouse.md | ||
api-vc-auth-header.md | ||
api-vc-endpoints.md | ||
api-vc-sig-header.md | ||
api-vc.md | ||
api.md | ||
builders.md | ||
checkpoint-sync.md | ||
cli.md | ||
contributing.md | ||
cross-compiling.md | ||
database-migrations.md | ||
docker.md | ||
faq.md | ||
graffiti.md | ||
homebrew.md | ||
http.md | ||
installation-binaries.md | ||
installation-priorities.md | ||
installation-source.md | ||
installation.md | ||
intro.md | ||
key-management.md | ||
key-recovery.md | ||
mainnet-validator.md | ||
merge-migration.md | ||
pi.md | ||
redundancy.md | ||
setup.md | ||
slasher.md | ||
slashing-protection.md | ||
suggested-fee-recipient.md | ||
SUMMARY.md | ||
system-requirements.md | ||
testnet-validator.md | ||
validator-create.md | ||
validator-doppelganger.md | ||
validator-import-launchpad.md | ||
validator-inclusion.md | ||
validator-management.md | ||
validator-monitoring.md | ||
validator-web3signer.md | ||
voluntary-exit.md | ||
wallet-create.md |