Cern week 5

So tomorrow I am moving into my new flat so blog entry today. I spent the week benchmarking OpenLdap and writing a tool for this. I am planning to publish it under sf when I resolved the memory leek. I wrote it in c as I felt like I should take this up again. Now I remember why I stopped using it for every day programming. I spent one whole afternoon in ddd and valgrind to find that the connect_to_host ldap system call was pointing to an empty struct. This is of course not documented when you encounter the error. But when you have found it and you know what to search for you can find it everywhere. And it can be resoled through just letting it point to NULL and not to the struct.
Further I moved office on Monday. Now I am in a nicer bigger office with a coffee machine right next to me (Photo).
I registered for some Perl lessons with certificate so at the end of my placement I am a certified Python and Perl programmer what can't hurt. After winter I want to do the same with C++ and maybe some Linux sysadmin. I have to talk to Jan about this once time has come. That's about it. The flat I am moving in tomorrow is really nice. Quite big (40m^2), in the middle of town and fully furnished what is something very hard to find.

Some notes on slapd.conf:
If you want to run a Ldap server some hints.
Set this to the max as otherwise the values are far to low
conn_max_pending_auth 65435
conn_max_pending 65435

By default this is off but to be on the safe side
reverse-lookup off

This is not really required but it can't hurt
sizelimit unlimited

If you are benchmarking this will stop giving you the timeout errors. In production I would take this out.
timelimit unlimited

Normally there are 16 threads. For a shared server this might be ok but not if I have the server only for ldap.
threads 50

Just adding thees lines made my Ldap server respond 500 times quicker.
Standard config about 20 queries a second.
New config 1000 queries a second.

No comments: