Compaction of TAR files:
1) Offline Compaction :
Download oak-run-*.jar from https://mvnrepository.com/artifact/org.apache.jackrabbit/oak-run, download the version same as the oak version you are using (Can be seen at right side of crx/de page).
Run Below commands,
- Shutdown aem
- java -jar oak-run-*.jar checkpoints /(path of aem installed folder)/crx-quickstart/repository/segmentstore
- java -jar oak-run-*.jar checkpoints /(path of aem installed folder)/crx-quickstart/repository/segmentstore rm-all
- java -jar oak-run-*.jar compact /(path of aem installed folder)/crx-quickstart/repository/segmentstore
- start aem
This will cleanup redundant data from repository.
2) Online compaction:
- Go to /libs/granite/operations/config/maintenance/granite:daily/granite:RevisionGC > property named granite.operations.condition.runmode to "crx3" from "crx3-disabled". The current value should be "crx3".
- Download oak hotfix from package of version same as your crx version. Install it.
- shutdown aem
To enable the online compaction, simply add the property "pauseCompaction" with value "false" in the below config. Create/Use the following config file to add it, for example:
/crx-quickstart/install/org.apache.jackrabbit.oak.plugins.segment.SegmentNodeStoreService.cfg
pauseCompaction=false
Note:The online compaction is less efficient than offline compaction and its effect can only be observed over a prolonged period of time (a couple of days). You should not expect removed content to be garbage collected right away as the content might still be referenced by other sessions
Offline compaction gives immediate results on successful run than online