Sun Java logo     Previous      Contents      Index      Next     

Sun logo
Sun ONE Directory Server Resource Kit 5.2 Tools Reference 

Chapter 16
The Add Performance Measurement Tool

The infadd tool measures the performance of add operations in an LDAP v3 directory. This chapter provides instructions on how to use the infaddd tool. It contains the following sections:


Overview

The infadd (infinite add) tool measures the performance of entry add operations in an LDAP v3 directory. The DSRK and its updates include the latest version of the tool in the DSRK_base/bin/dsrk52 directory. It generates entries containing random attribute values and adds them to the directory under a given suffix, performing operations continuously and computing an average operation rate at regular intervals.


Note

As with all measures of performance, results depend upon many factors, such as the options and parameter values given, directory configuration, machine load, and network traffic, and should be analyzed accordingly. In order to obtain accurate performance measurements, both client and server machines should be dedicated to the performance test and properly tuned. (See Chapter 10, "The idsktune Optimization Tool" for more information.)



Command Usage

Using multiple threads, the infadd tool binds to a directory server and repeatedly performs LDAP add operations. All entries are added to the same subtree, one level below the suffix given on the command-line. New entries belong to the inetOrgPerson object class and have the attributes detailed in Code Example 16-1.

Code Example 16-1  Attributes of Added Entries

dn: cn= givenname sn UID,suffix

objectClass: top

objectClass: person

objectClass: organizationalPerson

objectClass: inetOrgPerson

cn: givenname sn UID

givenname: givenname

sn: sn

uid: UID

mail: givennameUID@siroe.com

telephonenumber: telephonenumber

userpassword: UID

audio: binaryData

The givenname and sn are randomly chosen either from data files containing names or from randomly generated strings. The following data files are provided in the DSRK_base/data subdirectory of the Directory Server Resource Kit:

The UID is a sequential numbering of new entries (see the -I option), and the telephonenumber is a random, US-format telephone number. The binary audio attribute is optional and can be used to test the addition of large entries (see the -z option).


Note

The tool displays performance results at regular intervals. Performance of add operations is highly dependent upon whether or not the directory performs schema checking. Be sure your directory is configured so that the test scenario most closely resembles its actual usage.


Syntax

The syntax of the infadd tool on the command-line takes the following form:

infadd -s "suffix" -u "bindDN" -w password [ options ]

Where:

Options

The infadd options and parameters are described in Table 16-1. Running the infadd command without any options or parameters will display the usage help text that briefly describes all options.

Table 16-1  Command-Line Options for infadd 

Option

Parameter

Purpose

-h

hostname

Specify the hostname of the directory server. The default is localhost.

-p

port

Specify the port number when accessing the directory server host. The default is 389.

-D

bindDN

Specify a bind DN for accessing the directory, usually in double quotes ("") for the shell. The bind DN should have write permission in the subtree given by the -s suffix parameter.

-w

password

Specify the password for the bind DN.

-B

baseDN

Specify the base DN to use for all new entries, usually in double quotes ("") for the shell. This is effectively the common suffix for all entries to be added.

-y

 

Set the TCP_NODELAY mode on the TCP socket.

-t

threads

Specify the number of threads that infadd will run in parallel. Use the -v option for verbose output including measurements from each thread. The default is a single thread.

-j

seconds

Specify the measurement and display interval, in seconds; the default is 10. infadd creates as many new entries as possible during the interval and prints results after each interval elapses.

-m

addOps

(Solaris and UNIX only) Specify the approximate number of total add operations for the tool to perform. The tool will stop after the measurement interval where the total number of operations for all threads exceeds this parameter. When this option is not specified, all threads will continue adding entries indefinitely.

-q

 

Quiet output mode: the measurements for each interval will not be displayed.

-v

 

Verbose output at every interval: gives the measurements from each thread, including the minimum and maximum operation times observed, as well as the average over all threads.

-I

startID

