Java Version
Sophora 5 supports Java 17 and Java 21. We recommend using the latest version of OpenJDK 21. Our latest Docker images are based on docker.io/azul/zulu-openjdk-alpine
for Java 21.
Java Garbage Collection
The optimal Java Garbage Collection parameters depend heavily on your specific environment:
- CPU resources
- Memory resources
- Java version
- Use case (e.g., number of concurrent users and reads/writes)
Maximum number of open files
The maximum number of open files must be increased on unix systems. Add the following lines to the file /etc/security/limits.conf
.
* soft nofile 4096
* hard nofile 4096
Check the result with the command ulimit -a
.
Recommended Java VM Arguments in Container Environments (Java 21)
-XX:InitialRAMPercentage=50.0
-XX:MaxRAMPercentage=80.0
-XX:+UseG1GC
-XX:+ExitOnOutOfMemoryError
-XX:+AlwaysPreTouch
-XX:+PerfDisableSharedMem
-XX:+ParallelRefProcEnabled
-XX:G1HeapRegionSize=8m
-XX:MaxGCPauseMillis=250
-XX:InitiatingHeapOccupancyPercent=75
Recommended Java VM Arguments in Container Environments (Java 21)
-XX:InitialRAMPercentage=50.0
-XX:MaxRAMPercentage=80.0
-XX:+UseG1GC
-XX:+ExitOnOutOfMemoryError
-XX:+AlwaysPreTouch
-XX:+PerfDisableSharedMem
-XX:+ParallelRefProcEnabled
-XX:G1HeapRegionSize=8m
-XX:MaxGCPauseMillis=250
-XX:InitiatingHeapOccupancyPercent=75
-Dderby.storage.pageCacheSize=10000
Jackrabbit Configuration
The following jackrabbit related configuration should be adopted in the following files:
- repository/repository.xml
- repository/workspaces/default/workspace.xml
- repository/workspaces/live/workspace.xml
BundleCacheSize
<PersistenceManager>
....
<param name="bundleCacheSize" value="1024" />
....
<PersistenceManager>
ResultFetchSize and MaxMergeDocs
The parameters resultFetchSize
and maxMergeDocs
should be removed. Please note, that the first start of the Sophora server after removing the parameter maxMergeDocs
will take very long. The Lucene indexes are grouped into larger segments. This may take 60 minutes or longer depending on the size of the indexes.