my website was running smoothly on 2.4 Mhz 512Mb RAM server. when i was checking processes using "top" command, mysql was going from 0% - 34% CPU, while it stayed in range 15-35% RAM.
now i moved the same website to a better server - dual 2.4 Mhz, 1GB RAM,... and it works well. but when checking "top" i noticed that mysql is going from 0% - 99% CPU, ram goes up to 1% only.
i asked the admin, why is it going up to 99% when it didnt do that on the first server. he said that he thinks that my code is not written well enough. ok, i dont agree here, because for what it does, dual CPU with 1GB RAM should handle much more than that.
the other thing why i dont agree is the fact that it went up to 34% before and now with 3x more power it goes to 99%. same code, same database. does this make sense?
i have to tell that it stays at 99% for 2-3 seconds but it does that on 10-20 seconds intervals, constantly. the website is working well as i can see.
so what do you suggest? should he fine-tune mysql somehow?