Subject: [Fwd: Re: [Imap-uw] iowait when opening a mailbox?]

From: "Tom Cooper" <[email-masked]>
Date: Wed, 17 Aug 2005 13:11:46 -0400 (EDT)

Whoops!  I failed to reply to the list.  Sorry!

---------------------------- Original Message ----------------------------
Subject: Re: [Imap-uw] iowait when opening a mailbox?
From:    "Tom Cooper" <[email-masked]>
Date:    Wed, August 17, 2005 12:06
To:      "Mark Crispin" <[email-masked]>
--------------------------------------------------------------------------

Mark Crispin said:
> The first thing that you should do is update your software.  imap-2002d
is an older version.  The current release version is imap-2004e.
I'll look into this.  Apparently RH chose to switch to cyrus, which
explains why there's not a substantially newer version of your software...

>
> In traditional UNIX mailbox format, it is necessary to read every byte
of the file as part of startup.  A 200MB mailbox is a lot to read.  It
may also be necessary to do some rewriting to assign UIDs and status to
newly-delivered messages.  I agree though that your 540MB disk cache
should keep this from happening.
That makes some sense to me.  My INBOX folder is consistently empty or
DARN close to it. (1-2 messages max)  I do have SquirrelMail check all
folders for new mail, so I guess an empty inbox is really not a help
here...

>
> One step to do if you consistantly have a mailbox of that size is to
switch to the mbx format.  It greatly reduces the number of reads when
the mailbox is opened, as well as the number of writes to update the
mailbox. To get started on mbx format, read the following FAQ:
>  	http://www.washington.edu/imap/IMAP-FAQs/index.html#4.5
Thanks!  I'll look at that as well.  One wrinkle is that I'm leveraging
procmail, which doesn't require anything else to play nice with mbox, but
I see that you folks have dmail, which may make the transition relatively
painless.

>
> Next, you need to investigate if the I/O wait isn't due to something
else. For example:
>   (1) imapd does a reverse DNS lookup on the client's IP address to get
> its name.
That should be ok.   I tried that and found that I could easily reverse
lookup the IP address/name of the internet-exposed NAT. (Between work and
home they have a transparent proxy/NAT.)

>   (2) the c-client library attempts to launch IMAP-via-rsh to avoid the
>       need to negotiate authentication.  Unfortunately, rsh tends to
block for a minute if the rsh attempt is refused rather than quit
immediately.
Hmm.  I'd expect this to fail 100% of the time.  Any way to disable that?

> If either of these are the problem, it will show up even with small
mailboxes.
>
> Finally, does the problem happen with an IMAP client such as Pine?
Even on my home LAN, Thunderbird seems to take it's sweet time to open the
mailbox.  I don't think it's as bad as the webmail over https, but it can
be  slow.  I have not investigated whether this is related to local
resources or load on my server.

I can give it a shot with Pine.  Unfortunately if I run pine, it will most
easily be from the mail server itself, which would eliminate the
reverse-lookup issue - wouldn't it?

I've got a couple of other linux boxes at home.  I can configure pine
there to see what happens....
> I
> don't know whether squirrelmail does this, but many webmail programs
literally make a separate IMAP connection on a per-click basis.  This
puts a tremendous I/O load on the IMAP server.  Only a few very
well-written webmail programs maintain a static IMAP connection in
webmail.
I'll inquire with the squirrelmail team to see if there's an option for that.

Thanks much for the great feedback!

Regards,
Tom Cooper

_______________________________________________
Imap-uw mailing list
[email-masked]
https://mailman1.u.washington.edu/mailman/listinfo/imap-uw