Re: [Dbmail-dev] reading everything into memory?

2005-02-11 Thread Aaron Stone
On Fri, Feb 11, 2005, ""mc"" <[EMAIL PROTECTED]> said: > A question: has anyone tried SQL_CACHE (mysql only) or will that work with > dbmail's design? I still haven't tried to find out how dbmail uses queries > yet. I'll just answer this question, because I use the MySQL query cache. It helps.

Re: [Dbmail-dev] reading everything into memory?

2005-02-11 Thread Paul J Stevens
mc wrote: Another question: would it be feasible to implement some sort of db connection pooling? That question keeps coming up every now and then. And with good reason because our current model doesn't scale very well for large amounts of idle imap clients. There a package called pgpool wh

Re: [Dbmail-dev] reading everything into memory?

2005-02-11 Thread mc
- Original Message - From: "Paul J Stevens" <[EMAIL PROTECTED]> To: "DBMAIL Developers Mailinglist" Sent: Friday, February 11, 2005 6:23 Subject: Re: [Dbmail-dev] reading everything into memory? Aaron Stone wrote: On Thu, Feb 10, 2005, ""mc"" <[EMAIL PROTECTED]> said: The problem

Re: [Dbmail-dev] reading everything into memory?

2005-02-11 Thread dbmail
Hans Kristian Rosbach wrote: Is memory usage on insertion a real problem or only a theoretical? If message size is limited to 25 MB by the MTA and the MTA is only allowed to deliver 25 messages at once maximum memory usage is 625 MB. But I think it happens very rarely that 25 mails with the max

Re: [Dbmail-dev] reading everything into memory?

2005-02-11 Thread Hans Kristian Rosbach
On Fri, 2005-02-11 at 13:23, Magnus Sundberg wrote: > > On Fri, 2005-02-11 at 11:01, Aaron Stone wrote: > >> On Fri, Feb 11, 2005, Hans Kristian Rosbach <[EMAIL PROTECTED]> said: > [snip] > >> > 2. We can use a tempfile > >> >Now, this would lead to more database calls depending on block size >

Re: [Dbmail-dev] reading everything into memory?

2005-02-11 Thread Magnus Sundberg
> On Fri, 2005-02-11 at 11:01, Aaron Stone wrote: >> On Fri, Feb 11, 2005, Hans Kristian Rosbach <[EMAIL PROTECTED]> said: [snip] >> > 2. We can use a tempfile >> >Now, this would lead to more database calls depending on block size >> >and it would probably lead to worse performance. >> >>

Re: [Dbmail-dev] reading everything into memory?

2005-02-11 Thread Hans Kristian Rosbach
> Is memory usage on insertion a real problem or only a theoretical? If > message size is limited to 25 MB by the MTA and the MTA is only allowed > to deliver 25 messages at once maximum memory usage is 625 MB. But I > think it happens very rarely that 25 mails with the maximum message size > a

Re: [Dbmail-dev] reading everything into memory?

