Change squashed multiplier

Fixes #992
This commit is contained in:
Joseph Schorr 2015-12-14 15:39:45 -05:00
parent 1323da20e3
commit 139321de80

View file

@ -19,9 +19,11 @@ class SquashedDockerImage(TarImageFormatter):
command.
"""
# TODO(jschorr): Change this multiplier to reflect the 99%-tile of the actual difference between
# the uncompressed image size and the Size reported by Docker.
SIZE_MULTIPLIER = 2
# Multiplier against the image size reported by Docker to account for the TAR metadata.
# Note: This multiplier was not formally calculated in anyway and should be adjusted overtime
# if/when we encounter issues with it. Unfortunately, we cannot make it too large or the Docker
# daemon dies when trying to load the entire TAR into memory.
SIZE_MULTIPLIER = 1.2
def stream_generator(self, namespace, repository, tag, synthetic_image_id,
layer_json, get_image_iterator, get_layer_iterator, get_image_json):