[389-users] Cache tuning errors

jim at scusting.com jim at scusting.com
Thu Apr 1 14:31:17 UTC 2010


Hi - I had a read of the Redhat documentation on cache sizes and tuning 
and tried tweaking one of my servers as it was setup with the default.  
The server is a Fedora 10 box with 4GB of RAM so I decided to setup the 
cache as:

nsslapd-cachememsize = 3145728000 (3GB)
nsslapd-dbcachesize   = 3670016000 (3.5GB)

But when I restart I get the message:
[01/Apr/2010:13:56:30 +0100] - WARNING -- Possible CONFIGURATION ERROR 
-- cachesize (2072199168) may be configured to use more than the 
available physical memory.
[01/Apr/2010:13:56:30 +0100] - WARNING---Likely CONFIGURATION 
ERROR---dbcachesize is configured to use more than the available 
physical memory, decreased to the largest available size (2072199168 bytes).
[01/Apr/2010:13:56:30 +0100] - I'm resizing my cache now...cache was 
2072203264 and is now 2072199168

Is there a limit of 2GB on the cache sizes?  The server has 4GB memory..

I then put the settings down lower to:
nsslapd-cachememsize = 1153433600 (1.1 GB)
nsslapd-dbcachesize   = 1677721600 (1.6 GB)

I then hit it with some big queries to load up the cache and now I get:
[01/Apr/2010:14:34:15 +0100] - libdb: txn_checkpoint: failed to flush 
the buffer cache: Cannot allocate memory
[01/Apr/2010:14:34:15 +0100] - Serious Error---Failed to checkpoint 
database, err=12 (Cannot allocate memory)
[01/Apr/2010:14:34:15 +0100] - libdb: malloc: 3145764: Cannot allocate 
memory
[01/Apr/2010:14:34:15 +0100] - libdb: txn_checkpoint: failed to flush 
the buffer cache: Cannot allocate memory
[01/Apr/2010:14:34:15 +0100] memory allocator - calloc of 8194 elems of 
4 bytes failed; OS error 12 (Cannot allocate memory)
The server has probably allocated all available virtual memory.

When that happened top was reporting the slapd process only using %40 
memory and there is nothing else running on this server.

I was trying to do some tuning as these servers are worked quite hard 
and the "Entry Cache hits" was showing as 0 - I would of expected some 
hits even with a smallish cache?

Thanks.

Jim.









More information about the 389-users mailing list