You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
--compressed-caching Compress the cached layers. Decreases build time, but increases memory usage. (default true)
Which leads one to believe this is disabling the compression of layers.
This is not the case as far as my understanding of the code, followed by a quick test.
What this flag really does, is disable the in RAM caching of compressed data in the library google/go-containerregistry/pkg/v1/tarball. To save on CPU time by avoiding re(de?)-compressing the same data multiple time. In exchange, this appears to consume a tremendous about of RAM as reported by many issues. Which is consistent with with my understanding of the code, that it is holding the full layer in memory. A common word for it is memoization.
Assuming my findings are correct, we could change the doc to:
--compressed-caching Hold compressed data in memory to save on compressing multiple time the same data. Consumes as much memory as the compressed sizes of layers. True by default.
The text was updated successfully, but these errors were encountered:
The doc says:
Which leads one to believe this is disabling the compression of layers.
This is not the case as far as my understanding of the code, followed by a quick test.
What this flag really does, is disable the in RAM caching of compressed data in the library google/go-containerregistry/pkg/v1/tarball. To save on CPU time by avoiding re(de?)-compressing the same data multiple time. In exchange, this appears to consume a tremendous about of RAM as reported by many issues. Which is consistent with with my understanding of the code, that it is holding the full layer in memory. A common word for it is memoization.
References:
A quick test to confirm this flag doesn't control the compression of layers:
Output:
Assuming my findings are correct, we could change the doc to:
--compressed-caching Hold compressed data in memory to save on compressing multiple time the same data. Consumes as much memory as the compressed sizes of layers. True by default.
The text was updated successfully, but these errors were encountered: