The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Heavy Load with Exim 4.x

Discussion in 'General Discussion' started by esolutions, Mar 16, 2007.

  1. esolutions

    esolutions Member

    Joined:
    Aug 16, 2006
    Messages:
    18
    Likes Received:
    0
    Trophy Points:
    1
    Hi,
    I have a cPanel server running Exim 4.4 and SpamAssassin. Regularly the server will load down so heavily that it becomes unresponsive. We have narrowed the problem down to Exim by looking at the number of running processes (When the server is loading down 1/3 to 1/2 of the total processes will be exim children). Also, when we stop exim for a minute or two the load disappears.
    It doesn't make sense to me because this server processes well under 10,000 messages a day and we have other cPanel systems with the same software that handle close to 20,000 a day with no problems. Does anyone have any ideas about this? Thanks.

    Oh, here's a vmstat printout from the time before the server becomes unresponsive. At this point there were about 80 exim processes out of 220 or so total processes. I can see that its definately I/O bound, but I don't know where to go from there.
    Code:
    procs -----------memory---------- ---swap-- -----io---- --system-- ----cpu----
     r  b   swpd   free   buff  cache   si   so    bi    bo   in    cs us sy id wa
     0 11 432780 617656   2316  35516   12    0  1132   392 1097   181  1  0  0 99
     0 10 432780 615928   2352  36916  124    0  1680   132 1076   195  2  1  6 92
     0 11 432780 623392   2360  36404   40    0   744    68 1078   168  2  1  0 97
     0 12 432780 622560   2424  37360   20    0   980   348 1065   132  1  0  4 95
     0 13 432780 622320   2468  38084   12    0   856   172 1147   202  1  1 10 89
     0 13 432780 622280   2492  38312   40    0   532   892 1133   150  1  1  0 98
     0 13 432780 623528   2524  37688   88    0   516    64 1089   133  1  1  0 99
     0 14 432780 622744   2580  38612   60    0   944    56 1077   126  2  0 26 72
     0 12 432780 622240   2616  38196   64    0   712   236 1091   186  2  1  0 97
     0 12 432780 621656   2684  38352  104    0   940    32 1068   174  2  1  6 91
     0 10 432780 621272   2724  38848   28    0  1096    80 1081   172  1  1  3 95
     1 12 432780 621840   2760  37412  152    0   836   208 1062   184  8  1  5 86
     0 12 432780 624256   2828  37232  152    0   720    64 1084   215  3  3  0 95
     0 12 432780 623592   2924  37072   64    0   460   228 1124   286  5  2  5 87
     0 11 432780 624024   2976  36488   12    0   324   220 1093   162  1  0  8 91
     1 11 432780 624616   2996  35872   76    0   432    44 1122   287 11  5  0 84
     0 10 432776 625640   2820  35424  152    0   616   140 1128   231  7  2  1 91
     2 12 432776 624944   2864  34996  124    0   696    92 1100   204  3  1  0 97
     0 11 432776 621520   2696  33952   96    0   404   268 1148   203  7  2  0 92
     0 12 432776 620584   2796  34604   28    0   752   212 1102   271  3  1  5 91
     0 15 432776 619624   2884  33984   24    0   800    96 1087   202  1  1 12 85
     
  2. cPanelKenneth

    cPanelKenneth cPanel Development
    Staff Member

    Joined:
    Apr 7, 2006
    Messages:
    4,458
    Likes Received:
    22
    Trophy Points:
    38
    cPanel Access Level:
    Root Administrator
    What do the system logs show?
     
  3. HostMerit

    HostMerit Well-Known Member

    Joined:
    Oct 24, 2004
    Messages:
    160
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    New Jersey, USA
    cPanel Access Level:
    DataCenter Provider
    Probably a lot of disk usage in /var/spool/exim and around 100 or so exim processes. Exim is a bad MTA choice, qmail would be a better alternative, which could handle mail services better and load better but I have yet to find a way to find out how to use this.

    Maybe CPanel could add a choice like Pure/ProFTPd ;)
     
  4. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    As cpanelkenneth says, you need to check your /var/log/exim_mainlog and see what is going on. Simple things that can affect performance:

    1. Make sure you're performing local DNS lookups (/etc/resolv.conf) rather than relying on slower lookups from a remote resolver

    2. Make sure domains are using :fail: and not :blackhole: or /dev/null in their aliases /etc/valiases/* (and that :fail: is typed correctly in full)

    3. Make sure the wildcard (Default Address) catchall in /etc/valiases/* is set to :fail: and that users setup Forwards for accounts that they use instead

    4. Use a dictionary attack ACL:
    http://www.configserver.com/free/eximdeny.html

    5. Ensure that if you use any custom exim modifications (Exim Configuration Editor) that you do not use the delay function as that can cause severe problems

    These can dramatically reduce the load exim puts on a server.
     
  5. esolutions

    esolutions Member

    Joined:
    Aug 16, 2006
    Messages:
    18
    Likes Received:
    0
    Trophy Points:
    1
    Thanks for the responses. I have stopped exim during the periods of high load and confirmed that it is causing the problem. I believe the problem is related to Spam Assassin so I have disabled bayes for the time being.

    I could not find anything strange in the logs; like I said, its not processing an unreasonable amount of mail. I did find that spam assassin was taking as long as a minute to identify spam email and that's what led me to disable bayes.

    I realize that Exim might not be the best MTA but researching an implementing a new one alongside cPanel on a production server is a bit over my head at this point. :-\

    The server is using a remote resolver, but so are my other servers. I'm sorry I keep clinging to that, but it doesn't make sense to me that the others would perform so much better with a very similar setup. Any more thoughts??
     
  6. hostserve

    hostserve Well-Known Member

    Joined:
    Aug 25, 2006
    Messages:
    51
    Likes Received:
    0
    Trophy Points:
    6
    Chirpy,

    Can you please elaborate on this statement:

    1. Make sure you're performing local DNS lookups (/etc/resolv.conf) rather than relying on slower lookups from a remote resolver

    When you mean local, do you mean within the same physical network or netblock or do you mean locally on the same server?
     
  7. ToddShipway

    ToddShipway Well-Known Member

    Joined:
    Nov 13, 2006
    Messages:
    300
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Houston, TX
    Locally could be local network or local server, depending on how it's configured. If your using resolvers on a remote network, then you will have to take the network connection, congestion and traffic into the equation. When using a remote server, be sure it's on a reliable network connection.
     
Loading...

Share This Page