Re: [389-users] Cache tuning errors

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



jim@xxxxxxxxxxxx wrote:
> 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..
>   
See the documentation for your kernel.  Even though you have 4GB of 
memory, on a 32-bit system, the kernel cannot allocate all of it for 
user processes.

How big is your database?  What is the size of your id2entry.db4 file?

You usually want to have your nsslapd-cachememsize large enough to hold 
your database in memory, if possible.  That gives the most boost to 
performance.  You probably want to leave nsslapd-dbcachesize at the 
default size - it does not impact performance nearly as much.
> 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?
>   
Let's first figure out how to size your cache appropriately.

The cache starts out empty, so until it becomes populated with entries, 
your cache hits will be 0.
> Thanks.
>
> Jim.
>
>
>
>
>
>
> --
> 389 users mailing list
> 389-users@xxxxxxxxxxxxxxxxxxxxxxx
> https://admin.fedoraproject.org/mailman/listinfo/389-users
>   

--
389 users mailing list
389-users@xxxxxxxxxxxxxxxxxxxxxxx
https://admin.fedoraproject.org/mailman/listinfo/389-users

[Index of Archives]     [Fedora Directory Users]     [Fedora Directory Devel]     [Fedora Announce]     [Fedora Legacy Announce]     [Kernel]     [Fedora Legacy]     [Share Photos]     [Fedora Desktop]     [PAM]     [Red Hat Watch]     [Red Hat Development]     [Big List of Linux Books]     [Gimp]     [Yosemite News]

  Powered by Linux