On Tue, 11 Jun 2002, Keith Smith (E-mail) wrote:
> The system: a perl mailing list tool which accepts add/deletes via
> emails (sendmail piped) and then updates the backend database
> accordingly.
>
> The problem: once about 10 or more emails arrive, I begin to get
> performance problems from the Linux box. The drive is on
> continuously, the system is unresponsive, and its difficult to
> determine where the bottleneck is occurring. (eg. a sendmail issue,
> perl code is inefficient, mysql performance issues, system resources,
> etc.). Low volumes (< 10) of email operate flawlessly.
>
> I figured a good way to begin was to instrument the various mysql
> activities to see how long they were taking.... is this a good
> approach? Any advise on different approaches?
First, MySQL part of question:
If you ever suspect, with any MySQL related application that MySQL is
slow, run:
mysqladmin processlist
You should see at least some SQL queries in-process. Run it many times.
Try to see what queries are usually waiting and they show exactly where
you have bottleneck in MySQL.
If there is no running queries then result is clear -> It is not MySQL
topic.
Second, If there is a 10 mails coming in and there is a big and bad
framework behind it, you may overload easily just launching too many
processes to run. I have seen same problem with e-mail system which always
launced procmail to process every mail he got. When 20 mails arrived
simultaneously, system started to suffer. As easy it is. I do not know
your system details but incoming mails+big machinery behind them may be a
bad idea. Try to receive mails as they come (you can't do much against
this) but process already received mails from some queue one by one with
some delay between each query. You can work out some good throttles which
stop processing queries if load goes over some limit or whatever like
this.
Tonu
---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php