Tar Compaction Using OAK | Community
Skip to main content
amoghd64765494
New Participant
March 8, 2016
Solved

Tar Compaction Using OAK

  • March 8, 2016
  • 3 replies
  • 1934 views

Hi All,

As AEM 6.0 consumes too much disk space because of Tar files getting created after every package install. I am using OAK offline tar compaction to reduce the disk space. And there are certain doubts and difficulties i am facing while doing this.

Doubts: How much free disk space is required to run Offline tar compaction if I am having 20GB of tar files in AEM ? Are there any free ram/disk space requirements to run this ?

Difficulties: After completion of compaction its showing like 6GB space got free but when i see the folder size it reduced only by 1-2 GB. ???

Need an urgent suggestions or guidelines on these.

Thanks,
Amogh 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by kautuk_sahni

Hi

As mentioned by Lokesh, this jar is of around 49MB and can be downloaded from :- http://mvnrepository.com/artifact/org.apache.jackrabbit/oak-run

Please follow this documentation for your help:-

Link:- https://docs.adobe.com/docs/en/aem/6-0/deploy/upgrade/microkernels-in-aem-6-0.html#Offline%20Compaction

Link:- http://adobeaemclub.com/oak-tarmk-compaction/

//

The procedure to run the tool is:

  • Always make sure you have a recent backup of the AEM instance.

    Shut down AEM.

  • Use the tool to find old checkpoints:

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

    Code samples are intended for illustration purposes only.

  • Then, delete the unreferenced checkpoints:

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

    Code samples are intended for illustration purposes only.

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

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

    Code samples are intended for illustration purposes only.

    I hope this will help you.

    Thanks and Regards

    Kautuk Sahni

    3 replies

    kautuk_sahni
    kautuk_sahniAccepted solution
    Employee
    March 9, 2016

    Hi

    As mentioned by Lokesh, this jar is of around 49MB and can be downloaded from :- http://mvnrepository.com/artifact/org.apache.jackrabbit/oak-run

    Please follow this documentation for your help:-

    Link:- https://docs.adobe.com/docs/en/aem/6-0/deploy/upgrade/microkernels-in-aem-6-0.html#Offline%20Compaction

    Link:- http://adobeaemclub.com/oak-tarmk-compaction/

    //

    The procedure to run the tool is:

    • Always make sure you have a recent backup of the AEM instance.

      Shut down AEM.

    • Use the tool to find old checkpoints:

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

      Code samples are intended for illustration purposes only.

    • Then, delete the unreferenced checkpoints:

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

      Code samples are intended for illustration purposes only.

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

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

      Code samples are intended for illustration purposes only.

      I hope this will help you.

      Thanks and Regards

      Kautuk Sahni

      Kautuk Sahni
      Lokesh_Shivalingaiah
      New Participant
      March 8, 2016

      For your first question, you dont need any separate space other than the size of the tool. oak-run-1.2.11.jar has around 48MB and if you have so much to store that file would be sufficient.

      For the second question, compaction runs on repository folder and the size difference would definitely reduce much more than 1-2 GB for 20GB tar files. Please make sure you are checking the size on a right folder! It may also depends on your data aswell.

      smacdonald2008
      New Participant
      March 8, 2016

      There is a new community artilce on this: 

      http://adobeaemclub.com/oak-tarmk-compaction/

      See if this helps.