MySQL 99.9% CPU , 1.4%Memory , help ….

Before I jumped into my findings , here I share my problem of my SMS system

  • > 200 request per minutes
  • 20 persistent connection <- I used OJB framework, now it is in the ATTIC
  • 99.9% MySQL CPU
  • 150Kb/s traffic to MySQL
  • I panic
  • MySQL 5.1.35 running on Redhat Linux Release 9 (Shrike)
  • No my.cnf , running on default installation
Since i have no my.cnf, i have to set the SERVER VARIABLES manually each time the mysql instance was restarted. I’ve checked so many websites , in order to improve performance , you are advised to enable query caching, and yes it works.
This is how to do it, since i don’t have my.cnf anywhere in the server
1. create empty my.cnf at /etc/my.cnf . This will overwrite any my.cnf exists in the system (if you run default mysql)
2. Below are the content of my.cnf
will be continued
Advertisement


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.