# High Load mysql server

**URL:** <https://www.ruby-forum.com/t/high-load-mysql-server/213274>\
**Category:** NGINX\
**Created:** [October 28, 2011, 3:13pm UTC](https://www.ruby-forum.com/t/high-load-mysql-server/213274 "2011-10-28T15:13:34Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![dubstep](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/cdc98d/32.png) [@dubstep](https://www.ruby-forum.com/u/dubstep)\
**Post date:** [October 28, 2011, 3:13pm UTC](https://www.ruby-forum.com/t/high-load-mysql-server/213274/1 "2011-10-28T15:13:34Z")

</div>

Hello brothers, uncles all the master …🙂

Please help all of you.  
I was again in trouble ya its very high cpu load, but the beginning does  
not problematic, it is good to use nginx now … uh … keep up the cpu  
load specifications for vps  
RAM = 768M  
SWAP = 1567M  
CPU = 2

This config my.cnf

[mysqld]  
#skip-name-resolve  
safe-show-database  
#old\_passwords  
back\_log = 50  
skip-innodb  
max\_connections = 500  
key\_buffer\_size = 1536M  
myisam\_sort\_buffer\_size = 64M  
join\_buffer\_size = 1M  
read\_buffer\_size = 1M  
sort\_buffer\_size = 2M  
table\_cache = 5000  
thread\_cache\_size = 384  
wait\_timeout = 20  
connect\_timeout = 10  
tmp\_table\_size = 64M  
max\_heap\_table\_size = 64M  
max\_allowed\_packet = 64M  
net\_buffer\_length = 16384  
max\_connect\_errors = 100000  
thread\_concurrency = 4  
concurrent\_insert = 2  
table\_lock\_wait\_timeout = 30  
read\_rnd\_buffer\_size = 786432  
bulk\_insert\_buffer\_size = 8M  
query\_cache\_limit = 3M  
query\_cache\_size = 64M  
query\_cache\_type = 1  
query\_prealloc\_size = 262144  
query\_alloc\_block\_size = 65536  
range\_alloc\_block\_size = 4096  
transaction\_alloc\_block\_size = 8192  
transaction\_prealloc\_size = 4096  
default-storage-engine = MyISAM  
max\_write\_lock\_count = 8

[mysqld\_safe]  
nice = -5  
open\_files\_limit = 8192

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

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

for cpu load images like this …  
[http://video.eurekapage.com/files/photos/1319808563e83d46\_o.jpg](http://video.eurekapage.com/files/photos/1319808563e83d46_o.jpg)

Please help the master …

Posted at Nginx Forum:

> **[High Load mysql server](https://forum.nginx.org/read.php?2,217465,217465#msg-217465)**
>
> Hello brothers, uncles all the master ...^\_^ Please help all of you. I was again in trouble ya its very high cpu load, but the beginning does not problematic, it is good to use nginx now .. uh .. keep up the cpu load specifications for vps RAM = 768M...

---

<div class="post-metadata">

**Author:** ![myname](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/e5b9ba/32.png) [@myname](https://www.ruby-forum.com/u/myname)\
**Post date:** [October 28, 2011, 3:21pm UTC](https://www.ruby-forum.com/t/high-load-mysql-server/213274/2 "2011-10-28T15:21:00Z")

</div>

Hello,

> key\_buffer\_size = 1536M

owh. i’d suggest you to try this tool:

> **[MySQLTuner Advanced Report](https://raw.githubusercontent.com/major/MySQLTuner-perl/refs/heads/master/mysqltuner.pl)**

Cheers,

Vladimir

---

<div class="post-metadata">

**Author:** ![myname](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/e5b9ba/32.png) [@myname](https://www.ruby-forum.com/u/myname)\
**Post date:** [October 28, 2011, 7:11pm UTC](https://www.ruby-forum.com/t/high-load-mysql-server/213274/3 "2011-10-28T19:11:40Z")

</div>

## Кирюшкин Владимир Wrote:

> Vladimir

Thx for help, i was run that config but still load my CPU is high..  
this is after installation :

## -------- General Statistics

[–] Skipped version check for MySQLTuner script  
[OK] Currently running supported MySQL version 5.0.77  
[OK] Operating on 64-bit architecture

## -------- Storage Engine Statistics

[–] Status: -Archive +BDB -Federated -InnoDB -ISAM -NDBCluster  
[–] Data in MyISAM tables: 3M (Tables: 6)  
[!!] BDB is enabled but isn’t being used  
[!!] Total fragmented tables: 4

## -------- Security Recommendations

[OK] All database users have passwords assigned

## -------- Performance Metrics

[–] Up for: 4h 9m 43s (5M q [378.161 qps], 1M conn, TX: 15B, RX: 259M)  
[–] Reads / Writes: 85% / 15%  
[–] Total buffers: 1.6G global + 5.0M per thread (500 max threads)  
[!!] Maximum possible memory usage: 4.1G (543% of installed RAM)  
[OK] Slow queries: 0% (0/5M)  
[OK] Highest usage of available connections: 2% (12/500)  
[OK] Key buffer size / total MyISAM indexes: 1.5G/945.0K  
[OK] Key buffer hit rate: 99.8% (419K cached / 1K reads)  
[OK] Query cache efficiency: 33.9% (667K cached / 1M selects)  
[OK] Query cache prunes per day: 0  
[OK] Sorts requiring temporary tables: 0% (0 temp sorts / 346K sorts)  
[OK] Temporary tables created on disk: 0% (23 on disk / 5K total)  
[OK] Thread cache hit rate: 99% (12 created / 1M connections)  
[OK] Table cache hit rate: 39% (37 open / 94 opened)  
[OK] Open file limit used: 0% (59/10K)  
[OK] Table locks acquired immediately: 96% (1M immediate / 1M locks)

## -------- Recommendations

General recommendations:  
Add skip-bdb to MySQL configuration to disable BDB  
Run OPTIMIZE TABLE to defragment tables for better performance  
MySQL started within last 24 hours - recommendations may be  
inaccurate  
Reduce your overall MySQL memory footprint for system stability  
Enable the slow query log to troubleshoot bad queries

So, what i`ve must to do again.?

Posted at Nginx Forum:  
[http://forum.nginx.org/read.php?2,217465,217478#msg-217478](http://forum.nginx.org/read.php?2,217465,217478#msg-217478)

---

<div class="post-metadata">

**Author:** ![myname](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/e5b9ba/32.png) [@myname](https://www.ruby-forum.com/u/myname)\
**Post date:** [October 28, 2011, 7:36pm UTC](https://www.ruby-forum.com/t/high-load-mysql-server/213274/4 "2011-10-28T19:36:23Z")

</div>

Hello,

> So, what i`ve must to do again.?

you should do this:

> General recommendations:  
> Add skip-bdb to MySQL configuration to disable BDB  
> Run OPTIMIZE TABLE to defragment tables for better performance  
> Reduce your overall MySQL memory footprint for system stability  
> Enable the slow query log to troubleshoot bad queries

also you should lower key\_buffer\_size to e.g. 64M (recommendation =  
“Reduce your overall MySQL memory footprint for system stability”)

Cheers,

Vladimir

---

<div class="post-metadata">

**Author:** ![myname](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/e5b9ba/32.png) [@myname](https://www.ruby-forum.com/u/myname)\
**Post date:** [October 28, 2011, 9:17pm UTC](https://www.ruby-forum.com/t/high-load-mysql-server/213274/5 "2011-10-28T21:17:35Z")

</div>

On 28 October 2011 20:11, MyName [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> MySQL started within last 24 hours - recommendations may be  
> inaccurate  
> …  
> So, what i`ve must to do again.?  
> Wait until it can give you reliable recommendations

---

<div class="post-metadata">

**Author:** ![myname](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/e5b9ba/32.png) [@myname](https://www.ruby-forum.com/u/myname)\
**Post date:** [October 29, 2011, 8:00pm UTC](https://www.ruby-forum.com/t/high-load-mysql-server/213274/6 "2011-10-29T20:00:22Z")

</div>

maybe you shoud use some cache server in front of MySQL:)

MyName [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> myisam\_sort\_buffer\_size = 64M  
> net\_buffer\_length = 16384  
> query\_alloc\_block\_size = 65536  
> [mysqldump]  
> [http://video.eurekapage.com/files/photos/1319808563e83d46\_o.jpg](http://video.eurekapage.com/files/photos/1319808563e83d46_o.jpg)
> 
> Please help the master …
> 
> Posted at Nginx Forum:  
> [http://forum.nginx.org/read.php?2,217465,217465#msg-217465](http://forum.nginx.org/read.php?2,217465,217465#msg-217465)
> 
> * * *
> 
> nginx mailing list  
> [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
> [mailman.nginx.org archive](http://mailman.nginx.org/mailman/listinfo/nginx)

–  
Sent from my Android phone with K-9 Mail. Please excuse my brevity.

---

<div class="post-metadata">

**Author:** ![myname](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/e5b9ba/32.png) [@myname](https://www.ruby-forum.com/u/myname)\
**Post date:** [October 29, 2011, 8:04pm UTC](https://www.ruby-forum.com/t/high-load-mysql-server/213274/7 "2011-10-29T20:04:03Z")

</div>

awsome… thx and respect to Thinke365, Nginx U. and Кирюшкин  
Владимир … my cpu`s load is now normal again…

Posted at Nginx Forum:

> **[Re: High Load mysql server](https://forum.nginx.org/read.php?2,217465,217519#msg-217519)**
>
> Hello brothers, uncles all the master ...^\_^ Please help all of you. I was again in trouble ya its very high cpu load, but the beginning does not problematic, it is good to use nginx now .. uh .. keep up the cpu load specifications for vps RAM = 768M...
