Previous     Contents     Index     Next     
iPlanet Directory Server Resource Kit 5.1 Tools Reference



Chapter 14   infadd


The infadd (infinite add) tool measures the performance of add operations in an LDAP v3 directory. It generates entries containing random attribute values and adds them to the directory under a given suffix. It performs operations continuously and computes an average operation rate at regular intervals.

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 8 "idsktune").

This chapter contains the following sections:



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 following attributes:

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 data subdirectory of the iPlanet Directory Server Resource Kit:

  • dbgen-FamilyNames contains over 13400 plausible surnames.

  • dbgen-GivenNames contains over 8600 plausible first names.

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).

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 infadd command has the following syntax:

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

Where:

  • suffix is the base DN under which all entries will be added.

  • bindDN and password are the bind credentials, with the bind DN is usually in double quotes ("") for the shell.

  • options are the command-line options and their parameters described in the next section.

Running the infadd command without any options or parameters will display the usage help text that briefly describes all options.


Options

The infadd options and parameters are described in the following table.


Table 14-1    Command-Line Options for the infadd Tool 

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 iPlanet DSRK installation.  

-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 ].  



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.

  • The hostname and port placeholders should be replaced with the hostname and port number of your directory.

  • For realistic results, thread numbers should be scaled according to your directory's expected load.


Multithreaded Verbose Output

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

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

This 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=siroe,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). Each thread reports the following information:

  • The minimum and maximum operation times during the elapsed interval.

  • The number of operations performed during the elapsed interval.

  • The total number of operations performed by that thread so far.

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.


Random Strings and Binary Values

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

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

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=siroe,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.

Previous     Contents     Index     Next     
Copyright 2002 Sun Microsystems, Inc.. All rights reserved.

Last Updated April 15, 2002