AEM 6.0 (TarMK) occupying huge amount of diskspace

Recently, I came across an issue in my project where all the AEM servers, Dev, QA, and Stage were occupying huge amount of disk space. All the servers are running on AEM 6.0 and we don’t have much content on the server so it didn’t made sense to me. I checked the Adobe Blog and found that it’s a known issue and Adobe has released a service pack for it. I used the below procedure to install the service pack and free up the disk space.

These steps are prepared using this release notes:

http://docs.adobe.com/docs/en/aem/6-0/release-notes-sp1.html

And

http://help-forums.adobe.com/content/adobeforums/en/experience-manager-forum/adobe-experience-manager.topic.html/forum__dsq1-if_you_are_usingoak.html

Step 1: Download the service pack from Adobe package share.

  • Log on to this link, go to “ASSETS” tab and click on “Download to disk: AEM 6.0 Service Pack 1-1.0” link.
  • This should download the service pack to your local system.

Step 2: Restart the AEM server.

Step 3: Once the AEM server is up, go to package manager using “http:<hostname>:<portname>/crx/packmgr” and upload the “AEM 6.0 Service Pack 1-1.0.zip” file downloaded from the package share and click on install.

Step 4: Wait until the full package is installed.

Step 5: Run a check on the instance if everything is working as expected.

 

Reducing the repository size

Download this jar file:

http://docs.adobe.com/content/docs/en/aem/6-0/deploy/upgrade/microkernels-in-aem-6-0/_jcr_content/par/download/file.res/oak-run-1.0.5.jar

Step 1: shut down AEM

Step 2: Use the tool to find checkpoints using the below commands:

java -jar oak-run.jar checkpoints install-folder/crx-quickstart/repository/segmentstore

Step 3: Then, delete the checkpoints using the below command:

java -jar oak-run.jar checkpoints install-folder/crx-quickstart/repository/segmentstore rm-all

Step 4: Finally, run the compaction and wait for it to complete:

java -jar oak-run.jar compact install-folder/crx-quickstart/repository/segmentstore

Step 5: start the AEM server and perform an environment check and you’re done.

 

The above steps helped me to free the disk space up to 90%. (Before clean up the instance was taking 23 GB, after clean up it’s taking 4 GB) 🙂

7 responses to “AEM 6.0 (TarMK) occupying huge amount of diskspace”

  1. chenulu Avatar
    chenulu

    I would suggest the steps be reversed. First the tar cleanup, then service pack installation. coz, when the disk space is low due to AEM taking a lot of space the service pack installation is failing. compacting the tar and then updating AEM worked good for me.

  2. Bio Realm Avatar

    If you are running a local AEM instance, then the proper link to download and install SP1 would be:

    http://localhost:4502/crx/packageshare/login.html

  3. Tim J Avatar
    Tim J

    Nice article on the steps to do the cleanup, note that re-indexing can be very expensive on large repositories. In my experience there are issues with how AEM 6.0 handles indexing at this time, especially around ordered indexes and the performance of re-indexing.

    Point #1 If you run the java -jar oak-run.jar checkpoints install-folder/crx-quickstart/repository/segmentstore rm-all This will force a full re-index of all content and within our large environments this could take up to a day for the indexing to complete. There are some new releases of oak-run (1.0.6) which are providing more options such as: java -jar oak-run.jar checkpoints install-folder/crx-quickstart/repository/segmentstore rm-unreferenced which will leave existing indexes in place by not removing checkpoints which are valid and critical for maintaining your indexes when attempting to compact an environment.

    Point #2 I have experienced OOM errors with oak-run with large environments that have many Tar files, this issue can usually be worked around by allocating more memory on the startup of the command via —Xm options, but in some scenarios, I have seen where the physical box did not have enough memory to complete these commands.

  4. Howard Avatar
    Howard

    Thank you for your blog. I encountered almost the same issue but the version of AEM is 5.6.1. Does it have any equivalent solution?

  5. Diego Silva Avatar

    hey buddy, your post SAVED me… heheheh

    But after all these processes, the segmentstore folder keeps increasing automatically at 5~7KB per minute, even though not using AEM.

    Is that normal?

    1. Ty Baldwin Avatar
      Ty Baldwin

      I have this issue as well. After installing our content package into AEM, the log shows Oak is indexing, and it chews up about 50MB a minute until the disk is full. The content package is 8GB, and after initial install, it causes the quickstart to be about 40GB, but after about an hour, it’s 80GB, and continues to grow. But I usually run out of disk space by this time. We are using AEM 6.1.

Leave a reply to Ty Baldwin Cancel reply