Help with server load/performance - Unix

This is a discussion on Help with server load/performance - Unix ; 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 ...

+ Reply to Thread
Results 1 to 7 of 7

Thread: Help with server load/performance

  1. 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

  2. Re: Help with server load/performance

    Kevin wrote:
    > 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.


    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 circumstances, 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.


    > 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


  3. Re: Help with server load/performance

    Hi, thanks for this pointer Bill.

    Bill Marcum wrote:
    > On Sat, 12 Nov 2005 13:31:42 -0500, Kevin
    > wrote:
    >
    >
    >>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?
    >>

    >
    > 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.
    >
    >
    >


  4. 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:
    > Kevin wrote:
    >
    >> 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.

    >
    >
    > 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 circumstances, 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.
    >
    >
    >> 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


  5. Re: Help with server load/performance

    Kevin wrote:
    > 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.


    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.

  6. Re: Help with server load/performance

    On Sun, 13 Nov 2005 12:37:49 -0500, Kevin wrote:
    > 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.


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


  7. Re: Help with server load/performance

    Kevin wrote:
    >
    > 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.


    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.


+ Reply to Thread