ayakout
ayakout

Reputation: 59

Best way to save Artifactory storage

Is it better to compress files before storing in Artifactory to save storage or otherwise does Artifactory already compresses the uploaded files by default so storage is used efficiently?

What is the best way to save Artifactory storage. Upload compressed or uncompressed files?

Upvotes: 1

Views: 1038

Answers (1)

Dror Bereznitsky
Dror Bereznitsky

Reputation: 20376

Artifactory does not compress files in order to save storage space. There are a couple of reasons for it:

  1. Most standard package type are already compressed using zip, gzip, bzip etc.
  2. In terms of performance, it would be quite wasteful to decompress the artifacts every time someone needs to download it

Artifactory saves storage space by using a checksum based storage. Artifactory stores any binary file only once. This is what we call "once and once only storage". First time a file is uploaded, Artifactory runs the required checksum calculations when storing the file, however, if the file is uploaded again (to a different location, for example), the upload is implemented as a simple database transaction that creates another record mapping the file's checksum to its new location. There is no need to actually store the file again in storage. No matter how many times a file is uploaded, the filestore only hosts a single copy of the file.

The best way to way to use storage more efficiently with Artifactory would be cleaning up unused artifacts. For more information about how this can be done, take a look at Managing Disk Space Usage in the Artifactory documentation.

Upvotes: 3

Related Questions