[kdepim-users] Seperate 'sets' of mail boxes

Ingo Klöcker kloecker at kde.org
Wed Nov 19 21:36:24 GMT 2008


On Wednesday 19 November 2008, Peter777 wrote:
> Hi Anne,
>
> On Wednesday 19 November 2008 22:30:49 you wrote:
> > On Wednesday 19 November 2008 10:19:18 Peter777 wrote:
> > > Pegasus uses mbox, and I've noticed that maildir format in KMail
> > > keeps a file for every email message. How slow is very slow ?  I
> > > guess it depends on the number of emails in the one file (mbox)
> > > and the total size of the folder (one Pegasus .PMM file is over
> > > 14Mb ), and also the computer (grunt).
> >
> > Put it this way - I wouldn't want to use it.  I changed from mbox a
> > long time ago, when my folders got up to 3000 messages.
>
> No doubt a lot depends on the size of the mbox, not so much how many
> emails. Consider the 14Mb Pegasus mbox file, it has only 1680 email
> messages in it, whereas one has 4336 emails in it, and only 11Mb.

Of course, it depends on both factors, but I'd say the number of 
messages has much more influence. Since KMail keeps an index of the 
mbox file (which grows proportionally to the number of messages) the 
number of messages has a greater impact than the size of the messages. 
Also it's the number of messages and thus the number of items in the 
message list that influences the speed of the message list.


> > The trouble with mbox is that every time a message changes status
> > or is deleted, the whole file has to be read in, compacted if
> > something has been deleted, then written back to disk.  With large
> > mailboxes the delay is noticeable.
>
> That is not how Pegasus does it, it is very quick.

And it is not how KMail does it. It is also very quick. Status changes 
are only written to the index file. Deleting a message also just 
changes its status leaving the deleted message in the mbox file. To 
prevent the mbox file from growing too large, KMail compacts the mbox 
files from time to time in the background. This compaction is claimed 
to have a noticeable impact on very slow computers.


> If a message 
> changes status, only a small part of the file is modified, the entire
> file does not have to be written back, as the status flags always
> take up the same area on disk. If an email is deleted, again, the
> whole file does not need to be compacted and then written back to
> disk, all that happens is a flag is set. For new mails, they are
> simply appended to the end of the mbox file, and this again does not
> mean the entire file is rewritten to disk, with file reference at
> 'eof', it's easy to just append one email message.

Pretty much the same as what KMail does. Pegasus surely also does some 
sort of compaction to prevent unlimited grows of its mailbox files.


> As an example, I just copied a considerable sized email msg to the
> 14Mb mbox file in Pegasus, it took 1 second, .. done. I'm running a
> P2-350 with only 256 Mb ram, and have pegasus, Kmail, gedit, firefox,
> nautilus, 3 terminal windows and a firewall running, in addition to
> all the other services. So it seems 'grunt' doesn't matter so much,
> but how an mbox is maintained.

256 MB really is the lower limit for KDE 3. And your choice of 
applications really needs lots of memory since Firefox, Gnome 
applications (gedit, nautilus) and KDE applications all pull in a lot 
of mostly disjoint libraries.


> It seems from what you are saying that mbox under KMail is very slow
> indeed.

I respectfully disagree. From my own experience (I've used an Athlon 550 
with 384 MB RAM until mid of last year) I cannot say it was ever really 
slow. Compiling KDE was unbearably slow on this machine, but KMail 
wasn't slow at all.


> > Conversely, maildir handles only the one message at a time and
> > is very fast.
>
> Won't having (possibly) hundreds of thousands of files with maildir
> (one file per email message) put a significant (extra) load on Linux
> systems ? There is abviously , in Linux , the equivalent of a FAT, so
> keeping track of so many files (or a lot less with mbox) must place
> some overhead on system peformance.

Not really. The file systems used by Linux are optimized for file 
servers (since, contrary to Windows, Linux traditionally is a server 
system) and thus they are blazingly fast compared to FAT.


Regards,
Ingo
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kdepim-users/attachments/20081119/edc8e4aa/attachment.sig>
-------------- next part --------------
_______________________________________________
KDE PIM users mailing list
kdepim-users at kde.org
https://mail.kde.org/mailman/listinfo/kdepim-users


More information about the kdepim-users mailing list