mirror of
https://github.com/kata-containers/kata-containers.git
synced 2026-05-14 19:17:07 +00:00
kata-deploy: size-optimise the release profile
Apply per-package release-profile overrides for the kata-deploy crate only: opt-level = "z" # optimise for size, not speed codegen-units = 1 # let LLVM see the whole crate when inlining The binary is throwaway: it runs once at DaemonSet pod start, finishes the install in seconds, and then sits idle waiting for SIGTERM. There is no hot path to optimise for speed, so trading a bit of compile time and a few percent of CPU for a meaningfully smaller text segment is the right call here. These overrides live at the workspace root and are scoped via [profile.release.package."kata-deploy"], so they do not affect the agent, runtime-rs, dragonball, or any of the libs / tools crates. Fixes: https://github.com/kata-containers/kata-containers/discussions/12976 Signed-off-by: Fabiano Fidêncio <ffidencio@nvidia.com> Assisted-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
10
Cargo.toml
10
Cargo.toml
@@ -199,3 +199,13 @@ tracing-subscriber = "0.3.20"
|
||||
ttrpc = "0.8.4"
|
||||
url = "2.5.4"
|
||||
which = "4.3.0"
|
||||
|
||||
# Per-package release profile overrides for kata-deploy. The kata-deploy
|
||||
# binary runs once at pod start and then idles waiting for SIGTERM, so we
|
||||
# size-optimise it (opt-level = "z") and keep codegen-units = 1 to give
|
||||
# the optimiser the whole picture. These overrides only affect the
|
||||
# kata-deploy crate; agent / runtime-rs / dragonball compile with their
|
||||
# usual defaults.
|
||||
[profile.release.package."kata-deploy"]
|
||||
opt-level = "z"
|
||||
codegen-units = 1
|
||||
|
||||
Reference in New Issue
Block a user