(Solaris and UNIX only) For guaranteeing uniqueness of DNs, the infadd tool generates a sequential ID number, beginning with startID. This ID number is appended to the cn attribute and also used as the uid attribute of new entries. When this option is omitted, ID numbers begin at zero.

-R

number

(Solaris and UNIX only) Use randomly generated names in new entries. With this option, infadd will first generate the given number of random given names and surnames and then randomly select one of each when adding entries. A random name is a sequence of 7 to 12 random letters. When this option is omitted, the tool will use the contents of the dbgen-GivenNames and dbgen-FamilyNames files in the data subdirectory of the Sun ONE DSRK installation directory.

-z

maxSize

Specify that all new entries contain an audio attribute with a random binary value. The attribute’s value is a set of randomly generated bytes, and the number of bytes is randomly chosen in the range [0, maxSize].

none

 

Display the usage help text that briefly describes all options.


Command-Line Examples

The examples in this section will measure entry addition performance in your directory server in various scenarios. These examples include sample output. Results will be meaningful only if factors such as machine load and network traffic remain constant during and between tests.

Multithreaded Verbose Output

The following command launches 3 threads (-t 3), each of which binds with the given credentials (-D "bindDN" -w password) and adds entries under the "ou=people,dc=example,dc=com" branch. The name attributes in the new entries are randomly generated from the Given-Names and Family-Names data files (no -R option). The verbose output (-v) gives the measured performance of each thread every 3 seconds (-J 3) until a total of at least 20 new entries have been added (-M 20).

$ infadd -h hostname -p port -D "bindDN" -w password \
          -B "ou=people,dc=example,dc=com" -t 3 -J 3 -M 20 -v

Code Example 16-2 details the sample output. The thread reports the following information:

Because multiple threads are used, the average operation rate per thread and the total number of operations is also displayed after every interval. Finally, because of the operation limit option, the summary line is displayed at the end.

Code Example 16-2  Verbose Output of infadd Tool

Loading Given-Names ...

Loading Family-Names ...

infadd: 3 threads launched.

T1 min: 610ms, max: 1592ms, count: 3, total: 3

T2 min: 702ms, max: 1770ms, count: 2, total: 2

T3 min: 649ms, max: 1308ms, count: 3, total: 3

Average rate: 2.67, total: 8

T1 min: 513ms, max: 607ms, count: 4, total: 7

T2 min: 510ms, max: 655ms, count: 5, total: 7

T3 min: 533ms, max: 721ms, count: 5, total: 8

Average rate: 4.67, total: 22

Total added: 22, Avg rate: 7.33/thrd, 3.67/sec = 272.7msec/op

Random Strings and Binary Values

This command launches a single thread (no -t option) that binds with the given credentials (-D "bindDN" -w password) and adds entries under the "ou=people,dc=example,dc=com" branch. The name attributes in the new entries are chosen from 100 randomly generated given names and 100 randomly generated surnames (-R 100). The new entries also include the audio attribute with binary values up to 10KB long (-z 10240). The verbose output (-v) gives detailed measurements for the thread every 3 seconds (-J 3) until a total of at least 20 new entries have been added (-M 20). The data values in the output are the same as described in the previous example.

$ infadd -h hostname -p port -D "bindDN" -w password \
         -B "ou=people,dc=example,dc=com" \
          -R 100 -z 10240 -J 3 -M 20 -v

Code Example 16-3 details the sample output.

Code Example 16-3  Sample Output From infadd Tool

Generating random names: 100. Done.

Generating random names: 100. Done.

infadd: 1 thread launched.

T1 min: 123ms, max: 241ms, count: 8, total: 8

T1 min: 133ms, max: 2000ms, count: 13, total: 21

Total added: 21, Avg rate: 21.00/thrd, 3.50/sec = 285.7msec/op



Previous      Contents      Index      Next     


Copyright 2004 Sun Microsystems, Inc. All rights reserved.