---
title: "Best Practices: Performance Testing PingDirectory"
description: PingDirectory ships with several tools that you can use for performance testing.
component: solution-guides
page_id: solution-guides:best_practice_guides:bp_pd_performance_testing
canonical_url: https://docs.pingidentity.com/solution-guides/best_practice_guides/bp_pd_performance_testing.html
revdate: April 14, 2025
section_ids:
  performance-testing: Performance testing
  creating-test-entries: Creating test entries
  searchrate-testing: Searchrate testing
  authrate-testing: Authrate testing
  modrate-testing: Modrate testing
---

# Best Practices: Performance Testing PingDirectory

PingDirectory ships with several tools that you can use for performance testing.

## Performance testing

The following table explains what each tool does.

| Tool name    | Description                             |
| ------------ | --------------------------------------- |
| `searchrate` | Test search performance                 |
| `authrate`   | Test authentication performance         |
| `modrate`    | Test modification and write performance |

## Creating test entries

Before testing, you should create some entries to test with. The easiest way to do this is by creating a template that can be used with the `make-ldif` utility.

1. Create a template file called `templateTest.tmp`:

   ```text
   define suffix=dc=example,dc=com
   define maildomain=example.com
   define numusers=5001

   branch: ou=PerfTest,[suffix]
   subordinateTemplate: person:[numusers]

   template: person
   rdnAttr: uid
   objectClass: top
   objectClass: person
   objectClass: organizationalPerson
   objectClass: inetOrgPerson
   givenName:  <first>
   sn:  <last>
   cn: {givenName} {sn}
   initials: {givenName:1}<random:chars:ABCDEFGHIJKLMNOPQRSTUVWXYZ:1>{sn:1}
   employeeNumber:  <sequential:0>
   uid: user.{employeeNumber}
   mail: {uid}@[maildomain]
   userPassword: Password_123
   telephoneNumber:  <random:telephone>
   homePhone:  <random:telephone>
   pager:  <random:telephone>
   mobile:  <random:telephone>
   street:  <random:numeric:5>  <file:streets>  Street
   l:  <file:cities>
   st:  <file:states>
   postalCode:  <random:numeric:5>
   postalAddress: {cn}${street}${l}, {st} {postalCode}
   description: This is the description for {cn}.
   ```

2. To create an LDIF file that can be used to create test users, run `make-ldif` with the template file:

   ```shell
   bin/make-ldif --templatefile templateTest.tmp --ldiffile testUser.ldif
   ```

3. To create the `testuser` organizational unit (OU) and the test users in the directory, apply the LDIF:

   ```shell
   bin/ldapmodify -a -f testUser.ldif
   ```

## Searchrate testing

Now you can run `searchrate`. Running this utility on the same server hosting the directory being tested will have some impact on performance results.

```shell
bin/searchrate --hostname [server name] --port [LDAP port] \
--bindDN "cn=directory manager" \
--bindPassword [directory manager password] \
--baseDN dc=example,dc=com \
--scope sub --filter "(uid=user.[1-5000])" \
--attribute givenName --attribute sn --attribute mail \
--numThreads 10
```

The output will look similar to:

```text
      Recent      Recent         Recent      Recent       Overall     Overall
Searches/Sec  Avg Dur ms   Entries/Srch  Errors/Sec  Searches/Sec  Avg Dur ms
------------ ------------  ------------ ------------ ------------ ------------
    9703.655       0.204          1.000       0.000      8261.414       0.239
    9867.418       0.201          1.000       0.000      8796.509       0.225
```

Increasing the thread count will improve throughput for lower values. Higher thread counts will have diminishing returns on performance.

## Authrate testing

You should test authentication rate. `Authrate` testing will be similar to `searchrate` testing.

The following command issues a search request to find a user and then a bind request to authenticate that user:

```shell
bin/authrate --hostname [server name] --port [LDAP port] \
--bindDN "cn=directory manager" --bindPassword [password] \
--baseDN dc=example,dc=com --scope sub --filter "(uid=user.[1-5000])" \
--credentials Password_123 --numThreads 10
```

The thread count should be varied to get an idea of how thread count (connection count) will impact performance. Test results will look similar to:

```text
    Recent        Recent       Recent      Overall      Overall
 Auths/Sec    Avg Dur ms   Errors/Sec    Auths/Sec   Avg Dur ms
------------ ------------ ------------ ------------ ------------
  4131.452         0.482        0.000     3634.848        0.547
  4097.089         0.486        0.000     3789.004        0.525
  3829.309         0.520        0.000     3799.079        0.524
```

## Modrate testing

The `modrate` tool tests the rate at which the directory can process modify operations. The arguments and output format will be similar to the other rate tools.

```shell
bin/modrate --hostname [server name] --port [LDAP port] \
--bindDN "cn=directory manager" \
--bindPassword [directory manager password] \
--entryDN "uid=user.[1-5000],ou=perftest,dc=example,dc=com" \
--attribute description --valueLength 12 \
--numThreads 10
```

Output will look similar to:

```text
     Recent       Recent       Recent      Overall      Overall
   Mods/Sec   Avg Dur ms   Errors/Sec     Mods/Sec   Avg Dur ms
------------ ------------ ------------ ------------ ------------
   6505.814        1.530        0.000     6505.811        1.530
   8270.312        1.206        0.000     7387.366        1.349
   9295.419        1.073        0.000     8023.173        1.242
```

|   |                                                                                   |
| - | --------------------------------------------------------------------------------- |
|   | Remember, varying the thread or connection count will impact performance results. |
