Oracle® Fusion Middleware Man Page Reference for Oracle Directory Server Enterprise Edition 11g Release 1 (11.1.1.7.0) Part Number E28967-01 |
|
|
PDF · Mobi · ePub |
measure search performance for an LDAP directory
Synopsis
install-path/dsrk/bin/searchrate [options] -b baseDN -f filter
Description
The searchrate
command measures the rate at which an LDAP directory can perform random, user-defined searches. As with all measures of performance, results depend on many factors, including what options you pass to the searchrate
command, and also how the directory service itself is tuned.
Options
The searchrate
command supports the following options:
-A
attributeRetrieve only the specified attribute.
Repeat this option to specify multiple attributes.
-a
Run in asynchronous mode, not waiting for results before requesting subsequent searches. The maximum number of threads the searchrate
command can use is limited by the number of file descriptors the operating system allows the process to use. The time is measured starts when the request is sent and finishes when the result is received.
-b
baseDNUse the specified base DN for the target entry.
Default is the root DSE, ""
.
Refer to Random Target Syntax and Random Target Substitution for details on number and string substitutions.
-C
messagesDisplay the specified number of results messages before exiting. Results messages appear by default as output on standard out, similar to the following.
Avg r=2731.00/thr (1092.40/sec), total= 5462
This shows output for two threads searching for five seconds. The average search rate per thread is 2731 searches per thread for the interval measured, for 1092.40 searches per second on average. The total shown for both threads is 5462.
Default is to continue iterating until the command is interrupted.
-D
bindDNUse the specified bind DN to authenticate to the directory.
If the bind DN is not specified, the searchrate
command attempts anonymous authentication.
-E
Display the bind DN and filter for searches that failed to retrieve an entry.
-e
Display the number of attempted searches that failed to retrieve an entry.
-f
filterUse the specified RFC 2254 conformant filter for all searches.
Refer to Random Target Syntax and Random Target Substitution for details on number and string substitutions.
-h
hostnameConnect to the directory on the specified host.
Enclose IPv6 addresses in brackets ([]
) as described in RFC 2732.
Default is to connect to the local host on the loopback address, 127.0.0.1
.
-i
filenameUse the file specified to generate target entry base DNs at random.
Refer to Random Target Syntax and Random Target Substitution for details.
-j
secondsDisplay results each specified number of seconds.
Default is to display results every 5 seconds.
-K
Keep connections open and only bind once, measuring only the time required to perform the search operation.
Default is to measure the duration the connection is active as the search sequence.
-k
Keep connections open, measuring only the time required to perform the bind and search operations.
Default is to measure the duration the connection is active as the search sequence.
-l
secondsSet the search time-out at the specified number of seconds for synchronous searches.
Default is 10 seconds.
-m
maxIterPerform no more than the specified number of searches per thread.
Default is for each thread to continue iterating until the command is interrupted.
-p
portConnect to the directory on the specified port.
Default is to connect to the default simple authentication port for LDAP, 389
.
-q
Run in quiet mode, not displaying results.
Default is to display results every 5 seconds, which you can adjust using the -j
option.
-r
maxRandUse the specified maximum to determine the range for random numbers replacing %d
formatting specifications when searching random target entries.
When you use this option twice, the first occurrence generates random numbers in the range [0,maxRand1–1] for the first %d
, the second [1,maxRand2] for the second %d
.
Refer to Random Target Syntax and Random Target Substitution for details.
-S
randSeedUse the specified seed, an unsigned int
, for random number generation.
Default seed is 0
.
-s
scopeUse the specified scope when searching.
The following values are supported for scope:
base
Examine only the entry specified by the argument to the -b
option.
one
Examine only to the entry specified by the argument to the -b
option and its immediate children.
sub
(Default) Examine the subtree whose root is the entry specified by the argument to the -b
option.
-t
threadsUse the specified number of the threads to connect to the server.
Default is to use one thread.
-v
Display verbose output.
-W
filenameRead the bind password from the specified file.
-w
passwordUse the specified bind password to authenticate to the directory.
-w
–Prompt for the bind password so it does not appear on the command line or in a file.
Extended Description
The searchrate
command repeatedly requests search operations of a directory server. Threads may be configured to keep open connections or perform LDAP binds with each operation. The command-line options let you specify the bind credentials.
The command uses LDAP v3, and cannot be used to authenticate to an LDAP v2 directory not supporting LDAP v3. Furthermore, the searchrate
command uses simple authentication, not secure binding.
By default, the searchrate
command continues its task indefinitely, displaying results periodically, and displaying any errors encountered as well without interrupting operation.
Random Target Syntax
Include randomly generated numbers by specifying %d
and %s
placeholders in the base DN and filters. These placeholders are then replaced according to the following rules:
%d
Replace this placeholder with random integer values depending on the maxRand parameter to the -r
option.
The -r
option may be used at most two times to generate random base DNs or filters. Replacement values for the %d
placeholder range over [0,maxRand1–1].
%s
Replace this placeholder with random strings from the file specified using the -i
option.
Replacement values for this placeholder are randomly selected lines of the file specified.
Multiple -r
and -i
options are matched to the %d
and %s
placeholders, respectively, in the order they are used.
Random Target Substitution
The searchrate
command requires that you apply the following rules for substitutions, displaying an error message when the used incorrectly:
Use only one type of placeholder, either %d
or %s
, per invocation of the searchrate
command.
Specify at least as many uses of the -r
as %d
placeholders used.
Use %%d
and %%s
to specify literal strings %d
and %s
, respectively.
In order to use this random mechanism, you must populate your directory accordingly. For example, you can measure the search rate using the following command:
$ searchrate -b "ou=test,dc=example,dc=com" -f "uid=test%d" -r 100
In order for the searchrate
command to find entries, your directory must contain entries corresponding to the following LDIF excerpt:
dn: uid=test0,ou=test,dc=example,dc=com userPassword: auth00 dn: uid=test1,ou=test,dc=example,dc=com userPassword: auth11 dn: uid=test2,ou=test,dc=example,dc=com userPassword: auth22 … dn: uid=test10,ou=test,dc=example,dc=com userPassword: auth1010 … dn: uid=test99,ou=test,dc=example,dc=com userPassword: auth9999
Examples
Examples in this section use the following conventions:
The searchrate
command is found in a directory present in the PATH
used for the examples.
The directory server is located on a system named host
.
The directory has been configured to support anonymous access for search and read. Therefore, you do not have to specify bind information.
The directory server listens on port 389, the default for non-SSL connections.
searchrate
: Sample OutputThe following command performs searches until it has displayed five results messages. Notice that each line concerns only the elapsed interval.
$ searchrate -h host -b dc=example,dc=com -f "(uid=bjensen)" -C 5
Avg r=1349.00/thr (269.80/sec), total= 1349
Avg r=1312.00/thr (262.40/sec), total= 1312
Avg r=1334.00/thr (266.80/sec), total= 1334
Avg r=1346.00/thr (269.20/sec), total= 1346
Avg r=1340.00/thr (268.00/sec), total= 1340
All threads exited
Notice also that a result message provides the following items of information:
The average search rate per thread of execution
The average search rate per second
The total number of search operations performed during the interval the results message concerns
searchrate
: Search Rate AloneThe following command keeping the connection open and binds only once:
$ searchrate -h host -b dc=example,dc=com -f "(uid=bjensen)" -C 5 -K
Avg r=2706.00/thr (541.20/sec), total= 2706
Avg r=2706.00/thr (541.20/sec), total= 2706
Avg r=2739.00/thr (547.80/sec), total= 2739
Avg r=2717.00/thr (543.40/sec), total= 2717
Avg r=2731.00/thr (546.20/sec), total= 2731
All threads exited
searchrate
: Using a Filter FileThe following commands substitute filters from a file to perform searches:
$ cat filters =Jen* =Jensen>=Jensen <=Jensen ~=Jensen $ searchrate -h host -b dc=example,dc=com -f "(sn%s)" -i filters -C 5 -K Avg r= 59.00/thr ( 11.80/sec), total= 59 Avg r= 64.00/thr ( 12.80/sec), total= 64 Avg r= 63.00/thr ( 12.60/sec), total= 63 Avg r= 64.00/thr ( 12.80/sec), total= 64 Avg r= 61.00/thr ( 12.20/sec), total= 61 All threads exited
Exit Status
The searchrate
command returns the following exit status codes.
0
Successful completion.
An error occurred.
Attributes
See attributes
(5) for descriptions of the following attributes:
ATTRIBUTE TYPE | ATTRIBUTE VALUE |
---|---|
Availability |
Zip distribution only |
Stability Level |
Evolving |
See Also