<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>A Blog by Tim Bishop &#187; libnss-ldap</title>
	<atom:link href="http://www.bishnet.net/tim/blog/tag/libnss-ldap/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.bishnet.net/tim/blog</link>
	<description>"For a moment, nothing happened. Then, after a second or so, nothing continued to happen." -- HHGTTG</description>
	<lastBuildDate>Wed, 02 Nov 2011 15:21:00 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Getting the indexes right for OpenLDAP when using NSS</title>
		<link>http://www.bishnet.net/tim/blog/2009/10/14/getting-the-indexes-right-for-openldap-when-using-nss/</link>
		<comments>http://www.bishnet.net/tim/blog/2009/10/14/getting-the-indexes-right-for-openldap-when-using-nss/#comments</comments>
		<pubDate>Wed, 14 Oct 2009 11:40:25 +0000</pubDate>
		<dc:creator>Tim Bishop</dc:creator>
				<category><![CDATA[Computing]]></category>
		<category><![CDATA[index]]></category>
		<category><![CDATA[libnss-ldap]]></category>
		<category><![CDATA[NSS]]></category>
		<category><![CDATA[nss_ldap]]></category>
		<category><![CDATA[OpenLDAP]]></category>
		<category><![CDATA[optimise]]></category>
		<category><![CDATA[optimize]]></category>

		<guid isPermaLink="false">http://www.bishnet.net/tim/blog/?p=305</guid>
		<description><![CDATA[I recently deployed a Linux system which used the libnss-ldap module to get its passwd and group information. This all worked fine except group lookups (in particular when logging in) which were extremely slow. We have about 600 groups in our directory, which isn&#8217;t massive, but is more than the average system. Clearly this wasn&#8217;t [...]


Related posts:<ol><li><a href='http://www.bishnet.net/tim/blog/2008/07/16/any-idea-wtf-is-going-on/' rel='bookmark' title='Permanent Link: &#8220;Any idea WTF is going on?&#8221;'>&#8220;Any idea WTF is going on?&#8221;</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>I recently deployed a Linux system which used the libnss-ldap module to get its passwd and group information. This all worked fine except group lookups (in particular when logging in) which were extremely slow. We have about 600 groups in our directory, which isn&#8217;t massive, but is more than the average system.</p>
<p>Clearly this wasn&#8217;t right. Initially I tried nscd, which helped, but only after it had cached the data. Then I realised it was probably the indexes in OpenLDAP. Googling didn&#8217;t turn up much of use (hence this post), but I did find <a href="http://www.openldap.org/doc/admin24/tuning.html#Indexes">this page</a> on the OpenLDAP site.</p>
<p>This fairly quickly pointed me at the problem; I was missing indexes on memberUid and uniqueMember. Adding these fixed the problem completely.</p>
<p>So here&#8217;s the indexes I&#8217;ve ended up with:</p>
<pre>index   objectClass     eq
index   cn,uid          eq
index   uidNumber       eq
index   gidNumber       eq
index   memberUid       eq
index   uniqueMember    eq
index   entryCSN        eq
index   entryUUID       eq</pre>
<p>(the last two are for replication)</p>
<p>I&#8217;m actually quite surprised how much the indexes matter. It makes a huge difference, even on a small setup. So if you&#8217;re setting up a directory take the time to read the <a href="http://www.openldap.org/doc/admin24/tuning.html">Tuning section</a> of <a href="http://www.openldap.org/doc/admin24/">OpenLDAP Admin Guide</a> first.</p>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save"><img src="http://www.bishnet.net/tim/blog/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a> </p>

<p>Related posts:<ol><li><a href='http://www.bishnet.net/tim/blog/2008/07/16/any-idea-wtf-is-going-on/' rel='bookmark' title='Permanent Link: &#8220;Any idea WTF is going on?&#8221;'>&#8220;Any idea WTF is going on?&#8221;</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.bishnet.net/tim/blog/2009/10/14/getting-the-indexes-right-for-openldap-when-using-nss/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

