The configuration parameters given here must be seen as a guideline. This list is not necessarily complete and should be revised for every installation. The best configuration for your enviroment may differ from those depicted here. In case of doubts about certain configuration parameters, contact Subshell.
Java Version
Since version 4 Sophora requires Java 11. We recommand to use the latest version of Open JDK 11.
Java Garbage Collection
The exact parameters for the Java Garbage Collection highly depend on the environment (CPU, memory), Java version and the use case (how many concurrent user, how many imports). We recommend using the G1GC.
Sophora Server
An overview of all configuration parameters is provided here.
The Java VM arguments should be maintained in the sophora.properties
file under the configuration key vmargs=...
Maximum number of open files
The maximum number of open files must be increased on unix system. 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
-Xmn
with G1!-server
-XX:+UseG1GC
-XX:+ParallelRefProcEnabled
-XX:G1HeapRegionSize=8m
-XX:MaxGCPauseMillis=250
-XX:InitiatingHeapOccupancyPercent=75
-XX:+UseLargePages
-Xss640K
-Xms12G
-Xmx12G
-XX:-OmitStackTraceInFastThrow
-XX:+PerfDisableSharedMem
-XX:+HeapDumpOnOutOfMemoryError
-Xlog:gc*::time,level,tags
-Djava.rmi.server.hostname=<external hostname>
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.
initializeHierarchyCache
<SearchIndex class="org.apache.jackrabbit.core.query.lucene.SearchIndex">
<param name="initializeHierarchyCache" value="false" />
...
</SearchIndex>
Important Security Parameters to set
- sophora.solr.username
- sophora.solr.password
- sophora.replication.userName
- sophora.replication.password
- sophora.jmx.username
- sophora.jmx.password
Recommended Java VM Arguments
-server
-XX:+UseG1GC
-XX:+PerfDisableSharedMem
-XX:+ParallelRefProcEnabled
-XX:G1HeapRegionSize=8m
-XX:MaxGCPauseMillis=250
-XX:InitiatingHeapOccupancyPercent=75
-XX:+UseLargePages
-Xss640K
-Xms6G
-Xmx6G
-XX:+PerfDisableSharedMem
-Xlog:gc*::time,level,tags
-Dderby.storage.pageCacheSize=10000
-Djava.rmi.server.hostname=<external hostname>
The best GC-Settings however might depend on your very installation, the Java version and the amount of incoming requests. We propose to try different GC-settings for fine-tuning.
Document Cache
The delivery holds a cache for document requests to its Staging Server. This cache is crucial for the performance of the delivery. Its size must be adjusted considering the available heap space for the java process. Take the following configuration as guidance:
sophora.delivery.client.documentCacheElementsInMemory=40000
Configuration of the Delivery Cache
sophora.delivery.cache.enabled=true
sophora.delivery.cache.db=derbyng
sophora.delivery.cache.db.async=true
sophora.delivery.cache.derby.optimizing.enabled=true
sophora.delivery.cache.cleanup.enabled=true
sophora.delivery.cache.removeFromCacheRegistry=false
sophora.delivery.cache.removalQueue=memoryRemovalQueue
sophora.delivery.cache.threshold=30
Java VM Arguments
-server
-Dderby.storage.pageCacheSize=10000
-Dderby.system.durability=test
-Dnet.sf.ehcache.use.classic.lru=true
-Djava.rmi.server.hostname=<external hostname>
-Dcom.sun.management.jmxremote
-Dcom.sun.management.jmxremote.ssl=false
-Xmx8G
-Xms8G
-XX:ReservedCodeCacheSize=512M
-XX:+UseG1GC
-XX:+UseStringDeduplication