# Mysql Performance issue

**URL:** <https://forums.percona.com/t/mysql-performance-issue/1593>\
**Category:** Other MySQL® Questions\
**Created:** [January 19, 2011, 4:58am UTC](https://forums.percona.com/t/mysql-performance-issue/1593 "2011-01-19T04:58:13Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![bharathvn](https://avatars.discourse-cdn.com/v4/letter/b/67e7ee/32.png) [@bharathvn](https://forums.percona.com/u/bharathvn)\
**Post date:** [January 19, 2011, 4:58am UTC](https://forums.percona.com/t/mysql-performance-issue/1593/1 "2011-01-19T04:58:13Z")

</div>

Hi,

Thanks for contribution support.

Am a newbie to MySQL DB, i run a web server using Mysql DB / Apache / PHP. Currently my web server has around 50,000 post.

Past few months MySQL server seem to be using more Memory and very high CPU, also tables are getting fragmented very often.

Some times DB gets hung and it need to be optimized in daily basis.

Here is more detail about my server

My.cnf

[mysqld]  
Datadir=/var/lib/mysql  
socket=/var/lib/mysql/mysql.sock  
user=mysql

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

# clients (those using the mysqlclient10 compatibility package).

old\_passwords=1  
skip-external-locking  
#skip-bdb  
skip-innodb

# Disabling symbolic-links is recommended to prevent assorted security risks;

# to do so, uncomment this line:

# symbolic-links=0

slow\_query\_log=/home/XXX/XXX/log\_slow\_query.txt  
max\_user\_connections = 25  
max\_connections=500  
wait\_timeout=20  
interactive\_timeout=20  
connect\_timeout = 20  
key\_buffer\_size = 256M  
query\_cache\_type=1  
query\_cache\_size = 400M  
query\_cache\_limit = 350M  
tmp\_table\_size = 1500M  
max\_heap\_table\_size = 350M  
thread\_cache\_size = 24  
#open\_tables = 256  
table\_cache = 2000  
sort\_buffer\_size = 2M  
read\_buffer\_size = 2M  
read\_rnd\_buffer\_size = 2M  
thread\_concurrency = 8  
#long\_query\_time=1  
myisam\_sort\_buffer\_size = 64M  
#join\_buffer\_size = 256K

[mysqld\_safe]  
log-error=/var/log/mysqld.log  
pid-file=/var/run/mysqld/mysqld.pid  
open\_files\_limit = 8192

[mysqldump]  
quick  
max\_allowed\_packet=16M

[isamchk]  
key\_buffer=32M  
sort\_buffer=32M  
read\_buffer=16M  
write\_buffer=16M

[myisamchk]  
key\_buffer=32M  
sort\_buffer=32M  
read\_buffer=16M  
write\_buffer=16M

Apache version 2.2.3  
Mysql Version 5.1.54  
Php Version 5.2.17 with eaccelerator  
OS: CentOS 5.5 64 Bit  
Mem: 5G  
CPU: Xeon Quad Core

Any help will be appreciated.

Thanks in Advance.

Bharath

---

<div class="post-metadata">

**Author:** ![gmouse](https://avatars.discourse-cdn.com/v4/letter/g/b9e5f3/32.png) [@gmouse](https://forums.percona.com/u/gmouse)\
**Post date:** [January 20, 2011, 5:22am UTC](https://forums.percona.com/t/mysql-performance-issue/1593/2 "2011-01-20T05:22:27Z")

</div>

More information is required. If there would be a single my.cnf that solves all problems, it would ship with mysql.

---

<div class="post-metadata">

**Author:** ![bharathvn](https://avatars.discourse-cdn.com/v4/letter/b/67e7ee/32.png) [@bharathvn](https://forums.percona.com/u/bharathvn)\
**Post date:** [January 20, 2011, 5:30am UTC](https://forums.percona.com/t/mysql-performance-issue/1593/3 "2011-01-20T05:30:54Z")

</div>

Thanks gmouse

Can i know information required?

---

<div class="post-metadata">

**Author:** ![bharathvn](https://avatars.discourse-cdn.com/v4/letter/b/67e7ee/32.png) [@bharathvn](https://forums.percona.com/u/bharathvn)\
**Post date:** [January 22, 2011, 6:54am UTC](https://forums.percona.com/t/mysql-performance-issue/1593/4 "2011-01-22T06:54:07Z")

</div>

Hi Sterin,

Here is the result of Show status.

Thank You.

---

<div class="post-metadata">

**Author:** ![sterin71](https://avatars.discourse-cdn.com/v4/letter/s/5e9695/32.png) [@sterin71](https://forums.percona.com/u/sterin71)\
**Post date:** [January 22, 2011, 6:59am UTC](https://forums.percona.com/t/mysql-performance-issue/1593/5 "2011-01-22T06:59:54Z")

</div>

Sorry forgot to mention GLOBAL:

SHOW GLOBAL STATUS;
