> 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. >> >> So wait -- the MTA takes the message, puts it in a file to queue for >> delivery. Then the MTA reads the file either into a pipe or tcp >> connection >> to dbmail. Then DBMail puts the message into a file to piece into the >> database. So for every message, we put it on disk twice and into memory >> three times... > > Well, actually the file can be opened with flags that hint to the OS > that this is indeed a temporary file that might just be stored into > memory cache and never even touch the disk (OS will decide depending > on wether enough memory is free and how long it has lived in memory). >
Another option is to have the temporary files on a RAMFS file system Magnus