Re: How do I increase default DBD cache size

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

 



On Wed, Jan 31, 2007 at 03:26:09PM +0530, Ramprasad wrote:
> I was reading performance tuning information at 
> 
> http://cyrusimap.web.cmu.edu/imapd/install-perf.html
> I too have a large cyrus setup with minimum  600+ connections at a time
> We are upgrading to a 8GB Ram Dual Xeon box , I want to make sure we use
> the hardware optimally 
> 
> The document talks of increasing cache size in cyrus source which file
> do I change ? 
> 
> I made this change to the source ( patch file ). Will it work 
> 
> 
> 
> Index: lib/imapoptions
> ===================================================================
> --- lib/imapoptions     (.../cyrus-2.3.7-DEFAULT)       (revision 134)
> +++ lib/imapoptions     (.../cyrus)     (revision 134)
> @@ -155,7 +155,7 @@
>     creating the mailbox INBOX.  The user's quota is set to the value
>     if it is positive, otherwise the user has unlimited quota. */
> 
> -{ "berkeley_cachesize", 512, INT }
> +{ "berkeley_cachesize", 4096, INT }
>  /* Size (in kilobytes) of the shared memory buffer pool (cache) used
>     by the berkeley environment.  The minimum allowed value is 20.  The
>     maximum allowed value is 4194303 (4GB). */

No need to patch the code for that - it's an option!  Just put:

berkeley_cachesize: 4096

in your /etc/imapd.conf

We use skiplist for our mailboxes.db and we haven't seen any issues that
were caused by leaving that at its default value.

That said:

% cat $confdir/db/DB_CONFIG
set_cachesize 0 2097152 1
set_lg_regionmax 2097152
set_lg_bsize 2097152
set_lg_max 16777216
set_tx_max 200
set_tas_spins 1
% 

(and no, I didn't set that up, so I'm not sure why all those values.  It
works for us though)

Sounds like your hardware should cope OK with 600 connections:

[root@imap2 root]$ netstat -n -a | grep :2143 | wc -l
2232

And that's at one of our least busy times.  I expect it goes up to 2 or
3 times that during the U.S. day.

NOTE: we're using reiserfs for our drives, and that machine has 42
partitions split over 8 different raidsets via two separate SCSI
controllers, and a split meta configuration that puts the meta data
on RAID1 for speed.  Still, it's possible to get an order of magnitude
more connections out of that sort of spec.  That's 8Gb of memory in
that machine, and dual hyperthreading Xeons:

model name      : Intel(R) Xeon(TM) CPU 2.40GHz
stepping        : 7
cpu MHz         : 2394.878

(there's some headroom left with the memory still too...)
-/+ buffers/cache:    6118564    2193000

Bron.
----
Cyrus Home Page: http://cyrusimap.web.cmu.edu/
Cyrus Wiki/FAQ: http://cyrusimap.web.cmu.edu/twiki
List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html

[Index of Archives]     [Cyrus SASL]     [Squirrel Mail]     [Asterisk PBX]     [Video For Linux]     [Photo]     [Yosemite News]     [gtk]     [KDE]     [Gimp on Windows]     [Steve's Art]

  Powered by Linux