From 5b0e8bc8a1d46f5b92692a238be061cc1a7cd313 Mon Sep 17 00:00:00 2001 From: asolana <110843012+ksolana@users.noreply.github.com> Date: Tue, 3 Dec 2024 09:02:40 -0800 Subject: [PATCH] Thinlto for validator builds. (#3516) # Problem - Current builds do not use thinlto and we are leaving performance on the table. # Summary of Changes - Enable thinlto, the debug-info can't be packed as it gives build error duplicate split compilation unit # Performance improvements Results With thinlto and no debuginformation [2024-11-23T05:30:31.476026905Z INFO solana_bench_tps::bench] Average max TPS: 74236.48, 0 nodes had 0 TPS [2024-11-23T05:30:31.476031453Z INFO solana_bench_tps::bench] Highest TPS: 74236.48 sampling period 1s max transactions: 4073007 clients: 1 drop rate: 0.78 Without thinlto and no debuginformation [2024-11-23T06:24:32.517039914Z INFO solana_bench_tps::bench] Average max TPS: 66351.46, 0 nodes had 0 TPS [2024-11-23T06:24:32.517061405Z INFO solana_bench_tps::bench] Highest TPS: 66351.46 sampling period 1s max transactions: 4302710 clients: 1 drop rate: 0.76 [2024-11-23T06:24:32.517083186Z INFO solana_bench_tps::bench] Average TPS: 47228.938 --- Cargo.toml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Cargo.toml b/Cargo.toml index 2e0985d2fa950b..a234bfcedd9845 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -3,6 +3,10 @@ inherits = "release" debug = true split-debuginfo = "packed" +[profile.release] +split-debuginfo = "unpacked" +lto = "thin" + [workspace] members = [ "account-decoder",