Red Hat Directory Server 7.1 Performance Tuning and Sizing Guidelines

Caliper

HP Caliper is a general-purpose performance analysis tool for applications on Itanium®-based HP systems. HP Caliper allows you to understand the performance of your program and to identify ways to improve its run-time performance. HP Caliper works with any Itanium®-based binary and does not require your applications to have any special preparation to enable performance measurement.

With Caliper’s aid, we can determine what the system is doing when running benchmark, in this case, DirMark. For more information for Caliper, please refer to: http://h21007.www2.hp.com/dspp/tech/tech_TechSoftwareDetailPage_IDX/1,1703,1174,00.html.

Performance Data Creation

Test Data Generation

The data used for the performance testing is generated by DirMark 1.0. It generates inetorgPerson entries, where average entry size is 700 bytes, and a sample directory structure. The dbgen script is used to generate the data and ldif2db is used to populate data to the directory server.

Search Script Generation

DirMark provides script that generates search scripts for performance testing. However, DirMark uses rand() random-number generator which only provides 15 bits of precision. For large number databases, a better random- number generator is required. Thus, a different program, my_scriptgen.c, which uses drand48() is created. It will generate search scripts that only send exact search request on CN. This program is documented in Appendix B.

Appendix B: my_scriptgen.c

#include <stdio.h> #include <stdlib.h> #include <string.h>

void rand_choose(int i, char **cn, char *TestScriptDir, char *TestScriptName, long int rand_array); void rand_gen(int OperationPerThread, int TotalEntryInDatabase,long int *rand_array);

void main(int argc, char **argv)

{

int OperationPerThread, TotalEntryInDatabase;

char TestScriptDir[200], name_list_file[200], TestScriptName[200], *cn[1000000]; char line[300];

FILE *NameList;

 

int j=0;

rand_array[1000000];

 

long int

 

if (argc

!= 6) {

 

printf

("\nusage: ./my_scriptgen TestScriptDir TestScriptName NameListFile\n");

printf

("

OperationsPerThread TotalEntryInDatabase\n\n");

return;

 

 

}

 

 

strcpy(TestScriptDir,argv[1]);

strcpy(TestScriptName,argv[2]); strcpy(name_list_file,argv[3]); OperationPerThread=atoi(argv[4]); TotalEntryInDatabase=atoi(argv[5]);

srand48(time(NULL));

/* put all the cns to veriable cn[1000000] from the name_list_file */ NameList = fopen(name_list_file, "r");

while (fgets(line, sizeof(line), NameList) != NULL)

{

line[strlen(line)-1] = '\0'; cn[j]=strdup(line);

j++;

Page 17