Formatting code for SunDirectoryServer


show source only

=====Performance and management tips=====
* The first thing to check for performance problems on Sun's DS is to look for un-indexed searches. The error log will record that the un-indexed searches happened, but you will need to check the access log to get the full details including how long the searches took. These are easy to find using the [[http://williamhathaway.com/downloads/search_logs search_logs]] script.
%%(language-ref)
./search_logs notes=U access
[07/Sep/2009:22:01:58 -0400] conn=9 op=1 msgId=2 - SRCH base="dc=example,dc=com" scope=2 filter="(unindexedattr=foo)" attrs=ALL
[07/Sep/2009:22:02:02 -0400] conn=9 op=1 msgId=2 - RESULT err=0 tag=101 nentries=0 etime=4.813795 notes=U
[07/Sep/2009:22:03:43 -0400] conn=11 op=1 msgId=2 - SRCH base="dc=example,dc=com" scope=2 filter="(objectClass=*)" attrs=ALL
[07/Sep/2009:22:03:52 -0400] conn=11 op=1 msgId=2 - RESULT err=0 tag=101 nentries=99989 etime=9.360250 notes=U
%%

* On Solaris, always put the db cache files (but not whole DB!) on a tmpfs file system otherwise you will do lots of extraneous writes as entries are read from the DB into the cache.

%%(language-ref)
dsuser@x4150:/tmp: dsconf get-server-prop db-env-path
db-env-path : /var/ds/db
dsuser@x4150:/tmp: dsconf set-server-prop db-env-path:/tmp/ds-cache
Changing "db-env-path" does not move the database file automatically.
You will have to stop the server, move the database files and restart the server.
Do you want to continue [y/n] ? y
Directory Server must be restarted for changes to take effect.
dsuser@x4150:/tmp: dsadm stop /var/ds
Directory Server instance '/var/ds' stopped
dsuser@x4150:/tmp: mkdir /tmp/ds-cache
dsuser@x4150:/tmp: mv /var/ds/db/__db.00? /tmp/ds-cache
dsuser@x4150:/tmp: dsadm start /var/ds
Directory Server instance '/var/ds' started: pid=4756
%%

* Enable high resolution timestamps
%%(language-ref)
dsconf set-log-prop access level+:acc-timing
%%
You will then get entries in the access log that have microsecond (versus second) resolution
%%(language-ref)
[07/Sep/2009:22:32:06 -0400] conn=35 op=1 msgId=2 - SRCH base="dc=example,dc=com" scope=2 filter="(uid=Abahri.Abazari)" attrs=ALL
[07/Sep/2009:22:32:06 -0400] conn=35 op=1 msgId=2 - RESULT err=0 tag=101 nentries=1 etime=0.000290
%%
Valid XHTML 1.0 Transitional :: Valid CSS :: Powered by WikkaWiki Install WikkaWiki web hosting