0

In sendmail logs, I'm seeing events like:

Mar 20 08:36:05 foo sendmail_daemon_foo[1234]: rejecting connections on daemon MTA: load average: 50

Does this mean that the connection was rejected because the current load average on the system was 50? Or does this mean the connection was rejected because the current load average on the system exceeded a sendmail threshold of 50?

I have dual Xeon processors with 8 cores. As far as I know, sendmail throttles connections based on a couple formulas (as per http://www.sendmail.org/m4/tweaking_config.html):

  • By default, messages are queued when load average reaches 8 * number of procs
  • By default messages are rejected when load average reaches 12 * number of procs

I don't have any special configurations so I wouldn't have thought there to be issues unless LA was at least 64.

Thoughts?

Mike B
  • 11,570
  • 42
  • 106
  • 165

2 Answers2

1

As the configuration README states:

  • confQUEUE_LA QueueLA [varies] Load average at which queue-only function kicks in. Default values is (8 * numproc) where numproc is the number of processors online (if that can be determined).

  • confREFUSE_LA RefuseLA [varies] Load average at which incoming SMTP connections are refused. Default values is (12 * numproc) where numproc is the number of processors online (if that can be determined).

It is best to set these values "by hand" in sendmail.mc and see what happens.

adamo
  • 6,867
  • 3
  • 29
  • 58
  • Thanks @adamo. My concern is that I'm not sure what the values should be. Any thoughts? – Mike B Mar 22 '12 at 21:52
  • 1
    `cat /proc/cpuinfo` to determine how many processors the operating system is seeing. Then do the appropriate defines using the multipliers stated in the documentation. Depending the behavior of your system under heavy load you may want to lower them a bit, but you have to experiment. Also, if you experience high loads, you may also want to consider implementing multiple queues. Depending your case you may also consider [this setup](http://serverfault.com/a/349453/25640) – adamo Mar 22 '12 at 22:49
  • ahhh. So CPU cores can actually count as "processors". Makes sense. Thank you. – Mike B Mar 22 '12 at 23:06
  • One more question: with regard to the warning, is 50 the load average it observed at the time? Or is that the threshold sendmail set for itself? – Mike B Mar 22 '12 at 23:08
  • 1
    It is the current (but depends on the LA_TYPE compile-time option), but as the bat book says _"these options rely on the system load average, which can generally be sluggish and can lag behind events."_ – adamo Mar 23 '12 at 11:12
0

Load average is the number of processes waiting to run, if that number gets too high, sendmail refuses to accept more mail (that would increase the load on the machine still furter). Contrary to what users expect, email is not instantaneous, waiting a bit for the peak load to subside is a smart move.

vonbrand
  • 1,153
  • 2
  • 8
  • 16