2005-02-11 Thread dbmail
Hans Kristian Rosbach wrote: We could actually use this! As we read from the network, we write to the named pipe. It's up to the operating system to do the buffering and whatnot, and we're not limited by any size constraints because LOAD DATA INFILE implementations are built for big stuff (I thin

RE: [Dbmail-dev] reading everything into memory?

2005-02-11 Thread Aaron Stone
On Fri, Feb 11, 2005, Hans Kristian Rosbach <[EMAIL PROTECTED]> said: > On Fri, 2005-02-11 at 11:39, Wolfram A. Kraushaar wrote: >> Actually the max messageblksize is 512*KB*, not bytes - so a 50 Meg message >> leads to 100 queries. > > I think even 512KB is too small for big systems. > It might

RE: [Dbmail-dev] reading everything into memory?

2005-02-11 Thread Hans Kristian Rosbach
On Fri, 2005-02-11 at 11:39, Wolfram A. Kraushaar wrote: > > > insert msg set id=xxx, body="first 512 bytes of msg goes here..."; > > > update msg set body=body+"another 512 bytes..." where id=xxx; > > > update msg set body=body+"yet another 512bytes" where id=xxx; > > > > Lets see.. our current

RE: [Dbmail-dev] reading everything into memory?

2005-02-11 Thread Wolfram A. Kraushaar
> > insert msg set id=xxx, body="first 512 bytes of msg goes here..."; > > update msg set body=body+"another 512 bytes..." where id=xxx; > > update msg set body=body+"yet another 512bytes" where id=xxx; > > Lets see.. our current max attachment size is (on our mailservers) > 50MB, with 512bytes

Re: [Dbmail-dev] reading everything into memory?

2005-02-11 Thread Hans Kristian Rosbach
On Fri, 2005-02-11 at 11:29, [EMAIL PROTECTED] wrote: > Paul J Stevens wrote: > > >> insert msg set id=xxx, body="first 512 bytes of msg goes here..."; > > >> update msg set body=body+"another 512 bytes..." where id=xxx; > > >> update msg set body=body+"yet another 512bytes" where id=xxx; > > >

Re: [Dbmail-dev] reading everything into memory?

2005-02-11 Thread Aaron Stone
On Fri, Feb 11, 2005, Hans Kristian Rosbach <[EMAIL PROTECTED]> said: > On Fri, 2005-02-11 at 11:21, [EMAIL PROTECTED] wrote: >> Aaron Stone wrote: >> >> > Take a look at the fifo pipe they use as the 'datafile' about halfway down >> > this page: >> > http://dev.mysql.com/doc/mysql/en/load-dat

Re: [Dbmail-dev] reading everything into memory?

2005-02-11 Thread Hans Kristian Rosbach
On Fri, 2005-02-11 at 11:01, Aaron Stone wrote: > On Fri, Feb 11, 2005, Hans Kristian Rosbach <[EMAIL PROTECTED]> said: > > >> P.S.: If it was really meant to read everything into memory and then copy > >> the same message again to the insert query, why not consider reading > >> everything into

Re: [Dbmail-dev] reading everything into memory?

2005-02-11 Thread Hans Kristian Rosbach
On Fri, 2005-02-11 at 11:21, [EMAIL PROTECTED] wrote: > Aaron Stone wrote: > > On Fri, Feb 11, 2005, Hans Kristian Rosbach <[EMAIL PROTECTED]> said: > >>2. We can use a tempfile > >> Now, this would lead to more database calls depending on block size > >> and it would probably lead to worse per

Re: [Dbmail-dev] reading everything into memory?

2005-02-11 Thread dbmail
Paul J Stevens wrote: >> insert msg set id=xxx, body="first 512 bytes of msg goes here..."; >> update msg set body=body+"another 512 bytes..." where id=xxx; >> update msg set body=body+"yet another 512bytes" where id=xxx; this will create massive amounts of insert queries if you're indeed re

Re: [Dbmail-dev] reading everything into memory?

2005-02-11 Thread dbmail
Aaron Stone wrote: On Fri, Feb 11, 2005, Hans Kristian Rosbach <[EMAIL PROTECTED]> said: 2. We can use a tempfile Now, this would lead to more database calls depending on block size and it would probably lead to worse performance. [..] Take a look at the fifo pipe they use as the 'datafi

Re: [Dbmail-dev] reading everything into memory?

2005-02-11 Thread Aaron Stone
On Fri, Feb 11, 2005, Hans Kristian Rosbach <[EMAIL PROTECTED]> said: >> P.S.: If it was really meant to read everything into memory and then copy >> the same message again to the insert query, why not consider reading >> everything into a temp file, and then store the msg in db using something

Re: [Dbmail-dev] reading everything into memory?

2005-02-11 Thread Hans Kristian Rosbach
> P.S.: If it was really meant to read everything into memory and then copy > the same message again to the insert query, why not consider reading > everything into a temp file, and then store the msg in db using something > like this: > > insert msg set id=xxx, body="first 512 bytes of msg goe

Re: [Dbmail-dev] @domain.com to perl

2005-02-11 Thread Aaron Stone
On Fri, Feb 11, 2005, Kasper Haagensen <[EMAIL PROTECTED]> said: > Your ex. works, but what it does, is writing the email to a file, when i > try to parse it to a perl program, it just add the mail contents, in the > end of the perl program, and that was not the way i want it. Sounds like you w

Re: [Dbmail-dev] @domain.com to perl

2005-02-11 Thread Kasper Haagensen
Hi Aaron, Your ex. works, but what it does, is writing the email to a file, when i try to parse it to a perl program, it just add the mail contents, in the end of the perl program, and that was not the way i want it. Any ideas? Tha MTA i use, is Postfix. Kasper Aaron Stone wrote: Quick