# high cpu utilization on solaris

**URL:** <https://forums.percona.com/t/high-cpu-utilization-on-solaris/1172>\
**Category:** Other MySQL® Questions\
**Created:** [May 15, 2009, 9:31am UTC](https://forums.percona.com/t/high-cpu-utilization-on-solaris/1172 "2009-05-15T09:31:34Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![prakashgrp](https://avatars.discourse-cdn.com/v4/letter/p/ee7513/32.png) [@prakashgrp](https://forums.percona.com/u/prakashgrp)\
**Post date:** [May 15, 2009, 9:31am UTC](https://forums.percona.com/t/high-cpu-utilization-on-solaris/1172/1 "2009-05-15T09:31:34Z")

</div>

Hi,

I am new to mysql, basically i am oracle dba,

Greately appreciated if anybody suggest me on below scenerio.

for few queries from php (which i checked it is properly using index) cpu utilization is 98%, and later server becomes hangs.

os : sun solaris 5.9

frontend:php

mysql\> show variables like ‘%version%’;  
±------------------------±-----------------------------+  
| Variable\_name | Value |  
±------------------------±-----------------------------+  
| protocol\_version | 10 |  
| version | 5.0.77-log |  
| version\_comment | MySQL Community Server (GPL) |  
| version\_compile\_machine | sparc |  
| version\_compile\_os | sun-solaris2.9 |  
±------------------------±-----------------------------+  
5 rows in set (0.00 sec)

load averages: 7.82, 7.88, 7.44 12:36:51  
112 processes: 108 sleeping, 1 zombie, 1 stopped, 2 on cpu  
CPU states: 0.0% idle, 97.1% user, 2.9% kernel, 0.0% iowait, 0.0% swap  
Memory: 2048M real, 262M free, 1923M swap in use, 3585M swap free

PID USERNAME THR PRI NICE SIZE RES STATE TIME CPU COMMAND  
12850 mysql 30 59 0 0K 0K cpu/1 117:34 98.81% mysqld  
372 root 6 59 0 4000K 2464K sleep 51:26 0.09% picld  
1619 root 1 59 0 80M 2512K sleep 0:05 0.01% Xsun  
643 root 24 59 0 3784K 2448K sleep 0:18 0.00% nscd  
723 root 1 59 0 2688K 1256K sleep 0:16 0.00% arraymon  
526 root 17 59 0 65M 3584K sleep 0:10 0.00% vxsvc  
586 root 1 59 0 2504K 1448K sleep 0:08 0.00% inetd  
16 root 1 59 0 9192K 4000K sleep 0:02 0.00% vxconfigd  
4344 root 2 49 0 10M 2896K sleep 0:01 0.00% dtsession  
4352 root 1 59 0 7520K 2600K sleep 0:01 0.00% sdtperfmeter  
1401 root 7 59 0 2624K 1912K sleep 0:01 0.00% mibiisa  
1 root 1 59 0 1288K 192K sleep 0:01 0.00% init  
13080 oracle 1 59 0 2264K 1336K cpu/0 0:00 0.00% top  
10332 oracle 1 60 0 0K 0K stop 0:00 0.00% mysql  
5673 root 1 39 10 4400K 1768K sleep 0:00 0.00% dtscreen

mysql\> show variables;  
±--------------------------------±------------------------ ---------------+  
| Variable\_name | Value |  
±--------------------------------±------------------------ ---------------+  
| auto\_increment\_increment | 1 |  
| auto\_increment\_offset | 1 |  
| automatic\_sp\_privileges | ON |  
| back\_log | 50 |  
| basedir | /opt/mysql/mysql/ |  
| binlog\_cache\_size | 32768 |  
| bulk\_insert\_buffer\_size | 8388608 |  
| character\_set\_client | latin1 |  
| character\_set\_connection | latin1 |  
| character\_set\_database | latin1 |  
| character\_set\_filesystem | binary |  
| character\_set\_results | latin1 |  
| character\_set\_server | latin1 |  
| character\_set\_system | utf8 |  
| character\_sets\_dir | /opt/mysql/mysql/share/mysql/charsets/ |  
| collation\_connection | latin1\_swedish\_ci |  
| collation\_database | latin1\_swedish\_ci |  
| collation\_server | latin1\_swedish\_ci |  
| completion\_type | 0 |  
| concurrent\_insert | 1 |  
| connect\_timeout | 10 |  
| datadir | /oratranslog/mysql/ |  
| date\_format | %Y-%m-%d |  
| datetime\_format | %Y-%m-%d %H:%i:%s |  
| default\_week\_format | 0 |  
| delay\_key\_write | ON |  
| delayed\_insert\_limit | 100 |  
| delayed\_insert\_timeout | 300 |  
| delayed\_queue\_size | 1000 |  
| div\_precision\_increment | 4 |  
| keep\_files\_on\_create | OFF |  
| engine\_condition\_pushdown | OFF |  
| expire\_logs\_days | 0 |  
| flush | OFF |  
| flush\_time | 0 |  
| ft\_boolean\_syntax | + -\>\<()~\*:“”&| |  
| ft\_max\_word\_len | 84 |  
| ft\_min\_word\_len | 4 |  
| ft\_query\_expansion\_limit | 20 |  
| ft\_stopword\_file | (built-in) |  
| group\_concat\_max\_len | 1024 |  
| have\_archive | YES |  
| have\_bdb | NO |  
| have\_blackhole\_engine | YES |  
| have\_compress | YES |  
| have\_crypt | YES |  
| have\_csv | YES |  
| have\_dynamic\_loading | YES |  
| have\_example\_engine | NO |  
| have\_federated\_engine | DISABLED |  
| have\_geometry | YES |  
| have\_innodb | YES |  
| have\_isam | NO |  
| have\_merge\_engine | YES |  
| have\_ndbcluster | DISABLED |  
| have\_openssl | DISABLED |  
| have\_ssl | DISABLED |  
| have\_query\_cache | YES |  
| have\_raid | NO |  
| have\_rtree\_keys | YES |  
| have\_symlink | YES |  
| hostname | drportal |  
| init\_connect | |  
| init\_file | |  
| init\_slave | |  
| innodb\_additional\_mem\_pool\_size | 104857600 |  
| innodb\_autoextend\_increment | 8 |  
| innodb\_buffer\_pool\_awe\_mem\_mb | 0 |  
| innodb\_buffer\_pool\_size | 1048576000 |  
| innodb\_checksums | ON |  
| innodb\_commit\_concurrency | 0 |  
| innodb\_concurrency\_tickets | 500 |  
| innodb\_data\_file\_path | ibdata1:2000M;ibdata2:10M:autoextend |  
| innodb\_data\_home\_dir | /oratranslog/mysql/ |  
| innodb\_adaptive\_hash\_index | ON |  
| innodb\_doublewrite | ON |  
| innodb\_fast\_shutdown | 1 |  
| innodb\_file\_io\_threads | 4 |  
| innodb\_file\_per\_table | OFF |  
| innodb\_flush\_log\_at\_trx\_commit | 2 |  
| innodb\_flush\_method | |  
| innodb\_force\_recovery | 0 |  
| innodb\_lock\_wait\_timeout | 50 |  
| innodb\_locks\_unsafe\_for\_binlog | OFF |  
| innodb\_log\_arch\_dir | /oratranslog/mysql/ |  
| innodb\_log\_archive | OFF |  
| innodb\_log\_buffer\_size | 52428800 |  
| innodb\_log\_file\_size | 104857600 |  
| innodb\_log\_files\_in\_group | 2 |  
| innodb\_log\_group\_home\_dir | /oratranslog/mysql/ |  
| innodb\_max\_dirty\_pages\_pct | 90 |  
| innodb\_max\_purge\_lag | 0 |  
| innodb\_mirrored\_log\_groups | 1 |  
| innodb\_open\_files | 300 |  
| innodb\_rollback\_on\_timeout | OFF |  
| innodb\_support\_xa | ON |  
| innodb\_sync\_spin\_loops | 20 |  
| innodb\_table\_locks | ON |  
| innodb\_thread\_concurrency | 501 |  
| innodb\_thread\_sleep\_delay | 10000 |  
| interactive\_timeout | 28800 |  
| join\_buffer\_size | 10485760 |  
| key\_buffer\_size | 402653184 |  
| key\_cache\_age\_threshold | 300 |  
| key\_cache\_block\_size | 1024 |  
| key\_cache\_division\_limit | 100 |  
| language | /opt/mysql/mysql/share/mysql/english/ |  
| large\_files\_support | ON |  
| large\_page\_size | 0 |  
| large\_pages | OFF |  
| lc\_time\_names | en\_US |  
| license | GPL |  
| local\_infile | ON |  
| locked\_in\_memory | OFF |  
| log | OFF |  
| log\_bin | ON |  
| log\_bin\_trust\_function\_creators | OFF |  
| log\_error | |  
| log\_queries\_not\_using\_indexes | OFF |  
| log\_slave\_updates | OFF |  
| log\_slow\_queries | ON |  
| log\_warnings | 1 |  
| long\_query\_time | 10 |  
| low\_priority\_updates | OFF |  
| lower\_case\_file\_system | OFF |  
| lower\_case\_table\_names | 1 |  
| max\_allowed\_packet | 1048576 |  
| max\_binlog\_cache\_size | 18446744073709547520 |  
| max\_binlog\_size | 1073741824 |  
| max\_connect\_errors | 10 |  
| max\_connections | 200 |  
| max\_delayed\_threads | 20 |  
| max\_error\_count | 64 |  
| max\_heap\_table\_size | 67108864 |  
| max\_insert\_delayed\_threads | 20 |  
| max\_join\_size | 18446744073709551615 |  
| max\_length\_for\_sort\_data | 1024 |  
| max\_prepared\_stmt\_count | 16382 |  
| max\_relay\_log\_size | 0 |  
| max\_seeks\_for\_key | 18446744073709551615 |  
| max\_sort\_length | 1024 |  
| max\_sp\_recursion\_depth | 0 |  
| max\_tmp\_tables | 32 |  
| max\_user\_connections | 0 |  
| max\_write\_lock\_count | 18446744073709551615 |  
| multi\_range\_count | 256 |  
| myisam\_data\_pointer\_size | 6 |  
| myisam\_max\_sort\_file\_size | 9223372036853727232 |  
| myisam\_recover\_options | OFF |  
| myisam\_repair\_threads | 1 |  
| myisam\_sort\_buffer\_size | 8388608 |  
| myisam\_stats\_method | nulls\_unequal |  
| ndb\_autoincrement\_prefetch\_sz | 1 |  
| ndb\_force\_send | ON |  
| ndb\_use\_exact\_count | ON |  
| ndb\_use\_transactions | ON |  
| ndb\_cache\_check\_time | 0 |  
| ndb\_connectstring | |  
| net\_buffer\_length | 16384 |  
| net\_read\_timeout | 30 |  
| net\_retry\_count | 10 |  
| net\_write\_timeout | 60 |  
| new | OFF |  
| old\_passwords | OFF |  
| open\_files\_limit | 1234 |  
| optimizer\_prune\_level | 1 |  
| optimizer\_search\_depth | 62 |  
| pid\_file | /oratranslog/mysql/drportal.pid |  
| plugin\_dir | |  
| port | 3306 |  
| preload\_buffer\_size | 32768 |  
| profiling | OFF |  
| profiling\_history\_size | 15 |  
| protocol\_version | 10 |  
| query\_alloc\_block\_size | 8192 |  
| query\_cache\_limit | 1048576 |  
| query\_cache\_min\_res\_unit | 4096 |  
| query\_cache\_size | 52428800 |  
| query\_cache\_type | ON |  
| query\_cache\_wlock\_invalidate | OFF |  
| query\_prealloc\_size | 8192 |  
| range\_alloc\_block\_size | 4096 |  
| read\_buffer\_size | 131072 |  
| read\_only | OFF |  
| read\_rnd\_buffer\_size | 262144 |  
| relay\_log | |  
| relay\_log\_index | |  
| relay\_log\_info\_file | relay-log.info |  
| relay\_log\_purge | ON |  
| relay\_log\_space\_limit | 0 |  
| rpl\_recovery\_rank | 0 |  
| secure\_auth | OFF |  
| secure\_file\_priv | |  
| server\_id | 1 |  
| skip\_external\_locking | ON |  
| skip\_networking | OFF |  
| skip\_show\_database | OFF |  
| slave\_compressed\_protocol | OFF |  
| slave\_load\_tmpdir | /tmp/ |  
| slave\_net\_timeout | 3600 |  
| slave\_skip\_errors | OFF |  
| slave\_transaction\_retries | 10 |  
| slow\_launch\_time | 2 |  
| socket | /tmp/mysql.sock |  
| sort\_buffer\_size | 10485760 |  
| sql\_big\_selects | ON |  
| sql\_mode | |  
| sql\_notes | ON |  
| sql\_warnings | OFF |  
| ssl\_ca | |  
| ssl\_capath | |  
| ssl\_cert | |  
| ssl\_cipher | |  
| ssl\_key | |  
| storage\_engine | InnoDB |  
| sync\_binlog | 0 |  
| sync\_frm | ON |  
| system\_time\_zone | IST |  
| table\_cache | 512 |  
| table\_lock\_wait\_timeout | 50 |  
| table\_type | InnoDB |  
| thread\_cache\_size | 8 |  
| thread\_concurrency | 8 |  
| thread\_stack | 262144 |  
| time\_format | %H:%i:%s |  
| time\_zone | SYSTEM |  
| timed\_mutexes | OFF |  
| tmp\_table\_size | 67108864 |  
| tmpdir | /tmp/ |  
| transaction\_alloc\_block\_size | 8192 |  
| transaction\_prealloc\_size | 4096 |  
| tx\_isolation | REPEATABLE-READ |  
| updatable\_views\_with\_limit | YES |  
| version | 5.0.77-log |  
| version\_comment | MySQL Community Server (GPL) |  
| version\_compile\_machine | sparc |  
| version\_compile\_os | sun-solaris2.9 |  
| wait\_timeout | 28800 |  
±--------------------------------±------------------------ ---------------+

where should i concentrate to tune the mysql.

Thanks in advance.

Prakash GR

---

<div class="post-metadata">

**Author:** ![xaprb](https://avatars.discourse-cdn.com/v4/letter/x/49beb7/32.png) [@xaprb](https://forums.percona.com/u/xaprb)\
**Post date:** [December 25, 2009, 7:13am UTC](https://forums.percona.com/t/high-cpu-utilization-on-solaris/1172/2 "2009-12-25T07:13:55Z")

</div>

There isn’t enough information to help you, and I think you aren’t familiar enough with mysql to know what to ask. You should start with some training, or read the MySQL manual.
