[imp] Hardware request ( RAM ) of WebMail System

Paul Holt pcholt at bluebottle.com
Fri Jan 5 02:55:10 PST 2007


On Friday 05 January 2007 19:44, Matus UHLAR - fantomas wrote:
> imp takes up much memory when displaying some messages, especially those
> with big image attachments. for processing 10MB attachments, PHP may take
> even 60 MB of RAM, and with images it's even worse (they are often
> decompressed in server's memory). If you plan to have many concurrent
> users, you may need much more of RAM.

Argh. We had these problems too. You see there are points in IMP and Pear MIME 
where the entire message is handled up to three times, and therefore there 
are briefly three copies in memory. If the attachment is base64 encoded, add 
another 40%, so you get 10*3*1.4=42MB just for the attachment.

I went through the IMP 2.* code at one stage, and cut it back to having only 
two copies in memory at a time maximum. I also did a version trying to do all 
message manipulations in a temporary file, I was able to have just one string 
in memory at a time, but this proved unstable... though it could be done 
again.

-- 
Paul Holt
Trusted Delivery Pty Ltd 
Level 5, 115 Elizabeth St, Melbourne
Victoria 3000 Australia.
+61 3 9642 0449 (phone)
+61 3 9642 4225 (fax)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.horde.org/archives/imp/attachments/20070105/7e28be06/attachment.bin


More information about the imp mailing list