Howard, Thanks for the quick reply! I agree with your views on Windows and all of our products are moving towards Linux but we have to put up with Windows for at least a short while longer.
In case others are interested, I was able to decrease OpenLDAP's memory usage by configuring the threads directive in slapd.conf. Instead of using the default (threads=16), I set threads=2. Now we move on to the next step - measurements to ensure that changing the threads setting does not negatively impact performance. Kyle Blaney -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Howard Chu Sent: May 28, 2008 1:30 PM To: Blaney, Kyle (BVW:9T16) Cc: [email protected] Subject: Re: Limit slapd memory usage on Windows? Kyle Blaney wrote: > Is there a way to limit slapd's memory usage on Windows? I ask > because we want to use OpenLDAP on memory-constrained systems. We're > having performance problems that occur when other applications start > and they need the memory used by slapd. A lot of page-swapping occurs > and performance suffers as a result. It might help to build it with an alternate malloc library, instead of using the default MSVCRT version. In general, trying to tune anything on Windows is like trying to carve water with a toothpick. The Windows memory manager basically does whatever it wants, regardless. Note also that on the exact same hardware, OpenLDAP on Linux is typically 2-3x faster than OpenLDAP on Windows. Running a critical service on Windows is just a waste of time. > I've tried to set a very small cachesize in slapd.conf and a very > small cache size in DB_CONFIG. However, those settings only decrease > the initial memory usage by slapd. When I add a single entry, slapd's > memory usage increases from 66 MB to 110 MB. When I add 100 more > entries, slap's memory usage increases to 276 MB. Even when I disable > all indexes, the memory usage is still similar. (The memory usage > numbers I state are the combination of slapd's private bytes and > virtual bytes as reported by the Windows Performance tool.) Is there > some way to tell slapd not to use more than X MB of memory even if > it's available in order to avoid future page swaps? > > Note that I'm running OpenLDAP 2.3.39 with BDB 4.4.20 on Windows XP > Professional with Service Pack 2. > --- > Kyle Blaney > Software Engineer, System Management > Nortel Networks > -- -- Howard Chu CTO, Symas Corp. http://www.symas.com Director, Highland Sun http://highlandsun.com/hyc/ Chief Architect, OpenLDAP http://www.openldap.org/project/
