The Lightweight Directory Access Protocol (LDAP) is being used for an increasing number of distributed directory applications. We describe a tool to analyze the performance of LDAP directories, and study the performance of a LDAP directory under a variety of access patterns. In the experiments, we use a LDAP schema proposed for the administration of Service Level Specifications (SLSs) in a differentiated services network. Individual modules in the server and client code are instrumented to obtain a detailed profile of their contributions to the overall system latency and throughput. We first study the performance under our default experiment setup. We then study the importance of the factors in determining scalability, namely front-end versus back-end processes, CPU capability, and available memory. At high loads, the connection management latency increases sharply to dominate the response in most cases. The TCP Nagle algorithm is found to introduce a very large additional latency, and it appears beneficial to disable it in the LDAP server. The CPU capability is found to be significant in limiting the performance of the LDAP server, and for larger directories, which cannot be kept in memory, data transfer from the disk also plays a major role. The scaling of server performance with the number of directory entries is determined by the increase in back-end search latency, and scaling with directory entry size is limited by the front-end encoding of search results, and, for out-of-memory directories, by the disk access latency. We investigate different mechanisms to improve the server performance.