mirror of
https://github.com/facebook/proxygen.git
synced 2025-08-11 16:22:38 +03:00
Easy: Improve ccache sizing
Summary: When I was testing ccache in detail, I actually bootstrapped with a 1.8GB max cache size for Bistro. It looked like we were using only 1.2-1.3 GB uncompressed, so I figured that adaptively setting the maximum to be 30% more would be fine. My two mistakes were: - ccache uses decimal megabytes, so 30% became 25%. - ccache's LRU is kind of lossy so your max cache size has to be a LOT larger than the real thing to avoid inducing significant misses from cache cleanups. I should note that ccache still did speed up both the Bistro and the Proxygen builds somewhat, but cache miss rates seem too high, especially for builds that are not changing any headers. However, the current speedups are more like 20-30% rather than 3x. This is an attempt to decrease cache miss rates to 0 for no-source-change rebuilds. I'm not too worried about cache bloat, since (a) even 400MB tarballs should still work fine for our caches, (b) I have no evidence that ccache would actually ever get to its max. I also noticed & fixed that my `ccache.log` in the Docker container was empty due to permissions issues. Reviewed By: zpao Differential Revision: D5687199 fbshipit-source-id: a500c90f0c74797e3e4c8dc17de44977d86b1b70
This commit is contained in:
committed by
Facebook Github Bot
parent
ef78791c1f
commit
7463b5ca63
@@ -162,6 +162,8 @@ class DockerFBCodeBuilder(FBCodeBuilder):
|
||||
# Record the current time to let travis_build.sh figure out
|
||||
# the number of bytes in the cache that are actually used --
|
||||
# this is crucial for tuning the maximum cache size.
|
||||
'date +%s > /FBCODE_BUILDER_CCACHE_START_TIME'
|
||||
'date +%s > /FBCODE_BUILDER_CCACHE_START_TIME && '
|
||||
# The build running as `nobody` should be able to write here
|
||||
'chown nobody /tmp/ccache.log'
|
||||
)),
|
||||
]
|
||||
|
Reference in New Issue
Block a user