I have almost clear whole dam via script and tested. Sites are working fine. all dam folders and assets added by users are deleted. and then run
1. java -jar oak-run-1.8.4.jar checkpoints crx-quickstart/repository/segmentstore
2. java -jar oak-run-1.8.4.jar checkpoints crx-quickstart/repository/segmentstore rm-unreferenced
3. java -jar -Dsun.arch.data.model=32 oak-run-1.8.4.jar compact crx-quickstart/repository/segmentstore
after compact however it freed the size of 35GB. but my aem total size was around 865GB. and I was expecting to reduce more used size. however I haven't deleted the sites which were using these assets. The dam size was quite big in 700+GB.
Can someone guide me how to clear the size of application?
Server used is Rhel 9.
Solved! Go to Solution.
Topics help categorize Community content and increase your ability to discover relevant content.
Views
Replies
Total Likes
Maybe binary data is stored independently from the content nodes? i.e the binary data is stored in a data store, whereas content nodes are stored in a node store. Source: here.
When using TarMK with a separate datastore (which stores the actual binary files), oak-run compaction only cleans the segment store (metadata/references), not the actual binary data. The 700GB+ of DAM assets are stored as binaries in the datastore, which requires a separate cleanup process.
Search for RepositoryManagement MBean
Click startDataStoreGC(boolean markOnly)
Enter false for the markOnly parameter and click Invoke
Please note that Datastore garbage collection will not collect files deleted in the last 24 hours. You may need to wait and run it again if you just deleted the assets:
Here is a list of additional tasks you can check:
Navigate to Tools > Operations > Maintenance > Daily Maintenance Window > Lucene Binaries Cleanup to clean up old Lucene index binaries.
Views
Replies
Total Likes
This sound like you're definitely on the right track by deleting DAM assets and running oak-run to compact the repository, but there are a few key reasons why the overall size of your AEM instance might not be reducing as much as expected — especially in AEM 6.4.
Why the Repository Size Didn't Drop Much:
What You Can Do Next:
Re-run oak-run compaction after the cleanup steps — and make sure AEM is fully stopped when doing this to ensure maximum cleanup efficiency.
Let me know how it goes.
Maybe binary data is stored independently from the content nodes? i.e the binary data is stored in a data store, whereas content nodes are stored in a node store. Source: here.
When using TarMK with a separate datastore (which stores the actual binary files), oak-run compaction only cleans the segment store (metadata/references), not the actual binary data. The 700GB+ of DAM assets are stored as binaries in the datastore, which requires a separate cleanup process.
Search for RepositoryManagement MBean
Click startDataStoreGC(boolean markOnly)
Enter false for the markOnly parameter and click Invoke
Please note that Datastore garbage collection will not collect files deleted in the last 24 hours. You may need to wait and run it again if you just deleted the assets:
Here is a list of additional tasks you can check:
Navigate to Tools > Operations > Maintenance > Daily Maintenance Window > Lucene Binaries Cleanup to clean up old Lucene index binaries.
Views
Replies
Total Likes
Thank you for saving me, even after compaction it was not helping me.
What worked for me is
Search for RepositoryManagement MBean
Click startDataStoreGC(boolean markOnly)
Enter false for the markOnly parameter and click Invoke.
My question is how frequently we should do this cleaning process?
Thanks again for your great help:)
Views
Replies
Total Likes
Weekly is the standard schedule: How does data store garbage collection work?
Datastore garbage collection will not collect files deleted in the last 24 hours. This is by design as a safety mechanism. So even if you run DSGC immediately after deleting assets, those binaries won't be removed yet.
You might need to run DSGC more often than weekly if:
Heavy DAM activity with frequent asset uploads, deletions, or updates
Large replication volumes with high publish activation activity create temporary files
Workflow-heavy environments, ie you have many workflow payloads generating temporary assets
Disk space is becoming a concern
You can automate the cleanup by navigating to Tools > Operations > Maintenance > Weekly Maintenance Window and ensuring the Data Store Garbage Collection task is enabled (customize the start time as needed to match an off-load period)
Hi @NituDh ,
Even after deleting DAM assets, AEM may not free much space because the content is still referenced (by pages or renditions), or old versions still exist.
To truly reduce repository size:
Purge DAM asset versions use “Version Purge” tool or script.
Run datastore garbage collection (DataStoreGarbageCollector).
Ensure no references exist to deleted assets.
Then run repository compaction again.
Only after removing all references, old versions, and binary garbage will the size drop significantly.
Views
Likes
Replies