[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: problems under IRIX 6.2, 6.5


On Wed, 20 Jan 1999, Kurt D. Zeilenga wrote:

> At 02:07 PM 1/20/99 -0500, Don Badrak wrote:
> >I've been investigating quite a bit more on this problem (see the archives
> >for the full details).  To summarize: OpenLDAP 1.1.2 is horrendously slow
> >under IRIX 6.2 and 6.5, while performing just fine under Linux 2.0.36
> >and Solaris 2.6.
> >
> >Lots of things were blamed, one being the read/write locks.  So, today
> >I ripped out all the read/write entry locks.  Still the same thing.  That
> >wasn't very helpful.
> That's a relief for us at least.  I was dreading having to reengineer
> that code.

Well, me too, as it appears that it works just fine.  I did find another
read/write lock implementation (from an Addison-Wesley book) I was going
to give a try.  It has more stuff than the one from the O'Reilly book,
including separate variables for reading and writing.  I still intend on
tryingit out.

> >[ snipped ]
> >  access  to dn=".*,ou=People,o=U.S. Census Bureau,c=US"
> >          by self                 write
> >          by *                    read
> >
> >Aha.  Has anything major changed in the acl code (since the original Umich?).
> The ACL code has been significantly reworked since Umich days.
> First, OpenLDAP uses POSIX regex instead of the older
> BSD re_comp/_exec() codes.  Not all implementations of POSIX
> regex are created equally.  You might want to experiment with
> alternative implementations (GNU or Spencer's).

Apparently not.  I just tried the GNU one (regex-0.12).  With the SGI one
(default) I got 6.30 seconds for the query.  When I removed the ACL listed
above, that dropped down to 0.60 seconds, and after running it a couple
times, I got 0.35 seconds.  I just popped the GNU library there, and got
0.21 seconds without the ACL, and 0.65 seconds *including* the
problem-ACL. Seems the GNU one is way faster, and the SGI one has some

That's still a pretty impressive change for the existing ACLs.
> Second major change is the ACL group support.
> >It may be something with the IRIX regex stuff, but I'm not sure.  I will
> >try the GNU regex library to see how that goes.  One thing I noticed in
> >servers/slapd/acl.c was the removal of the mutex on the regex_matches()
> >call.  Hmm.
> The POSIX API is such that the mutex is not needed.

Ok, I'll undo all that stuff.
> >I shall keep investigating.  Any ideas anyone?
> I'm sure the ACL code could be optimized a bit.  We problably
> should investigate precompiling the regular expressions.  I
> posted a note on -devel.

I saw that.  I think I'll give it a whirl, if I can squeeze some time out
of my schedule (this stuff isn't even part of my job).  Looks Like I could
learn something about all this code, CVS, and even contribute :-)

> >Time to tackle the next problem -- why does making a new database (set of
> >files) using ldif2ldbm take 45 minutes under IRIX but only 3 minutes on
> >my Linux machine? (well, I have it down to 9 minutes now, but it's still
> >too long)
> Assuming you're using the same version of OpenLDAP with same underlying
> datastore, I have no clue.   You could eliminate threading as a issue
> completely by compiling --without-threads.

I could, but I'm not sure what that will buy.  I will give it a try and
post the results.  ldbmcat also gives me nothing.  From the looks of it,
these tools haven't been touched in a while (the Makefile still says

Don Badrak <dbadrak@census.gov>              301.457.1793 work
Telecommunications Office		     301.457.4438 fax
U.S. Bureau of the Census                    301.457.1828 fax
Suitland MD, USA