Using the latest version?
JFrog Container Registry Guide


Skip to end of metadata
Go to start of metadata

Overview

JFrog Container Registry provides several facilities allowing you to maintain your system for optimal performance.

To configure your global system maintenance, in the Admin module select Advanced | Maintenance.

JFrog Container Registry Cloud Users

JFrog manages regular maintenance operations for all instances of JFrog Container Registry Cloud. If you are an JFrog Container Registry Cloud user, the features described on this page are all monitored and optimally managed for you by JFrog Container Registry Cloud administrators.

Page Contents



Garbage Collection

Garbage Collection

JFrog Container Registry uses checksum-based storage to ensure that each binary file is only stored once.

When a new file is deployed, JFrog Container Registry checks if a binary with the same checksum already exists and if so, links the repository path to this binary. Upon deletion of a repository path, JFrog Container Registry does not delete the binary since  it may be used by other paths. However, once all paths pointing to a binary are deleted, the file is actually no longer being used. To make sure your system does not become clogged with unused binaries, JFrog Container Registry periodically runs a "Garbage Collection" to identify unused ("deleted") binaries and dispose of them from the datastore. By default, this is set to run every 4 hours and is controlled by a cron expression.

For example, to run garbage collection every 12 hours you should specify the following expression: 

0 0 /12 * * ?
Cron Expression
Specifies the frequency in which garbage collection should be run automatically
Next Run Time
Indicates the next automatic run of garbage collection according to the specified Cron Expression
Run Now
Manually invokes garbage collection immediately

Garbage collection frequency

Garbage collection is a resource intensive operation. Running it too frequently may compromise system performance.

The Garbage Collection cleanup strategy fetches and undeploys the trashcan artifacts located under the trashcan repository that are older than 14 days (or configured otherwise).
The linked binary is deleted if is no other artifact reference exists for this checksum. The cleanup also runs on multiple threads  (configurable, 'artifactory.gc.numberOfWorkersThreads=3').

Note

Unreferenced binaries, (including existing unreferenced binaries or artifacts that were manually deleted from the trashcan), will be deleted during the previous Full GC strategy that runs every 20 GC iterations (configurable, 'artifactory.gc.skipFullGcBetweenMinorIterations=20').



Storage Quota Limits

JFrog Container Registry lets you set a limit on how much of your entire system disk space storage may be used to ensure that your server file system capacity is never used up. This helps to keep your system reliable and available.

Once disk space used for storage reaches the specified limit, any attempt to deploy a binary is rejected by JFrog Container Registry with a status code of  413 Request Entity Too Large and a "Datastore disk space is too high" error is displayed at the bottom of the Maintenance screen.

  • When using filesystem storage, the partition checked is the one containing the $ARTIFACTORY_HOME/data/filestore directory.
  • When using database blob storage, the partition checked is the one containing the $ARTIFACTORY_HOME/data/cache directory.
  • When using the S3 template, the cache-fs will be the checked partition, by default is the $ARTIFACTORY_HOME/data/cache directory.

To help you avoid reaching your disk space quota, JFrog Container Registry also allows you to specify a warning level. Once the specified percentage of disk space is used, JFrog Container Registry will log a warning in the $ARTIFACTORY_HOME/logs/artifactory.log file and  display a "Datastore disk space is too high" warning at the bottom of the Maintenance screen.

Enable Quota Control
When set, JFrog Container Registry will monitor disk space usage and issue warnings and errors according to the quotas specified in Storage Space Limit and Storage Space Warning
Storage Space Limit
The percentage of available disk space that may be used for storage before JFrog Container Registry rejects deployments and issues errors
Storage Space Warning
The percentage of available disk space that may be used for storage before JFrog Container Registry issues warnings

Cleanup Unused Cached Artifacts

Cleanup Unused Cached Artifacts

When configuring a remote repository, the Keep Unused Artifacts setting lets you specify how long a cached unused artifact from that repository should be kept before it is a candidate for cleanup. This setting does not immediately clean up the unused cached artifact, but merely marks it for clean up after the specified number of hours. The Cleanup Unused Cached Artifacts  setting specifies when the cleanup operation should run, and only then unused, cached artifacts marked for cleanup are actually removed from the system.

 The cleanup frequency is specified with a cron expressionFor example, to run cleanup every 12 hours you should specify the following expression:  

0 0 /12 * * ?

Cleanup Virtual Repositories

Cleanup Virtual Repositories

Virtual repositories use an internal cache to store aggregated metadata such as POM files. The Cleanup Virtual Repositories operation deletes cached POM files that are older than 168 hours (one week) 

The cleanup frequency is specified with a cron expressionFor example, to run cleanup every 12 hours you should specify the following expression:  

0 0 /12 * * ?



Storage

Compress the Internal Database

Derby database only

This feature is only relevant when using the internal Derby database

A Derby database may typically contain unused allocated space when a large amount of data is deleted from a table or its indices are updated. By default, Derby does not return unused space to the operating system. For example, once a page has been allocated to a table or index, it is not automatically returned to the operating system until the table or index is destroyed.

When you invoke this action, JFrog Container Registry reclaims unused and allocated space in a table and its indexes thereby compressing the internal database.

We recommend running this when JFrog Container Registry activity is low, since compression may not be able to complete when storage is busy (in which case the storage will not be affected).

Prune Unreferenced Data

Unreferenced binary files may occur due to running with wrong file system permissions on storage folders, or running out of storage space.

When you invoke this action, JFrog Container Registry removes unreferenced binary files and empty folders present in the filestore or cache folders.

Ensure complete shutdown

To avoid such errors, we recommend that you always allow JFrog Container Registry to shut down completely




  • No labels