When I benchmark writes to LDAP servers, I usually use a monitor on a change detection mechanism rather than timing how long the modify/add/delete method in Net::LDAP blocks. That way (hopefully) you get the time before the modification hits the backend database, or something like it.

IMHO the best way is an asynchronous persistent search, but unfortunately AFAICT OpenLDAP doesn't support the persistent search control (it's alleged to be in recent dev releases, but I've never been able to find it). One way worth trying in OpenLDAP would be to enable replication in slapd.conf, and monitor the changelog file for the change you're after. That approach also adapts easily for benchmarking replication speeds.

As you probably know, the speed of LDAP operations is very much dependent on (among other things) indices on the attributes involved. For that reason, you should document the attributes you're operating on, all the indices that relate to them, and (if you're using ACIs rather than the slapd.conf object security controls) any ACIs that relate to the operation. You should also document which database backend you're using, since OpenLDAP offers a choice.

I'd also recommend creating a fairly sizable (and reasonably deep) subtree to base your benchmarking on so that the database backend is being worked.

Watch out for caching as well - it'd be worth benchmarking 2 searches on the same object in quick succession so that the second time the object is sat in cache rather than having to be pulled in from the database.

--------------------------------------------------------------

"If there is such a phenomenon as absolute evil, it consists in treating another human being as a thing."
John Brunner, "The Shockwave Rider".

Can you spare 2 minutes to help with my research? If so, please click here


In reply to Re: Advice for Benchmarking Servers, in particular using Net::LDAP to Benchmark OpenLDAP Operations by g0n
in thread Advice for Benchmarking Servers, in particular using Net::LDAP to Benchmark OpenLDAP Operations by ghenry

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.