[Mimedefang] Not embedding Perl performance

David F. Skoll dfs at roaringpenguin.com
Sun Jan 21 21:06:43 EST 2007


Jeff Rife wrote:

> So, is the multiplexor now creating a Perl process for each milter 
> callback, or for each e-mail or what?

The performance hit for embedded perl is not that great, actually.
CPU performance should be almost the same during scanning.  Startup
costs will be more expensive, because you're forking and execing a
Perl interpreter and reinitializing SpamAssassin, but that only happens
every 100 requests (or whatever you've set MX_REQUESTS to).

You also use more memory, but again, the overhead is not terrible.  It
turns out that Perl is very *poor* at sharing memory among child
processes post-fork.  It uses a reference-counted garbage collector,
so even looking at a piece of data probably modifies the reference
count, dirtying the page and eliminating the possibility of
sharing. :-(

Regards,

David.



More information about the MIMEDefang mailing list