Docker V1 vs V2 – Are there any differences in storage consumption?

JFrog Support
2016-10-06 13:35

Besides some new DB references, the migration process should not consume additional space. The Storage Summary page in the Artifactory UI could indicate a larger space utilization for the V2 repository if you compare it with the V1 repository that you migrated, however, this still does not mean that a larger amount of disk space will actually be consumed by the V2 repository. 

This is due to the fact that a V2 docker repo is structured in a different way when compared to a V1 repository. In V1, blobs (or layers) are stored globally inside the ".images" directory, where as in V2, the structure requires all blobs to be present in each tag's specific path. 

This means that some blobs that are shared by several images will get multiple DB references in a V2 repository. Since Artifactory's storage is checksum based, Artifactory will only create cheap DB references for those newly created V2 files, and there won't be an additional filesystem storage consumption. You could be seeing a larger disk space utilization when examining the V2 repo in the Storage Summary page due to the fact that Artifactory denotes the space that will be consumed if the repository was to be exported (with repository export or full system export/backup), since exports are not checksum based (which would translate to each binary times all it's references).