[Date Prev][Date Next]
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.
Software Engineer, System Management
-- Howard Chu
CTO, Symas Corp. http://www.symas.com
Director, Highland Sun http://highlandsun.com/hyc/
Chief Architect, OpenLDAP http://www.openldap.org/project/