![]() |
Why is my mysql such a cpu hog???
I have a box running agsql and ePowerTrader and my mysql is taking up like 97% of my cpu...
I have a friend with a very similar setup and about the same amount of traffic and he's only doing 4-5% Why is this box so pegged? |
switch to AGPRO sooo much better and quicker, EpowerTrader wasnt coded for efficiency
|
MySQL is considered a very fast (effecient) database, if programmed correctly. The problem is the program that's using it.
|
You need to configure MySQL for the applications that you're running.
Do a search on my.cnf (the config file) and then make some changes. It can do wonders for the stability and speed of your database server. Also, memory is very important to MySQL. |
One more thing - you can turn on slow query logging in MySQL and see which queries are taking the longest to execute. From that you can often figure out what some of the problems might be and try to optimize the lame queries.
|
FUCK! Now I gotta go learn shit....aaaargh...
|
-=HOAX=-
I am not sure how technical you are but if you have a friend that is using the same software and their database is only using 5% CPU ... that would lead me to believe one of two things (or both) 1. You have a lot more data ... and need to index your database tables. and 2. You need to index your database tables. Indexing alone can change query speed to 90%. Hope this helps |
cause looking for a string in MySQL takes an instance, and looking for a string in a text file may take a while. It's a technology designed for immediate response at any cost.
|
-=HOAX=-,
MySQL is a very fast database. Sounds like one of two things is happening. Either your tables are not indexed properly for the queries you are running on them, or your system is running low on free memory causing MySQL to start swapping to disk which will *greatly* slow it down and cause a sort of thrashing symptom. If you'd like, I can take a look at your system for you if you want to get in touch with me and give me a (non-root) login. My day job is a supercomputer sysadmin, so stuff like this is usually a piece of cake! -skazzel |
ICQ#126813938
I'll let you pee on Kman...hook me up... |
Quote:
|
Again, you should not try to reindex mysql queries by yourself especially considering that you stated that you dont have large knowledge of mysql Indexing will make your tables bigger and will actually slow down insert and update queries. So proceed with caution :)
|
Quote:
This would be your best bet if you want to continue using the same program. 90% of people dont play around with mysql config and just do default instillation. Proparly configuring mysql can reduce system resources by upto 30% depending on what mysql is doing. Some additional stuff you shoudl consider Memory as mentioned shoudl be number one. Additional switchign to a better harddrive preferably scsi well http://wdvl.internet.com/Authoring/D...timize2_1.html is a decent tutorial that should get you started, message me if your interested in book recomendations etc. |
Sometimes my boxes are doing 800 queries AVG per second.
Then both of my cpu's are at 70-80% but never over 90% Your problem might be a fucked up index somewhere, try to optimize your tables. using the optimize tables command :) B. |
Remove ePower, the problem will go away.
It doesn't drop MySQL connections. |
| All times are GMT -7. The time now is 11:44 AM. |
Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2026, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123