Dan Weber wrote:
What about a pthreaded implementation of dbmail?
Wouldn't that render much more speed than preforking, esp with multithreading?
There are many approaches conceivable when considering performance.
Handling of many simultaneous clients is just one issue. Single client
performance is the other, of course.
Threads are one alternative/additional strategy for improving IO.
Asynchronous operations and state-machines are others.
But first off, bottlenecks that require resolution need to be
identified, and only then should the appropriate .
One single bottleneck I keep running into is 'UID fetch xxx:xxx ...'
where the range is getting largish (>1000). In such situations, we get
exponential explosion of the number of queries triggered:
"""
dbmysql.c,db_query: executing query [SELECT pm.rfcsize FROM physmessage
pm, messages msg WHERE pm.id = msg.physmessage_id AND msg.message_idnr =
'n' AND msg.status< '2' AND msg.unique_id != '' AND msg.mailbox_idnr = 'm']
"""
and this for thousands of messages. Major IO lags follow.
Much better would be:
dbmysql.c,db_query: executing query [SELECT pm.rfcsize FROM physmessage
pm, messages msg WHERE pm.id = msg.physmessage_id AND msg.message_idnr
IN (n,n1,n2,...) AND msg.status< '2' AND msg.unique_id != '' AND
msg.mailbox_idnr = 'm']
Hell, even dropping the message_idnr clause completely would help major:
dbmysql.c,db_query: executing query [SELECT pm.rfcsize,msg.message_idnr
FROM physmessage pm, messages msg WHERE pm.id = msg.physmessage_id AND
msg.status< '2' AND msg.unique_id != '' AND msg.mailbox_idnr = 'm']
Of course, for either of those, imapcommands.c,_ic_fetch/db_get_rfcsize
would need to be fixed to handle this. It's currently single
message-bound, and should instead be message-List or Array bound.... I
guess a well constructed hash type would be useful for this. Perhaps
GHashType will be feasible.
--
________________________________________________________________
Paul Stevens mailto:[EMAIL PROTECTED]
NET FACILITIES GROUP PGP: finger [EMAIL PROTECTED]
The Netherlands________________________________http://www.nfg.nl