Op 5-nov-03 om 23:39 heeft Eric Soroos het volgende geschreven:


I have used Evolution, Outlook Express, Mozilla, Thunderbird and to a lesser extent Outlook. They all work well. To me the main reason to use dbmail is for IMAP. Traditional unix based imap servers really hit a performance wall when mailboxes start getting big. dbmail is MUCH better. I have several mailboxes with well over 25,000 messages in them, and dbmail doesn't blink.

Maybe it's just my setup, but I've found that synching a 18k item mailbox gets me a message or two a seconds. Smaller mailboxes are damn fast.

I'm on debian/stable, updated as of yesterday, running postgresql. The client is mail.app.

I actually did a bunch of looking at this yesterday, and I think I can trace it down to a call to db_getmailbox in the course of a uid fetch command. Since mail.app grabs 2 messages at a time, it's tablescanning the mailbox table, then sorting, for each two messages. (This is really because this mailbox is 1/2 the total messages in the system, so it resorts to tablescanning)

I looked at the 1.2 source and couldn't find the offending call to db_getmailbox, so I'm in the process of pulling the debian 1.1-1 sources to see how different they are.


Could you set the tracelevel to 5 and send the exact imap commands mail.app is generating? This way we might be able to speed things up a bit.


I've also noticed that after every inserted message, there is one query per folder on my mailbox to determine the total size of my account. Setting aside the fact that I don't have a quota on my account, there's no possible need run 20 queries when one join would do. e.g. select sum(messages.rfcSize) from messages inner join mailboxes using (mailbox_idnr) where mailbox.owner_idnr='me'. It would still be a table scan, but at least it would just be one table scan. (see db_check_sizelimit)


Well, this problem is being addressed in 2.0 - it uses a new field in the user table which keeps track of the current amount of mail in all the folders for a certain user. This enables us to determine the current mailbox size with one real fast query. The reason we currently use a number of queries instead of one JOINed is performance; we have encountered numerous cases where looping simple queries performs way better than having the sql backend joining tables (though i'm not completely sure this is such a case ;-)

regards
roel


eric


_______________________________________________
Dbmail mailing list
Dbmail@dbmail.org
https://mailman.fastxs.nl/mailman/listinfo/dbmail


_________________________
R.A. Rozendaal
IC&S
T: +31 30 2322878
F: +31 30 2322305
www.ic-s.nl

Reply via email to