On Mon, 2005-03-14 at 21:35 +0000, Aaron Stone wrote:
> On Mon, Mar 14, 2005, Geo Carncross <[EMAIL PROTECTED]>
> said:
>
> > for I in ~/dbmail-archive/Maildir/new/*; do ./dbmail-smtp -f dbmail.conf
> > -d test -m INBOX < $I; done
>
> One message per second for two hours is 60 * 60 * 2 = 7200 messages. So
> that's the ballpark we're in right now. In 1 second you are:
>
> - spawning a process
> - connecting to PostgreSQL
> - reading a message from disk
> - inserting into Pg
> - closing Pg connection
>
> This sounds pretty reasonable to me. You might consider writing a quick
> and dirty LMTP client to see how it compares. That would eliminate some of
> the system dependencies (spawning process, reading uncached file from
> disk, perhaps a synchronous syslog).
A dedicated client wouldn't be much faster.
6242 reads from buffer-space:
real 0m1.572s
user 0m0.046s
sys 0m0.238s
6242 spawns+connect/shutdowns of PG (same system):
real 1m10.893s
user 0m25.127s
sys 0m29.939s
6242 above, plus inserts:
real 156m34.815s
user 1m26.734s
sys 2m37.069s
Interestingly enough, dbmail-SQLite does the same for/operation in:
real 116m2.527s
user 2m27.455s
sys 2m33.049s
There are certainly some operations here that SQLite does a little
better, but this still seems very very slow to me. It'd be nice to see
some gprof output for this (... but not today!)
--
Internet Connection High Quality Web Hosting
http://www.internetconnection.net/