Offline Oak compaction with debug logging:
- Install the latest Oak hotfix to your AEM instance:
- AEM 6.0 - https://helpx.adobe.com/experience-manager/kb/aem6-available-hotfixes.html
- AEM 6.1 - https://helpx.adobe.com/experience-manager/kb/aem61-available-hotfixes.html
- Download the oak-run version matching your oak version: https://repo1.maven.org/maven2/org/apache/jackrabbit/oak-run/
- Upload the oak-run jar file to your server
- Create a file logback-compaction.xml (on the server in the same folder as the oak-run jar)
<configuration>
<appender name="STDERR" class="ch.qos.logback.core.ConsoleAppender">
<target>System.err</target>
<encoder>
<pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern>
</encoder>
</appender>
<logger name="org.apache.jackrabbit.oak.plugins.segment.Compactor" level="DEBUG"/>
<root level="warn">
<appender-ref ref=“STDERR" />
</root>
</configuration>
- Run this command from the same folder as logback-compaction.xml (change the paths and jar file name to match your system’s paths, and tune -Xmx10g to not exceed your server's memory while leaving room for the OS memory):
nohup java -Dtar.memoryMapped=true -Dupdate.limit=5000000 -Dcompaction-progress-log=1500000 -Dcompress-interval=10000000 -Doffline-compaction=true -Dlogback.configurationFile=logback-compaction.xml -Xmx10g -jar /opt/wem/aem6/oak-run-1.0.22.jar compact /opt/wem/aem6/crx-quickstart/repository/segmentstore > tarcompaction.log 2>&1
- If you want to disable debug logging then change level="DEBUG" to level="INFO"
@dfparker2002 there was a bad quote in the logger config under <appender-ref ref=“STDERR" />, it needs to be a normal quote instead of a left quote