When to use Online Revision Cleanup as opposed to Offline Revision Cleanup?

Online Revision Cleanup is the recommended way of performing revision cleanup. Offline Revision cleanup should be used only on an exceptional basis - for example, before migrating to the new storage format or if you are requested by Adobe Customer Care to do so.

How to Run Online Revision Cleanup

Online Revision Cleanup is configured by default to automatically run once a day on both AEM Author and Publish instances. All you need to do is define the maintenance window during a period with the least user activity. You can configure the Online Revision Cleanup task as follows:

  1. In the main AEM window, go to Tools - Operations - Dashboard - Maintenance or point your browser to: https://serveraddress:serverport/libs/granite/operations/content/maintenance.html

    chlimage_1-90

  2. Hover over Daily Maintenance Window and click the Settings icon.

    chlimage_1-91

  3. Enter the desired values (recurrence, start time, end time) and click Save.

    chlimage_1-92

Alternatively, if you want to run the revision cleanup task manually, you can:

  1. Go to Tools - Operations - Dashboard - Maintenance or browse directly to https://serveraddress:serverport/libs/granite/operations/content/maintenance.html

  2. Click the Daily Maintenance Window.

  3. Hover over the Revision Cleanup icon.

  4. Click Run.

    chlimage_1-93

Running Online Revision Cleanup After Offline Revision Cleanup

The revision cleanup process reclaims old revisions by generations. This means that each time you run revision cleanup a new generation is created and kept on the disk. There is a difference however between the two types of revision cleanup: offline revision cleanup keeps one generation while online revision cleanup keeps two generations. So, when you run online revision cleanup after offline revision cleanup the following happens:

  1. After the first online revision cleanup run, the repository size doubles. This happens because there are now two generations that are kept on disk.
  2. During the subsequent runs, the repository will temporarily grow while the new generation is created and then stabilize back to the size it had after the first run, as the online revision cleanup process reclaims the previous generation.

Also, keep in mind that depending on the type and number of commits, each generation can vary in size compared to the previous one, so the final size can vary from one run to the other.

Due to this fact, it is recommended to size the disk at least two or three times larger than the initially estimated repository size.

Full And Tail Compaction Modes

AEM 6.5 introduces two new modes for the compaction phase of the Online Revision Cleanup process:

  • The full compaction mode rewrites all the segments and tar files in the whole repository. The subsequent cleanup phase can thus remove the maximum amount of garbage across the repository. Because full compaction affects the whole repository, it requires a considerable amount of system resources and time to complete. Full compaction corresponds to the compaction phase in AEM 6.3.
  • The tail compaction mode rewrites only the most recent segments and tar files in the repository. The most recent segments and tar files are those that have been added since the last time either full or tail compaction ran. The subsequent cleanup phase can thus only remove the garbage contained in the recent part of the repository. Because tail compaction only affects a part of the repository, it requires considerably less system resources and time to complete than full compaction.

These compaction modes constitute a trade-off between efficiency and resource consumption: while tail compaction is less effective it also has less impact on normal system operation. In contrast, full compaction is more effective but has a bigger impact on normal system operation.

AEM 6.5 also introduces a more efficient content deduplication mechanism during compaction, which further reduces the on-disk footprint of the repository.

The two charts below, present results from internal laboratory testing that illustrate the reduction of average execution times and the average footprint on disk in AEM 6.5 compared to AEM 6.3:

onrc-duration-6_4vs63 segmentstore-6_4vs63