Remove the build directory as soon as possible when installing a package - #6906
Conversation
|
Tested over 40_000 times with great success together with #6440. Max disk + RAM usage goes from 4-10GB down to < 2GB per install. |
rjbou
left a comment
There was a problem hiding this comment.
Génial! lgtm on the idea.
tiny comment + it worth adding a bench if possible.
| @@ -868,13 +876,7 @@ let parallel_apply t | |||
| | `Remove nv -> | |||
| OpamAction.cleanup_package_artefacts t nv | |||
| (* if reinstalled, only removes build dir *) | |||
There was a problem hiding this comment.
This comment is tied to which line ?
b0da0ac to
186730d
Compare
done. I've added the bench in #6912 and rebased this PR on top of it to check the result. |
6adb851 to
db02709
Compare
|
Compared to baseline (#6912), the benchmark shows a 0.3% performance degradation of regular installs and a 5% performance improvement on IO-constrained filesystems (simulated as much as i could) |
rjbou
left a comment
There was a problem hiding this comment.
We need a final check on the bench to rerun once rebased, and if it confirms it should be ok (there is no reason that the gain changes)
What is the reason of this degradation ? |
rm of the build dir are sequential and block the next install when installing fast packages to build so it's very slightly slower when the builds are too fast |
ac57f09 to
ba5f616
Compare
|
Ignoring the build failure on cygwin (#7030)
Latest diff is -0.1% and -1.3%, well within the margin of fluctuation. The main improvement is RAM usage over time anyway, not the performance improvement. |
Fixes #5884
Queued on #6912