How to Reclaim Wasted CRX3 Storage Using Off-line Tar File Compaction


Statement: Offline compaction in AEM 6.1

Environment:
§  JRE 1.7
§  AEM 6.1

Solution:

Due to continuing issues with MVCC revision cleanup, the recommended method to completely and reliably perform revision GC and re-claim storage space is via off-line tar file compaction.  Unfortunately, this requires downtime.  

Offline Compaction solution:

1) Determine disk usage BEFORE with:
du -sh /mnt/aem/author/crx-quickstart/repository/segmentstore
2) Determine the Oak version (/system/console)
3) Make sure you have the compatible version of the oak-run tool, see here(instructions here to build your own from source)
4) Backup AEM
5) Stop AEM
6) Find old checkpoints (assumes your server instance has at least 12 GB of memory - if not, reduce -Xms and -Xmx accordingly)
java -Dtar.memoryMapped=true -Xms8g -Xmx8g -jar oak-run-1.0.12.jar checkpoints /mnt/aem/author/crx-quickstart/repository/segmentstore
7) Find unreferenced checkpoints and delete them
java -Dtar.memoryMapped=true -Xms8g -Xmx8g -jar oak-run-1.0.12.jar checkpoints /mnt/aem/author/crx-quickstart/repository/segmentstore rm-unreferenced
8) Compact the segmentstore
java -Dtar.memoryMapped=true -Xms8g -Xmx8g -jar oak-run-1.0.12.jar compact /mnt/aem/author/crx-quickstart/repository/segmentstore
9) Start AEM
10) Determine disk usage AFTER with:
du -sh /mnt/aem/author/crx-quickstart/repository/segmentstore



No comments:

Post a Comment