Subject: IMAP server capacity

From: [email-masked] (Kazuhiro Kitagawa)
Date: 14 Nov 95 10:51:57

Hello imap folks.

Now, we intend to install imap mail system as main mail 
system.
I am wondering how many users can access single imap server 
at same time. We plan to use SS20 or PowerPC AIX machine
with bunch of memory ?

Do these machine allows simaltaneous  200 clients access  
with resonable speed ?

Our expreience shows pop provide over 200 clients access
at same time.

I am looking forward to your reply.

Thank you.

		-kaz
		kaz kitagawa

---

From: Terry Gray <[email-masked]>
Date: Tue, 14 Nov 1995 08:43:21 -0800 (PST)

Short answer: Yes, provided you use reasonably fast disks, and moderately
small ones (e.g. 1GB).  That is, you will be limited by seek bandwidth.
Also, if you are using the UW IMAP server, we suggest using Tenex format
mail files, as they are more memory-efficient than mbox format files.

-teg

---

From: [email-masked] (David Richards)
Date: Tue, 14 Nov 1995 21:16:13 GMT

What kind of memory does IMAPd take up? 

If a user has a 5Mb mailbox consisting of 300 messages, how much memory
will their IMAPd process occupy?

5Mb?
300 x (size of the header lines) ?
more? less?

--
David Richards                                     Ripco Communications Inc.
My opinions are my own,                            Public Access in Chicago
But they are available for rental                  FREE Usenet and Email
[email-masked]                                       (312) 665-0065

---

From: Kazuhiro Kitagawa <[email-masked]>
Date: Wed, 15 Nov 1995 10:27:46 +0900

Dear Terry:

Thank you for your advice.

		-kaz

---

From: Mark Crispin <[email-masked]>
Date: Wed, 15 Nov 1995 20:17:50 -0800

> 300 x (size of the header lines) ?

It depends upon the mailbox format in use.  If you use the default Unix
mailbox format, imapd keeps a snapshot of the mailbox in memory.  If you
use certain other formats, such as tenex, only the currently-read message
is in memory.  Read the Pine Technical Notes for more information.

imapd also keeps the results of any prior RFC-822/MIME parses of the
message in memory.  How much that is depends upon the complexity of the
RFC-822 and MIME headers.  It only does a parse on demand though, so it
isn't likely that all 300 messages will have cached parses.

-- Mark --

DoD #0105, R90/6 pilot, FAX: (206) 685-4045  ICBM: N 47 39'35" W 122 18'39"
Science does not emerge from voting, party politics, or public debate.

---

From: [email-masked] (David Richards)
Date: Thu, 16 Nov 1995 05:03:41 GMT

In article <[email-masked]>,
>mail files, as they are more memory-efficient than mbox format files.

Specifically, if you use a standard (^A^A^A^A or From separated) Unix
mailbox format then IMAP will keep a copy of the entire mailbox in memory
for as long as the client is connected to the server.

This kills my hopes for using IMAP on a large scale, since RAM is still
expensive and swapping kills system performance. Plus of course my
MDA doesn't support Tenex format.
--
David Richards                                     Ripco Communications Inc.
My opinions are my own,                            Public Access in Chicago
But they are available for rental                  FREE Usenet and Email
[email-masked]                                       (312) 665-0065

---

From: Mark Crispin <[email-masked]>
Date: Thu, 16 Nov 1995 00:19:42 -0800

> MDA doesn't support Tenex format.

I think that these statements are overblown.

RAM costs about $35/MB.

Most modern UNIX systems page instead of swap.  The result is that the
actual memory consumed is much smaller than the virtual memory.

"Swapping kills system performance" is one of these great truisms that get
passed around without full understanding.  A great deal depends upon the
nature of the swapping and of the system configuration.  If you swap onto
a slow disk that also is busy going filesystem activity, you probably will
have a problem.  If you configure your system properly, preferably keeping
swapping on its own spindle, you will have much less of a problem.

The alternative to keeping a snapshot of the mailbox in memory is to use a
temporary file when rewriting mbox or MMDF (what you call "standard UNIX
mailbox format") file.  The reason why another copy is needed is that the
Status: and X-Status: lines make it possible for a message to grow into
the space consumed by subsequent messages.  That's why most other mail
programs use the scratch file.

The problem is that this requires disk space.  Many academic sites have
rather tight disk quotas.  Put another way, it's easier for a student to
get 5MB of RAM than it is for her to get 5MB of free disk space.

To make matters worse, on many UNIX systems it is necessary to make sure
that the inode doesn't change.  This means that the rewrite of the file
has to happen on top of the old data.  So this means *two* copies of the
data, first to the temp file and then back.  On most virtual memory UNIX
systems, having an in-memory snapshot results in about half the disk
traffic than the temp file method.

Tenex, mtx, mbx (new in imap-4), and mh formats don't have this problem.
This is because it is possible to make updates to mailboxes in these
formats without having to worry about overwriting data in subsequent
messages.  In tenex, mtx, and mbx, it does random-access updates in place
on pre-allocated status fields, and expunge is implemented by moving
messages down on top of deleted messages.  In mh, each message is a
separate file.

-- Mark --

---

From: Terry Gray <[email-masked]>
Date: Thu, 16 Nov 1995 07:37:16 -0800 (PST)

David,
You can get an mail delivery agent that understands Tenex format from our
ftp server.  It's called "tmail".  I think it's in
  ftp://ftp.cac.washington.edu/mail/imap-utils.tar.Z

-teg