SHIFT

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

User Tools

Site Tools


Sidebar

Sponsor:

Would you like to sponsor this site?
Or buy me a beer?:


Recently Changed Pages:

View All Pages
View All Q Pages


View All Tags


Sign up for Q to post comments.





WIKI Disclaimer: As with most other things on the Internet, the content on this wiki is not supported. It was contributed by me and is published “as is”. It has worked for me, and might work for you.
Also note that any view or statement expressed anywhere on this site are strictly mine and not the opinions or views of my employer.


Terms And Conditions for Q users


Pages with comments

PageDateDiscussionTags
2019/06/22 10:36 1 Comment
2019/03/15 16:02 1 Comment
2019/03/15 16:02 1 Comment
2019/03/15 16:02 3 Comments
2017/04/20 15:28 1 Comment
2017/04/20 15:23 1 Comment
2017/04/19 14:44 1 Comment
2017/04/17 20:10 1 Comment
2017/04/17 20:07 1 Comment
2017/04/17 19:58 1 Comment
2017/04/17 19:52 1 Comment

View All Comments

opendsmemoryconfiguration

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:

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

Settings can be adjusted in /opt/OpenDS-2.2.0/config: Original settings:

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

New settings:

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

After changing the file you can activate the settings using the command dsjavaproperties:

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

To see that openDS is actually running with the new settings openDS needs a restart:

/opt/OpenDS-2.2.0/bin/stop-ds -D cn=manager -w <secret>
/opt/OpenDS-2.2.0/bin/start-ds

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:

./dsconfig -h localhost -p 4444 -D "cn=manager" -w <password> -X -n set-backend-prop --backend-name userRoot --set db-cache-percent:50

Resources

You could leave a comment if you were logged in.
opendsmemoryconfiguration.txt · Last modified: 2013/05/01 10:50 by sjoerd