faster delivery of cyrus imap -- writev() takes 1.2 sec!

David Lang dlang at diginsite.com
Sun Sep 8 00:10:31 EDT 2002


did you change the directories that cyrus uses to be synced for every
write? while that provides extra crash protection is slows things down a
LOT.

David Lang

 On Sat, 7 Sep 2002, Su Li wrote:

> Date: Sat, 7 Sep 2002 23:23:20 -0400
> From: Su Li <sli at rim.net>
> To: info-cyrus at andrew.cmu.edu
> Subject: faster delivery of cyrus imap -- writev() takes 1.2 sec!
>
> Hi,
>
> I tried to make Cyrus imap deliver mail faster, by changing
> --with-duplicated-db to skiplist and disabled notification. It didn't work.
> I am sending email from my testing tool. I run 4 of them, each trying to
> send one email to mail server with a delay of 20 msec. It seems the Cyrus
> imap can only process 1 email per second.
>
> My configuration for imap is:
>
> ./configure --with-auth=unix --without-krb4 --without-ucdsnmp
> --with-bdb-incdir=/usr/local/BerkeleyDB.4.0/include
> --with-bdb-libdir=/usr/local/BerkeleyDB.4.0/lib --with-dblib=berkeley
> --with-dbpath=/usr/local/BerkeleyDB.4.0 --with-lock=fcntl
> --with-mboxlist-db=skiplist --with-seen-db=skiplist  --without-notify
> --disable-sieve --enable-fulldirhash --with-idle=no
> --with-duplicate-db=skiplist
>
> I run "strace -T -p pid", in which pid is pid of lmtpd. The following line
> catches my eyes.
>
> writev(11, [{"\0\0\0018(\"Sat, 7 Sep 2002 22:12:14 -"..., 316},
> {"\0\0\0Q(\"TEXT\" \"PLAIN\" (\"CHARSET\" {"..., 88}, {"\0\0\0E(\"TEXT\"
> \"PLAIN\" (\"CHARSET\" {"..., 76},
> {"\0\0\0000\0\0\0\2\0\0\0\0\0\0\2Y\0\0\2Y\0\0\0000\377\377"..., 52},
> {"\0\0\0\0", 4}, {"\0\0\0*loadtest <loadtest1586 at web9."..., 48},
> {"\0\0\0!<loadtest1586 at web9.swlab.rim"..., 40}, {"\0\0\0\0", 4},
> {"\0\0\0\0", 4}, {"\0\0\0\3NIL\0", 8}], 10) = 640 <1.207524>
>
> It takes 1.2 sec to do writev() for each email! I search through the code in
> /imap/messages.c. It looks like the following function is doing the writing:
>
> /*
>  * Write the BODY (if 'newformat' is zero) or BODYSTRUCTURE
>  * (if 'newformat' is nonzero) for 'body' to 'ibuf'.
>  */
> static void
> message_write_body(ibuf, body, newformat)
>
> I wonder why writev() takes so long to do the writing? In the mean time I
> don't found error messages about locking. I guess it is not
> "duplicate_check" who is take so long. It there any thing to don with my
> configurations, or sendmail's configuration?
>
> Thanks a lot.
>
>
> Su
>
> Research In Motion
> (519)888-7465 ext 3041
>
>
>
>
>
>
>
>
>
>
>




More information about the Info-cyrus mailing list