Online Compaction for AEM 6.3

I recently was reading a thread on the AEM Tech slack board about online garbage compaction (also known as online revision cleanup) from user “edgar.nielsen” where he was asking about online compaction with AEM 6.3. In essence, he said that online compaction works now but he was not seeing much in the way of measurable compaction. He was wondering if anyone had much experience with it. “I tested it during the beta phase several times and it didn’t seem to ever compact very much. I would basically spin up an instance, add assets then delete them, then do datastore GC and online compactions once a day for 4-5 days, the space recovered was quite small. Once I stopped the instance and did an offline compaction, the space recovered was quite large like one would expect. Haven’t had time to test with the released 6.3 to see if the behaviour has changed.”

I was pretty interested in this because online compaction was one of the improvements that the Adobe team promised had returned for AEM 6.3. For reference, we recommended (based on things Adobe had stated themselves) that you turn it off for version 6.2 and lower because it didn’t work so well (see our article http://aempodcast.com/2016/infrastucture/not-rely-online-compaction-aem-6-x/).

It seems that online compaction will never be able to do as much as offline compaction; as the documentation states: “The offline mode can usually reclaim more space because the online mode needs to account for AEM’s working set which retains additional segments from being collected.” Despite Adobe’s documentation stating: “Offline Revision cleanup should be used only on a exceptional basis – for example, before migrating to the new storage format or if you are requested by Adobe Customer Care to do so,” Axis41 continues to consider regular Offline Compaction an important part of the long-term health of an AEM deployment. As this feature matures in upcoming releases, we will continue to follow its effectiveness.

According to the documentation from Adobe: “In AEM 6.3 Online Revision Cleanup is turned on by default and it is the recommended way of performing a revision cleanup.” From their FAQ:
Q: How frequently should Online Revision Cleanup be executed?
A: Once per day. This is the default configuration in the Operations Dashboard.

You will need to configure it so that it runs when you want it to. Thankfully, there are notes as to how to configure the maintenance window. I think more testing also needs to be done, so let us know what you see in your environments.