Jump to content

[SOLVED] Help with my.cnf , and/or any tips to reduce CPU usage (90%) =(


saintseiya

Recommended Posts

Im running a virtual game that reads and writes from a database. Since the writes are a lot on some of the tables, i changed their type to InnoDB, but the others are still the default type (MyIsam?).

 

Anyway my problem is that the mysql seems to be using way too much CPU (90%) and im running dual core 3GHZ each.

 

Memory is fine (3% and under).

 

I was wondering if there is something obvious im doing wrong. I turned on slow query logging a few minutes ago to see if i can get some insights from it but if anyone can advice id greatly appreciate it.

 

Thanks.

 

my.cnf:

[mysqld]

datadir=/var/lib/mysql

socket=/var/lib/mysql/mysql.sock

# Default to using old password format for compatibility with mysql 3.x

# clients (those using the mysqlclient10 compatibility package).

old_passwords=1

 

[mysql.server]

user=mysql

basedir=/var/lib

 

[mysqld_safe]

err-log=/var/log/mysqld.log

pid-file=/var/run/mysqld/mysqld.pid

 

log-slow-queries = /var/log/mysql-slow.log

long_query_time = 2

 

Link to comment
Share on other sites

Just so everybody who didnt know like me... before i saw crazy loads and got freaked out... make sure you optimize ALL your tables, one badly optimized table can kill your system no matter how good it is hah.

 

Sorry for this question, i feel really dumb now that i know what the problem was. Took down load from 2.00 to 0.04. I feel good now. :P Good but dumb.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.