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.


In reply to Re: SMTP server in perl by samtregar
in thread SMTP server in perl by althepal

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.