in reply to SMTP server in perl

I want this to be a high performance server. It currently handles on the order of 50,000 messages a day, and the hardware it's on is mainly sitting idle. I don't really see any performance bottlenecks yet, but I'm thinking about the future. It's hard to test different configurations, because everything goes so fast, I can't really notice any differences.

If you're serious about wanting to make your server faster then you're going to have to build a benchmarking framework. This should consist of a client (possibly multiple clients) which fire messages at the server at a configurable rate. The benchmarking system should record the time needed for each message to be accepted by the server as well as the time needed for delivery (if you server does delivery).

Here's an example of the kind of report you should try to generate: http://www-dt.e-technik.uni-dortmund.de/~ma/postfix/bench2.html

Once you have a benchmarking system you'll be able to make a small change (like dynamically loading SSL on demand) and test to see how that effects performance. Rinse, repeat and eventually rewrite the whole thing in C!

-sam

PS: To answer your actual question - 16MB is rather high for an SMTP server but whether its too high depends entirely on your needs. If your system can handle dedicating 16MB plus around 1MB per connection to handling incoming email then there's no reason for you to try to make it lower.