The question you should ask yourself is "What is it that my site may be 
doing that is causing MySQL to spike so much?"

I came into a similar situation and found that there were 2 major things 
that were impacting the usage of the database.

The first would be the database structure that you are using.

The second would be how the site is accessing the database.

Are you making multiple queries off of different tables at the same 
time?  Are you opening connections and not closing them?  Are you asking 
for a lot of information from the DB for EVERY page on your site?  Is there 
information you could simply store in a cookie and not go back to the DB 
for more information every time?

Think of it this way, with 100K impressions per day - with load balanced 
over the entire day is about 71 pages per minute.  Chances are you have 1 
or 2 "Hammer" pages which are just taxing the DB more than it can handle.

We simply changed the DB structure to not include so many tables in each 
query and change the way in which information was polled.

Hope this gets you in the right direction

Eric Lamendola
Slingo Inc.

PS - Logging ** ALWAYS GOOD ** (Just make sure you set up log rotation)




At 04:03 PM 8/13/02 +0100, John Wards wrote:
>Hi,
>
>MySQL is using between 40-60% of the processer and I can't figure out why.
>Has anyone got any handy hints how to start getting this down other than
>telling my users to ef-off. I am getting about 100,000 page imps a day which
>is a fair few but not that much.
>
>I am unsure where to start!
>
>Cheers
>John Wards
>SportNetwork.net
>
>
>---------------------------------------------------------------------
>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


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

Reply via email to