I just moved to a new dedicated server and I'm running into the following issue.

I need to email 8000 of my users using the basic PHP mail function - nothing fancy, it's HTML-formatted but it's just text, no images or other content.

On the previous server, which was a VPS with 1/4 of this server's RAM, I could send the emails 2000 at a time with very little lag on the site as a result.

However, on this server even sending 50 emails gets the CPU usage up to about 40% and lags the entire site considerably. Here is a Putty screenshot, I was wondering if someone has an idea what could be wrong here:

see screenshot here

It's a CentOS/Apache dedicated server, 8GB of RAM, and the CPU is:

Intel® Xeon® E3-1230v2 3.3GHz 8MB Cache Turbo Quad Core /8T

It really doesn't look like it should have a problem with such a simple task, right?

  • Rate limiting at the gateway? If direct sending, slow DNS server reponses? – Sven Jul 19 '13 at 16:43
  • It is strange, on the screenshot I have see that some perl script have used ~40% of cpu and wa is 6,6%, but you have told that you have used a php mail function to send an emails. It's looks like exim use some perl based antispam/antivirus protection system – ALex_hha Jul 20 '13 at 20:58

Is there something in the distribution chain of your mail server ? Is there an new anti-spam, anti-virus ? It can slow down the delivery if there is a lot of mail to be passed. Check in the logs (Postfix ?) to see what demands all this time. Is there a rate limiter too ?

  • Can you tell me how to check these things? I've never had to worry about mail before so I don't know where to start. – Jovan Jul 19 '13 at 16:44
  • What is the mail server in your system ? Postfix ? Exim ? Sendmail ? the logs are usually in /var/log/mail.log – Dom Jul 19 '13 at 16:51
  • It's Exim. There is no mail.log, what I see in /var/log is exim_mainlog. I'm adding some of its contents to the question. – Jovan Jul 19 '13 at 16:59
  • There's also exim_paniclog and exim_rejectlog, and now I see there is a maillog, attributed to cron for some reason. – Jovan Jul 19 '13 at 17:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.