Hi Chintan,
Some parts of this email are not for you, so please do not take it personaly
> I have a web app on my production server which is running on LAMP. now
> mysql consuming too much of cpu and my website is running extreamly slow.
> when i checked the load-average of cpu it shows me below result.
>
> Load average 36.2, 34.4, 32.6
>
1) CPU cost of mysql query:
Can you please copy-paste following URL in your browser and see if it helps ?
https://www.google.co.in/search?q=mysql+query+cpu+cost&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:en-US:unofficial&client=firefox-a
Natuarrly you have not tried googling which is the fastest and prooven
way of getting information.
I remember some community evengelist (immature one probably ?) saying
"If every user is suggesting to search on Google than whats the use of
this group ? Its their wish i want to search on websites or not ? Is
that Compulsory to search on Google first and then put questions ? If
that so, then please make a guideline that "Please Paste your Link
what you've search on internet and then followed by content"
I am just wondering what their opinion is, for this particular issue.
> Let me know if you need any other detail from my end.
2) If you are not comfirtable sharing data over public mailing list,
probably this problem will catch less attraction. You can sanitize the
data like host-name, ip address, even table name or database name etc
before posting, but performance related parameters are absolutely
required in order to understand the issue. However, if you still do
not want to provide some information, I'd suggest you to ensure that
tables ( especially those on which long running queries are observed)
are properly indexed. Poorly indexed tables are many times cause of
high cpu load.
3) Try using
mysqltuner.pl and post the output here, if you want
further assitance.
https://raw.github.com/rackerhacker/MySQLTuner-perl/master/mysqltuner.pl
--
The production of too many useful things results in too many useless people.
With best regards,
Nehal Dattani