AEM Offline Compaction for tarMK-based instances


Offline compaction is used to actually delete deleted objects in the tarMK repository. Offline compaction ensures good performance with tarMK.
The frequency of execution depends on the growth rate of the repository and so is determined over time.
Normally, publish AEM instances do not grow radically and so do not need frequent compaction.

Compaction ​must​ be done while the AEM instance is down .
One should log all the work done using standard methods such as terminal logging, screen logging, script, etc. in case problems occur.

The offline compaction procedure:
  1. shutdown the AEM instance 
  2. sudo su - dam 
  3. cd LOCAL-INSTANCE-DIRECTORY/crx-quickstart/repository 
  4. java -Dtar.memoryMapped=true -Xmx32G -jar /opt/aem/bin/oak-run-1.4.8.jar checkpoints segmentstore
  5. java -Dtar.memoryMapped=true -Xmx32G -jar /opt/aem/bin/oak-run-1.4.8.jar checkpoints segmentstore rm-unreferenced
  6. java -Dtar.memoryMapped=true -Xmx32G -jar /opt/aem/bin/oak-run-1.4.8.jar compact segmentstore

Note that the 32G argument should be changed depending on the server's available memory.

Comments

Popular Posts