Hi I run a website where at any given time there are up to 180 people viewing a new page every 10 seconds. Everything is super fast. Oh wait, except today! Today I have about 100 people surfing, and MySQL keeps spiking.. up to 78% CPU. I have dual core dual processors, so it's not crashing the server. I'm using mytop and watching the queries, and it seems to be nothing unusual. Nothing in the slow query logs. Where do I go from here? It makes no sense why it's using so much CPU when it's showing no active processes... Thanks!
Could be due to a possible DDOS attack, spammer/hacker, or PHP overload; try rebooting your server and see if it helps.
Another thing to suggest is to watch the process list. See if theirs a couple queries that are taking too long, if so explain them, see what the problem is and try to speed them up. It may also be a problem with your locking, if certain queries are taking a long time and locking a table, then other queries are getting locked while waiting for that one, that might have an affect on your performance, which would get worse as you add users. Hrmm, should have read more before I started writing. Didn't notice you were using mytop. So how is the performance of the website? Aside from the high CPU util. is it actually affecting the performance of the site? Is it running sluggish? When it's running at 78% cpu their are no processes running on the server? If so then I would check the log files for connections to the server, see if you're getting an usual number of tcp-ip connections. Could be someone DOSing you as suggested, or trying to brute force their way in possibly.