SHIFT

--- Sjoerd Hooft's InFormation Technology ---

User Tools

Site Tools


opendsmemoryconfiguration
Differences

This shows you the differences between two versions of the page.

Link to this comparison view

opendsmemoryconfiguration [2013/05/01 10:50] (current)
sjoerd created
Line 1: Line 1:
 += OpenDS Memory Configuration =
 +
 +By default openDS only gets a minimum of 128 MB and a maximum of 256 MB memory assigned ( -Xms128m -Xmx256m ). That is a bit low in large environments. You can check current settings like this:
 +
 +<​code>​
 +sjoerd@ldapsrv:/​opt/​OpenDS-2.2.0/​config>​ps -ef | grep Open
 +    root 4063566 ​      1 316   Mar 11      - 141937:27 /​usr/​java5/​jre/​bin/​java -server -Xms128m -Xmx256m -Dorg.opends.server.scriptName=start-ds org.opends.server.core.DirectoryServer --configClass org.opends.server.extensions.ConfigFileHandler --configFile /​opt/​OpenDS-2.2.0/​config/​config.ldif
 +</​code>​
 +
 +Settings can be adjusted in /​opt/​OpenDS-2.2.0/​config:​
 +Original settings:
 +<​code>​
 +overwrite-env-java-home=false
 +overwrite-env-java-args=false
 +
 +default.java-home=/​usr/​java5/​jre
 +
 +backup.offline.java-args=-server -Xms128m -Xmx256m
 +encode-password.java-args=-server -Xms128m -Xmx256m
 +export-ldif.offline.java-args=-server -Xms128m -Xmx256m
 +import-ldif.offline.java-args=-server -Xms128m -Xmx256m
 +ldif-diff.java-args=-server -Xms128m -Xmx256m
 +ldifmodify.java-args=-server -Xms128m -Xmx256m
 +ldifsearch.java-args=-server -Xms128m -Xmx256m
 +make-ldif.java-args=-server -Xms128m -Xmx256m
 +rebuild-index.java-args=-server -Xms128m -Xmx256m
 +restore.offline.java-args=-server -Xms128m -Xmx256m
 +start-ds.java-args=-server -Xms128m -Xmx256m
 +upgrade.java-args=-server -Xms128m -Xmx256m
 +verify-index.java-args=-server -Xms128m -Xmx256m
 +dbtest.java-args=-server -Xms128m -Xmx256m
 +backup.online.java-args=-client -Xms8m
 +base64.java-args=-client -Xms8m
 +create-rc-script.java-args=-client -Xms8m
 +dsconfig.java-args=-client -Xms8m
 +dsreplication.java-args=-client -Xms8m
 +dsframework.java-args=-client -Xms8m
 +export-ldif.online.java-args=-client -Xms8m
 +import-ldif.online.java-args=-client -Xms8m
 +ldapcompare.java-args=-client -Xms8m
 +ldapdelete.java-args=-client -Xms8m
 +ldapmodify.java-args=-client -Xms8m
 +ldappasswordmodify.java-args=-client -Xms8m
 +ldapsearch.java-args=-client -Xms8m
 +list-backends.java-args=-client -Xms8m
 +manage-account.java-args=-client -Xms8m
 +manage-tasks.java-args=-client -Xms8m
 +restore.online.java-args=-client -Xms8m
 +stop-ds.java-args=-client -Xms8m
 +status.java-args=-client -Xms8m
 +control-panel.java-args=-client -Xms8m
 +uninstall.java-args=-client -Xms8m
 +setup.java-args=-client -Xms8m
 +</​code>​
 +
 +New settings:
 +<​code>​
 +overwrite-env-java-home=false
 +overwrite-env-java-args=true
 +
 +default.java-home=/​usr/​java5/​jre
 +
 +manage-account.java-args=-client -Xms8m
 +import-ldif.offline.java-args=-server -Xms128m -Xmx256m
 +status.java-args=-client -Xms8m
 +rebuild-index.java-args=-server -Xms2g -Xmx2g
 +backup.online.java-args=-client -Xms8m
 +base64.java-args=-client -Xms8m
 +verify-index.java-args=-server -Xms2g -Xmx2g
 +export-ldif.offline.java-args=-server -Xms128m -Xmx256m
 +ldif-diff.java-args=-server -Xms128m -Xmx256m
 +list-backends.java-args=-client -Xms8m
 +import-ldif.online.java-args=-client -Xms8m
 +encode-password.java-args=-server -Xms128m -Xmx256m
 +ldapdelete.java-args=-client -Xms8m
 +backup.offline.java-args=-server -Xms128m -Xmx256m
 +ldapcompare.java-args=-client -Xms8m
 +uninstall.java-args=-client -Xms8m
 +control-panel.java-args=-client -Xms8m
 +restore.offline.java-args=-server -Xms128m -Xmx256m
 +ldappasswordmodify.java-args=-client -Xms8m
 +dsframework.java-args=-client -Xms8m
 +restore.online.java-args=-client -Xms8m
 +ldifsearch.java-args=-server -Xms128m -Xmx256m
 +create-rc-script.java-args=-client -Xms8m
 +stop-ds.java-args=-client -Xms8m
 +dsreplication.java-args=-client -Xms8m
 +ldapsearch.java-args=-client -Xms8m
 +ldapmodify.java-args=-client -Xms8m
 +start-ds.java-args=-server -Xms2g -Xmx2g
 +setup.java-args=-client -Xms8m
 +dbtest.java-args=-server -Xms128m -Xmx256m
 +make-ldif.java-args=-server -Xms128m -Xmx256m
 +upgrade.java-args=-server -Xms128m -Xmx256m
 +manage-tasks.java-args=-client -Xms8m
 +dsconfig.java-args=-client -Xms8m
 +export-ldif.online.java-args=-client -Xms8m
 +ldifmodify.java-args=-server -Xms128m -Xmx256m
 +</​code>​
 +
 +After changing the file you can activate the settings using the command dsjavaproperties:​
 +<​code>​
 +sjoerd@ldapsrv:/​opt/​OpenDS-2.2.0/​bin>​sudo ./​dsjavaproperties
 +The operation was successful. ​ The server commands will use the java arguments and java home specified in the properties file located in /​opt/​OpenDS-2.2.0/​config/​java.properties
 +</​code>​
 +
 +To see that openDS is actually running with the new settings openDS needs a restart:
 +<​code>​
 +/​opt/​OpenDS-2.2.0/​bin/​stop-ds -D cn=manager -w <​secret>​
 +/​opt/​OpenDS-2.2.0/​bin/​start-ds
 +</​code>​
 +
 += Set DB Cache = 
 +Use the following command to set the db cache to 50% so this will use 1 GB of RAM after the settings above are applied:
 +<​code>​
 +./dsconfig -h localhost -p 4444 -D "​cn=manager"​ -w <​password>​ -X -n set-backend-prop --backend-name userRoot --set db-cache-percent:​50
 +</​code>​
 +
 += Resources =
 +
 +https://​www.opends.org/​wiki/​page/​HowToTunePerformance \\
 +http://​docs.oracle.com/​cd/​E19476-01/​821-0505/​to-set-the-database-cache.html \\
 +https://​www2.opends.org/​wiki/​page/​Dsjavaproperties \\
 +https://​www.opends.org/​1.0/​page/​HowToConfigureTheDefaultJVMAndJavaArguments \\
 +
 +{{tag>​ldap}}
  
opendsmemoryconfiguration.txt ยท Last modified: 2013/05/01 10:50 by sjoerd