Re: IMAP: Why so MANY connections?
- From: Larry Rosenman <ler lerctr org>
- To: "M . Thielker" <balsa t-data com>
- Cc: Balsa List <balsa-list gnome org>
- Subject: Re: IMAP: Why so MANY connections?
- Date: Mon, 23 Jul 2001 16:06:33 -0500
On 2001.07.23 15:43 M . Thielker wrote:
> Hi Larry,
>
> On 2001.07.23 20:42 Larry Rosenman wrote:
> > I just started using Balsa (1.1.7) on FreeBSD, talking to my IMAP
> server
> > at my house. I noticed that BALSA seems to use one connection per
> FOLDER
> > in the
> > hierarchy. WHY is this? It seems wasteful.
>
> IMAP is a stateful protocol. Each connection may be in SELECTED state,
> and
> usually is. SELECT may take time to execute, depending on the server
> implementation, RFC 2060 does not define a limit there.
> Libmutt is written to open a new connection if no unselected connection
> is
> available. On every folder open, the connection is selected to that
> folder
> to read the header info. For performance reasons, it's not deselected but
> stays selected for that folder, thereby blocking the connection for
> anything
> other than retrieving messages from that folder.
>
> If a test against some IMAP servers commonly used would reveal that
> SELECT
> doesn't take a noticeable amount of time, libmutt may be changed to
> release
> the connection after reading all headers, or multiplex a single
> connection
> between all folders on a server. It is good practice in server
> programming
> to cache all folder data on a per connection basis and use that cached
> data
> when a folder is selected that has been opened before in the lifetime of
> the
> connection. I believe all modern IMAP servers work this way. It may be
> safe
> to make that change, but there is a price to pay: If 2 IMAP folders are
> opened concurrently, the connection would probably need to be selected
> from
> one mailbox to the other for each and every message header. Also, index
> continuity may be jeopardized. It can't just simply be done by ignoring
> the
> selected state, there probably needs to be a timeout of some sort, so if
> no
> messages have been transferred on a selected connection for, say, 2
> seconds,
> the connection becomes available for use by other mailboxes.
> That would result in 2-3 connections to be opened per server. Maybe.
I'm using an IMAP-2000 UW server. StarOffice seems to get by on ONE
connection, as
does Squirrelmail. All reading the same set of mailboxes. What's even
worse, is
closing the mailbox doesn't seem to kill off the connection to the IMAP
server.
I'm willing to test changes...
I keep all my mailing lists in different Maildir's all accessable off the
IMAP tree,
and it seems very wasteful to have one conection per folder.
Just my observations.
LER
>
> Cheers,
>
> Melanie
>
> _______________________________________________
> balsa-list mailing list
> balsa-list@gnome.org
> http://mail.gnome.org/mailman/listinfo/balsa-list
>
>
--
Larry Rosenman, Sr. Network Engineer, Internet America, Inc.
E-Mail: ler@airmail.net
Phone: +1 214-861-2571, Fax: 214-861-2663
US Mail: 350 N. St. Paul, Suite 3000, Dallas, TX 75201
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]