Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adjust codegen-units in optimized builds #4164

Open
brson opened this issue Jan 31, 2019 · 3 comments
Open

Adjust codegen-units in optimized builds #4164

brson opened this issue Jan 31, 2019 · 3 comments
Labels
component/build-time Component: Compilation time

Comments

@brson
Copy link
Contributor

brson commented Jan 31, 2019

Would be nice to have this. Note the issues blocking this, listed in a TODO in tikv's Cargo.toml:

@brson brson added the component/build-time Component: Compilation time label Jan 31, 2019
@brson
Copy link
Contributor Author

brson commented Feb 10, 2019

Related to #4189 - we probably only want multiple code-gen units in "dev optimized" builds, not true published release builds.

@brson
Copy link
Contributor Author

brson commented Mar 14, 2019

Close seems to be accidental.

@brson
Copy link
Contributor Author

brson commented Mar 20, 2019

I wrote a script to capture max RSS for rustc

https://github.com/brson/measure-rustc-rss

command: RUSTC_WRAPPER="measure-rustc-rss.sh" make x-build-dev-nopt
toolchain: rustc 1.35.0-nightly (a9da8fc9c 2019-03-04)
platform: Linux

[profile.dev]
opt-level = 0
debug = false
rpath = false
lto = false
debug-assertions = true
codegen-units = 1
panic = "unwind"
incremental = true
overflow-checks = true

debug=false, panic=unwind, opt-level=0, codegen-units=1, incremental=true, lto=false:

tikv rss: 1728404k
tikv-(server|importer|ctl) rss: 3872556k

debug=false, panic=unwind, opt-level=0, codegen-units=16, incremental=true, lto=false:

tikv rss: 1729776k
tikv-(server|importer|ctl) rss: 3964692k

codegen-units on it's own appears to have little impact on memory usage. maybe it's in combination with full LTO that the rss gets bad

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/build-time Component: Compilation time
Projects
Development

No branches or pull requests

1 participant