Professional Web Applications Themes

Help with server load/performance - Linux / Unix Administration

Hi all, I have a Linux system with a legacy web app that I'm in the process of moving to a new system/hosting arrangement. In the meantime I'm trying to keep the current system stable. The load, as measured by 'top' frequenly shoots up to over 10.0 and stays there. The problem seems not to be necessarily web traffic, but multiple sendmail processes (mailqueue runners?) and updatedb. The mailqueue isn't huge, but seems to gradually grow over time. If I kill the sendmail processes and updatedb, the load drops back down to < 1.0. Questions: 1.) How can I configure ...

  1. #1

    Default Help with server load/performance

    Hi all,

    I have a Linux system with a legacy web app that I'm in the process of
    moving to a new system/hosting arrangement. In the meantime I'm trying
    to keep the current system stable.

    The load, as measured by 'top' frequenly shoots up to over 10.0 and
    stays there. The problem seems not to be necessarily web traffic, but
    multiple sendmail processes (mailqueue runners?) and updatedb. The
    mailqueue isn't huge, but seems to gradually grow over time.

    If I kill the sendmail processes and updatedb, the load drops back down
    to < 1.0.

    Questions:

    1.) How can I configure sendmail to use fewer resources? I don't want
    it to spawn new processes if the load is too high.
    2.) From what I've read updatedb is not really a critical function. How
    do I tell it not to run?

    Thanks for any help. Feel free to let me know if you think I'm asking
    the wrong questions.
    Kevin
    Kevin Guest

  2. #2

    Default Re: Help with server load/performance

    On Sat, 12 Nov 2005 13:31:42 -0500, Kevin
    <net> wrote:
     
    Look in /etc/cron.daily. When you find the script that runs updatedb,
    you can delete it or move it to /etc/cron.weekly. You can also edit
    /etc/crontab to change the time of day that the
    cron.(daily|weekly|monthly) scripts are executed.



    --
    'Ooohh.. "FreeBSD is faster over loopback, when compared to Linux
    over the wire". Film at 11.'
    -- Linus Torvalds
    Bill Guest

  3. #3

    Default Re: Help with server load/performance

    Kevin wrote: 

    The options for this are version specific and there are lots of them.
    You should have some docs for your version, if not you can find them at
    http://www.sendmail.org

    The mailqueue is just that: mail *queued* to be sent. Stuff shouldn't
    be there very long under ideal cirstances, we're talking seconds.

    If you have a lot of mail in the queue, you might want to examine the
    contents of some of the d* files to see if your webserver is a spam
    relay... a lot of the mail elements of webservers are misconfigured.

    You can check at http://www.dnsstuff.com to see if you're on an RBL.

    If a piece of outbound email can't be transmitted, it's genreally
    requeued every 30 minutes for up to 5 days.

    If you check the q* files, "grep ^MD q*" you can determine why the
    mail is sitting.

     
    base60 Guest

  4. #4

    Default Re: Help with server load/performance

    Hi, thanks for this pointer Bill.

    Bill Mar wrote: 
    >
    > Look in /etc/cron.daily. When you find the script that runs updatedb,
    > you can delete it or move it to /etc/cron.weekly. You can also edit
    > /etc/crontab to change the time of day that the
    > cron.(daily|weekly|monthly) scripts are executed.
    >
    >
    >[/ref]
    Kevin Guest

  5. #5

    Default Re: Help with server load/performance

    Hi, thanks for the suggestions. On further investigation, it looks like
    it may not be sendmail itself causing the problem, but another script
    called "mailqueuecleaner" that is trying to deal with a directory full
    of messages that never got cleaned out.

    - Kevin

    base60 wrote: 
    >
    >
    > The options for this are version specific and there are lots of them.
    > You should have some docs for your version, if not you can find them at
    > http://www.sendmail.org
    >
    > The mailqueue is just that: mail *queued* to be sent. Stuff shouldn't
    > be there very long under ideal cirstances, we're talking seconds.
    >
    > If you have a lot of mail in the queue, you might want to examine the
    > contents of some of the d* files to see if your webserver is a spam
    > relay... a lot of the mail elements of webservers are misconfigured.
    >
    > You can check at http://www.dnsstuff.com to see if you're on an RBL.
    >
    > If a piece of outbound email can't be transmitted, it's genreally
    > requeued every 30 minutes for up to 5 days.
    >
    > If you check the q* files, "grep ^MD q*" you can determine why the
    > mail is sitting.
    >
    > [/ref]
    Kevin Guest

  6. #6

    Default Re: Help with server load/performance

    Kevin wrote: 

    I can't imagine what a script used to preen an email queue would
    be doing that could chew up a lot of time...

    You probably should find out why the email is there, though.
    base60 Guest

  7. #7

    Default Re: Help with server load/performance

    On Sun, 13 Nov 2005 12:37:49 -0500, Kevin <net> wrote: 

    Hm. That queue should never _need_ cleaining out if sendmail is working
    properly. What is the origin and function of "mailqueuecleaner"?

    Dave Guest

  8. #8

    Default Re: Help with server load/performance

    Kevin wrote: 

    Read through the man page for sendmail to find references to load
    average
    and it will tell you what flag to set in sendmail.cf. But I don't
    think that
    will fix your problem. It will just spread it out over time. The
    scheduled
    sendmail runs will last longer for the same amount of total work.

    I think you need to look at the e-mail traffic that's going through
    your
    system and see if it makes sense. Has someone cracked you and
    started using you to send spam? Is some process sending messages
    with invalid recepient addresses? Is sendmail misconfigured in
    general?
    And as an aside, since you're running both web and sendmail, is your
    system configured as a cache-only BIND server with itself in its
    /etc/resolv.conf to drastically cut DNS traffic and timeouts?

    Go into the mail queue directory and look around. Look at the ages
    of the files. Are they properly expiring after the default two weeks
    or whatever you set it to? Are X* attachment files building up as a
    crust of dead data? Read the dmesg or whereever the logs go to
    see the errors and then read the header portion of messages that
    trigger errors to see what the problem is; it may lead you to just
    plain delete entire messages out of the queue.

    Doug Guest

Similar Threads

  1. Bulk load performance
    By Xiaolei in forum MySQL
    Replies: 3
    Last Post: December 20th, 11:02 AM
  2. Flash media server - high server load
    By ian-stuart in forum Macromedia Flash Flashcom
    Replies: 0
    Last Post: September 3rd, 10:31 PM
  3. SQL Server Performance & ASP
    By Brad in forum ASP Database
    Replies: 4
    Last Post: October 12th, 07:13 AM
  4. Performance tunning in SQL Server 7.0
    By Ebron in forum Microsoft SQL / MS SQL Server
    Replies: 2
    Last Post: July 7th, 07:16 PM
  5. linked server performance
    By DJoe in forum Microsoft SQL / MS SQL Server
    Replies: 1
    Last Post: July 3rd, 02:40 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139