Operating System - HP-UX
1752795 Members
6116 Online
108789 Solutions
New Discussion юеВ

Re: How to simulate sending lots of emails

 
SOLVED
Go to solution
Kellogg Unix Team
Trusted Contributor

How to simulate sending lots of emails

Sendmail Gurus,

I have to test if my system (L3000) can handle sending lots of emails (about 50,000/day). I want to run the test such that -
1. emails are generated with recepients as different users in different domains (joe@domain1.com, mary@domain2.com, etc.)
2. MX records of these domains are resolved and verified by our DNS server.
3. The emails are NOT sent but a line is added to the log-file stating address being verified with a time-stamp.

Will this be a good test (simulation) to give me an idea of load? Any other idea, which would help to test and measure the load is also welcome.

As a side Q, which constitues a load in a sendmail server - memory, CPU, disk I/O ?

And no, its not to generate spam-mail! :-). One of the cgi-bin scripts on web-server will take input from visitor(s) and send emails to the addresses mentioned in the form.

Thanks and looking forward to your valuable inputs!
...Manjeet
work is fun ! (my manager is standing behind me!!)
9 REPLIES 9
Christopher Caldwell
Honored Contributor

Re: How to simulate sending lots of emails

50K e-mails a day will be trivial on an L3000. We've been known do 50K+ on an E55.

The "cost" of sendmail is taken in process instantiation and disk I/O.

Each time a new mail connection comes in, sendmail forks a new process to handle the connection (process instantiation).

When mail is delivered, it may get written as many as three times (~/tmp, mqueue, mail). (I/O)

My fear is that since you aren't doing an end to end transaction, you're going to miss most of the "cost" (process instantiation and I/O).

Kellogg Unix Team
Trusted Contributor

Re: How to simulate sending lots of emails

Thanks for confirming that its not too many emails! My understanding is that even if emails are not sent, the system is going through initiating a process for every email, verifying it and writing to the log file.

If the above is not true, what would be the true test? And how would I simulate the it?
work is fun ! (my manager is standing behind me!!)
Jeff Schussele
Honored Contributor

Re: How to simulate sending lots of emails

Hi Manjeet,

I agree w/Christopher, if you don't *actually* send anything, you'll never know the limits.

You could try setting up host & user alias' such that the mail will leave the local host, go to your Exchange or SMTP server to be routed right back to the local host.

This would have the added feature of generating *twice* the volume as you'll have outgoing AND incoming sendmail sessions going on that box.

My 2 cents,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
Shannon Petry
Honored Contributor

Re: How to simulate sending lots of emails

50K emails "sent" a day is really nothing for your machine type.

As mentioned by the previous poster, sendmail is not really CPU and memory bound, but disk bound.

You can not really simulate this by conventional means.

What you could try, is if you have a firewall, have it drop all outbound packets for port 25, and not error. This would allow the best real testing for an outbound mail server.

Again though, there is alot of dependance on the size of each message, and your disk layout.

Regards,
Shannon
Microsoft. When do you want a virus today?
Kellogg Unix Team
Trusted Contributor

Re: How to simulate sending lots of emails

The size of the mail message is very less. It may contain few lines and a URL but no fancy attachments and/or gif,jpg files.

This is my production server which does send outbound emails. I like the idea of dropping connection at firewall but that will drop legitimate emails as well. I will ask my n/w admin if our firewall can prevent emails based on some other rule (like sender).

I am still open for more suggestions! :-)

...Manjeet
work is fun ! (my manager is standing behind me!!)
Christopher Caldwell
Honored Contributor

Re: How to simulate sending lots of emails

The only "realistic" end-to-end simulation you could do are with protocol level (SMTP) testers that can vary rate of connects, speed of connect, payload, and addresses.

See
http://www-svca.mercuryinteractive.com/pdf/company/newport_load2000.pdf

for some sample companies.
Kellogg Unix Team
Trusted Contributor

Re: How to simulate sending lots of emails

Thanks for the link. It has very useful information.

I am going with Shannon's idea of sending email but dropping at firewall. Since I can't test it on live server, I am setting up a sacrificial-lamb and putting up a rule in firewall to drop the smtp connections coming from this host.

Shannon, if you are reading this, please respond so that I can assign points to you.

...Manjeet
work is fun ! (my manager is standing behind me!!)
Kasper Haitsma
Trusted Contributor
Solution

Re: How to simulate sending lots of emails

Hi Manjeet,

You CAN test on your production server, using another sendmail.cf (cat | sendmail -C my_sendmail.cf someone@somedomain). In this sendmail.cf, you'd specify a relay server (your current sacrificial lamb), and store or forward (even to /dev/null) there, using virtusers/usertables/, what have you. Or you choose a different port for sending in this sendmail.cf, which you drop in the firewall, allowing regular mail traffic (port 25) to continue undisturbed Check out:
'Bat Book' 30.4.1.2 $h and other arguments in A=[IPC] (and maybe: 30.8.38 F=R Use a reserved TCP port) on how to do that.

HTH

Kasper
It depends
Kellogg Unix Team
Trusted Contributor

Re: How to simulate sending lots of emails

Thanks Kasper. I will give it a try.

With some simple tests, I got very favourable results. When I chose few domains, I could send about 60 emails in 5 seconds (comes to about 1 million emails in 24 hrs !!)

Thanks everyone!
work is fun ! (my manager is standing behind me!!)