Bulk Mirroring Configuration

Speed up Federation sync with parallel bulk mirroring and thread pool tuning.

Bulk event mirroring, introduced in Artifactory version 7.63.2, optimizes Federation performance by collecting events into bulks and sending them to the target mirror for parallel processing.

How Bulk Mirroring Works

Before bulk event mirroring was introduced, artifacts were copied to target mirrors sequentially one event at a time per repository. This limited the number of events that could be processed in a reasonable amount of time and sometimes resulted in HTTP network bottlenecks, especially between geographically distant members.

Bulk event mirroring bypasses potential HTTP network bottlenecks by collecting events into bulks, each dedicated to a single repository, and sending them to the target mirror. The target mirror assigns a dedicated thread pool to each bulk. Each pool contains multiple threads that upload artifacts to the local Artifactory in parallel. This parallel processing enables events to be uploaded much faster.

In addition to improving the standard event flow, bulk events also improve the performance of Full Sync operations. Bulk mirroring works with a cache mechanism, also introduced in 7.63.2, to greatly reduce the load on Artifactory during Full Sync operations.

bulk-event-mirroring2.png

Event Queue Properties

The following properties control how the Event Queue processes bulk mirroring events.

PropertyDescriptionDefault
artifactory.federated.mirror.events.bulk.exclude.repo.typesExcludes specific package types from bulk event mirroring. Use * for all, or comma-separated list (for example, docker,composer,npm)(none)
artifactory.federated.mirror.events.bulk.max.poolsNumber of available event processing thread pools (executors)4 (maximum: 5)
artifactory.federated.mirror.events.bulk.threadsPerPoolNumber of threads per pool (executor)4 (maximum: 5)
artifactory.federated.mirror.events.batch.message.bulk.sizeNumber of Event Queue events sent with each replication message to the target mirror100
artifactory.federated.mirror.events.bulk.executor.poll.timeout.minutesTime new requests wait if all processing pools are occupied2 minutes

For example, to raise the pool and thread limits toward their maximum in artifactory.system.properties:

artifactory.federated.mirror.events.bulk.max.pools=5
artifactory.federated.mirror.events.bulk.threadsPerPool=5

Bulk Property Fetching

Bulk fetching of event properties from the database was introduced in Artifactory release 7.100.x as an additional performance enhancement.

PropertyDescriptionDefault
artifactory.federated.bulk.properties.enabledEnable bulk property fetchingfalse (disabled)

Full Sync Event Properties

The following properties control how Full Sync events are processed. See the Scaling and Sizing Guide for thread pool sizing guidance.

PropertyDescriptionDefault
artifactory.federated.mirror.events.bulk.fullSync.threadsPerPoolThreads per pool for Full Sync events. Full Sync events take priority in a single dedicated executor.10 (max: determined by available processors)
artifactory.federated.mirror.events.bulk.fullSync.executor.wait.timeout.minutesWait time for Full Sync calls for other repositories while the pool works on a particular repository2 minutes
artifactory.full.sync.batch.retry.countNumber of retries for a failing batch during Full Sync5
artifactory.full.sync.batch.retry.quiet.period.secondsWait time between batch retries (requires Artifactory 7.77.3+)5 seconds

In-Memory Sorting for Full Sync

Full Sync queries can take a long time to perform and under extreme circumstances can sometimes fail to complete. If you determine that your database isn't sufficiently robust, you can sort queries in memory instead of in the database. The sort is performed according to depth, path, and name.

❗️

In-memory sorting is required when performing a Full Sync from a file.

The following properties control in-memory sorting for Full Sync operations.

PropertyDescriptionDefault
artifactory.federated.repo.full.sync.enabled.inMemorySorterEnables in-memory sorting for legacy Federation (in-Artifactory processing).false (sorting performed in the database)
rtfs.sync.in.memory.sort.enabledEnables in-memory sorting for RTFS Full Sync operations. Set under rtfs.persistence.federationProperties in system.yaml or Helm values.true
artifactory.federated.repo.full.sync.limit.entries.for.splitDetermines how many artifacts in the file list are sorted at one time for legacy Federation. Relevant only when in-memory sorting is enabled.400,000
rtfs.sync.amount.of.entries.in.fileDetermines how many artifacts in the file list are sorted at one time for RTFS. Set under rtfs.persistence.federationProperties. Relevant only when rtfs.sync.in.memory.sort.enabled is true.400,000
❗️

All Federation members must use the same in-memory sorting setting

Full Sync compares the local and remote file lists using a sorted merge. Database sort order (AQL or SQL collation) and in-memory sort order (Java lexicographic order) aren't always identical for the same filenames. If Federation members don't use the same value for artifactory.federated.repo.full.sync.enabled.inMemorySorter (legacy Federation) or rtfs.sync.in.memory.sort.enabled (RTFS) — for example, one member sorts in memory while another sorts in the database — Full Sync can incorrectly treat files that already match as missing, and unnecessarily re-copy artifacts that are already in sync.

Set the same value, either enabled or disabled, on every member in the Federation. Don't mix values across members.

Related Topics


Did this page help you?