Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.
This repository was archived by the owner on Nov 15, 2023. It is now read-only.

Optimize validator binaries with LTO #4311

@crystalin

Description

@crystalin

Currently, the polkadot binary is generated with the default release profile. This allow a good binary with a decent compilation time.
However using compilations options CARGO_PROFILE_RELEASE_LTO=true RUSTFLAGS="-C codegen-units=1" cargo build --release , it provides a much more efficient binary, 200-400% cpu perf (at the cost of twice longer to compile).

I suggest to not include it in the Cargo.toml to avoid people developing on it to get a longer compilation time. In Moonbeam, we include it only in the CI for the release binary and we added those flags in the documentation for operators building their own binary.

I believe it is important to start optimizing the validators as it is becoming a bottleneck to process the parachain blocks in time.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions