# Performance Tuning Question

**URL:** https://forums.percona.com/t/performance-tuning-question/738
**Category:** Other MySQL® Questions
**Created:** [April 29, 2008, 7:57pm UTC](https://forums.percona.com/t/performance-tuning-question/738 "2008-04-29T19:57:38Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![tekclubber](https://avatars.discourse-cdn.com/v4/letter/t/c4cdca/32.png) [@tekclubber](https://forums.percona.com/u/tekclubber)
#### Post date: [April 29, 2008, 7:57pm UTC](https://forums.percona.com/t/performance-tuning-question/738/1 "2008-04-29T19:57:38Z")

</div>

Hey Everyone,

I’m pretty much a noob at MySQL and was hoping someone can point me in the right direction as far as tuning a MySQL box. Here’s the specs on the hw/sw:

HP Workstation  
2 Dual Core 1.8 Processors  
2GB RAM (usually only about 500MB used)  
Running Tomcat web app and MySQL 5.0.15-nt

The problem is my CPU load for MySQL is through the roof almost consistently. Unfortunately I’m guessing the queries may be partly to blame but the vendor has yet to optimize them. Most of the time I see 2-3 queries, mainly table scans, and about 100 sleeping connections.

Any help is greatly appreciated. Also, please let me know if you need any further info. Thanks in advance.

Here’s the output from a show status and the my.ini is attached.

Show Status;  
Variable\_name | Value  
----------------------------------±-------------  
Aborted\_clients | 1822  
Aborted\_connects | 2  
Binlog\_cache\_disk\_use | 0  
Binlog\_cache\_use | 0  
Bytes\_received | 423  
Bytes\_sent | 33003  
Com\_admin\_commands | 0  
Com\_alter\_db | 0  
Com\_alter\_table | 0  
Com\_analyze | 0  
Com\_backup\_table | 0  
Com\_begin | 0  
Com\_change\_db | 1  
Com\_change\_master | 0  
Com\_check | 0  
Com\_checksum | 0  
Com\_commit | 0  
Com\_create\_db | 0  
Com\_create\_function | 0  
Com\_create\_index | 0  
Com\_create\_table | 0  
Com\_dealloc\_sql | 0  
Com\_delete | 0  
Com\_delete\_multi | 0  
Com\_do | 0  
Com\_drop\_db | 0  
Com\_drop\_function | 0  
Com\_drop\_index | 0  
Com\_drop\_table | 0  
Com\_drop\_user | 0  
Com\_execute\_sql | 0  
Com\_flush | 0  
Com\_grant | 0  
Com\_ha\_close | 0  
Com\_ha\_open | 0  
Com\_ha\_read | 0  
Com\_help | 0  
Com\_insert | 0  
Com\_insert\_select | 0  
Com\_kill | 0  
Com\_load | 0  
Com\_load\_master\_data | 0  
Com\_load\_master\_table | 0  
Com\_lock\_tables | 0  
Com\_optimize | 0  
Com\_preload\_keys | 0  
Com\_prepare\_sql | 0  
Com\_purge | 0  
Com\_purge\_before\_date | 0  
Com\_rename\_table | 0  
Com\_repair | 0  
Com\_replace | 0  
Com\_replace\_select | 0  
Com\_reset | 0  
Com\_restore\_table | 0  
Com\_revoke | 0  
Com\_revoke\_all | 0  
Com\_rollback | 0  
Com\_savepoint | 0  
Com\_select | 3  
Com\_set\_option | 0  
Com\_show\_binlog\_events | 0  
Com\_show\_binlogs | 0  
Com\_show\_charsets | 0  
Com\_show\_collations | 0  
Com\_show\_column\_types | 0  
Com\_show\_create\_db | 0  
Com\_show\_create\_table | 0  
Com\_show\_databases | 0  
Com\_show\_errors | 0  
Com\_show\_fields | 0  
Com\_show\_grants | 0  
Com\_show\_innodb\_status | 2  
Com\_show\_keys | 0  
Com\_show\_logs | 0  
Com\_show\_master\_status | 0  
Com\_show\_ndb\_status | 0  
Com\_show\_new\_master | 0  
Com\_show\_open\_tables | 0  
Com\_show\_privileges | 0  
Com\_show\_processlist | 0  
Com\_show\_slave\_hosts | 0  
Com\_show\_slave\_status | 0  
Com\_show\_status | 1  
Com\_show\_storage\_engines | 0  
Com\_show\_tables | 0  
Com\_show\_triggers | 0  
Com\_show\_variables | 0  
Com\_show\_warnings | 0  
Com\_slave\_start | 0  
Com\_slave\_stop | 0  
Com\_stmt\_close | 0  
Com\_stmt\_execute | 0  
Com\_stmt\_fetch | 0  
Com\_stmt\_prepare | 0  
Com\_stmt\_reset | 0  
Com\_stmt\_send\_long\_data | 0  
Com\_truncate | 0  
Com\_unlock\_tables | 0  
Com\_update | 0  
Com\_update\_multi | 0  
Com\_xa\_commit | 0  
Com\_xa\_end | 0  
Com\_xa\_prepare | 0  
Com\_xa\_recover | 0  
Com\_xa\_rollback | 0  
Com\_xa\_start | 0  
Connections | 10822  
Created\_tmp\_disk\_tables | 0  
Created\_tmp\_files | 2535  
Created\_tmp\_tables | 2  
Delayed\_errors | 0  
Delayed\_insert\_threads | 0  
Delayed\_writes | 0  
Flush\_commands | 1  
Handler\_commit | 0  
Handler\_delete | 0  
Handler\_discover | 0  
Handler\_prepare | 0  
Handler\_read\_first | 0  
Handler\_read\_key | 0  
Handler\_read\_next | 0  
Handler\_read\_prev | 0  
Handler\_read\_rnd | 0  
Handler\_read\_rnd\_next | 22262  
Handler\_rollback | 0  
Handler\_savepoint | 0  
Handler\_savepoint\_rollback | 0  
Handler\_update | 0  
Handler\_write | 129  
Innodb\_buffer\_pool\_pages\_data | 2619  
Innodb\_buffer\_pool\_pages\_dirty | 0  
Innodb\_buffer\_pool\_pages\_flushed | 20532  
Innodb\_buffer\_pool\_pages\_free | 259  
Innodb\_buffer\_pool\_pages\_latched | 0  
Innodb\_buffer\_pool\_pages\_misc | 130  
Innodb\_buffer\_pool\_pages\_total | 3008  
Innodb\_buffer\_pool\_read\_ahead\_rnd | 3  
Innodb\_buffer\_pool\_read\_ahead\_seq | 24  
Innodb\_buffer\_pool\_read\_requests | 127963082  
Innodb\_buffer\_pool\_reads | 1095  
Innodb\_buffer\_pool\_wait\_free | 0  
Innodb\_buffer\_pool\_write\_requests | 163020  
Innodb\_data\_fsyncs | 57400  
Innodb\_data\_pending\_fsyncs | 0  
Innodb\_data\_pending\_reads | 0  
Innodb\_data\_pending\_writes | 0  
Innodb\_data\_read | 42881024  
Innodb\_data\_reads | 2494  
Innodb\_data\_writes | 63833  
Innodb\_data\_written | 692898304  
Innodb\_dblwr\_pages\_written | 20532  
Innodb\_dblwr\_writes | 13801  
Innodb\_log\_waits | 0  
Innodb\_log\_write\_requests | 10056  
Innodb\_log\_writes | 15805  
Innodb\_os\_log\_fsyncs | 29500  
Innodb\_os\_log\_pending\_fsyncs | 0  
Innodb\_os\_log\_pending\_writes | 0  
Innodb\_os\_log\_written | 13093888  
Innodb\_page\_size | 16384  
Innodb\_pages\_created | 135  
Innodb\_pages\_read | 2484  
Innodb\_pages\_written | 20532  
Innodb\_row\_lock\_current\_waits | 0  
Innodb\_row\_lock\_time | 0  
Innodb\_row\_lock\_time\_avg | 0  
Innodb\_row\_lock\_time\_max | 0  
Innodb\_row\_lock\_waits | 0  
Innodb\_rows\_deleted | 0  
Innodb\_rows\_inserted | 40197  
Innodb\_rows\_read | 49439573  
Innodb\_rows\_updated | 0  
Key\_blocks\_not\_flushed | 0  
Key\_blocks\_unused | 19694  
Key\_blocks\_used | 22484  
Key\_read\_requests | 18055999471  
Key\_reads | 3261754  
Key\_write\_requests | 217955  
Key\_writes | 217846  
Last\_query\_cost | 27224.619117  
Max\_used\_connections | 267  
Not\_flushed\_delayed\_rows | 0  
Open\_files | 63  
Open\_streams | 0  
Open\_tables | 49  
Opened\_tables | 0  
Qcache\_free\_blocks | 0  
Qcache\_free\_memory | 0  
Qcache\_hits | 0  
Qcache\_inserts | 0  
Qcache\_lowmem\_prunes | 0  
Qcache\_not\_cached | 0  
Qcache\_queries\_in\_cache | 0  
Qcache\_total\_blocks | 0  
Questions | 2013427485  
Rpl\_status | NULL  
Select\_full\_join | 0  
Select\_full\_range\_join | 0  
Select\_range | 0  
Select\_range\_check | 0  
Select\_scan | 2  
Slave\_open\_temp\_tables | 0  
Slave\_retried\_transactions | 0  
Slave\_running | OFF  
Slow\_launch\_threads | 0  
Slow\_queries | 0  
Sort\_merge\_passes | 0  
Sort\_range | 0  
Sort\_rows | 0  
Sort\_scan | 1  
Table\_locks\_immediate | 591974709  
Table\_locks\_waited | 79989  
Tc\_log\_max\_pages\_used | 0  
Tc\_log\_page\_size | 0  
Tc\_log\_page\_waits | 0  
Threads\_cached | 7  
Threads\_connected | 101  
Threads\_created | 2057  
Threads\_running | 4  
Uptime | 1411487
