DaemonForums  

Go Back   DaemonForums > FreeBSD > FreeBSD General

FreeBSD General Other questions regarding FreeBSD which do not fit in any of the categories below.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 16th May 2008
bdj bdj is offline
New User
 
Join Date: May 2008
Posts: 4
Thanked 0 Times in 0 Posts
Default mysql using >100% cpu

I'm running freebsd 6.1, mysql 5
dual core 2,33 ghz 4mb cache, 2gb RAM

For some reason mysql is using more than 100% cpu, how can something use more than 100%?

Here's a TOP print:

Code:
last pid: 12809;  load averages:  6.90,  5.38,  4.96                                    up 37+04:21:30  22:26:20
199 processes: 6 running, 193 sleeping
CPU states: 32.5% user,  0.0% nice, 67.1% system,  0.4% interrupt,  0.0% idle
Mem: 752M Active, 332M Inact, 247M Wired, 69M Cache, 112M Buf, 600M Free
Swap: 4068M Total, 4068M Free

  PID USERNAME   THR PRI NICE   SIZE    RES STATE  C   TIME    CPU COMMAND
12483 mysql       69  20    0   453M 84336K kserel 0  23:25 136.67% mysqld
12803 apache       1  20    0 36968K 30544K lockf  1   0:00  0.73% httpd
12741 apache       1  20    0 35808K 29352K lockf  1   0:00  0.39% httpd
  763 root         1   8    0   852K   280K nanslp 0   0:58  0.00% da-popb4smtp
  529 root         1  96    0  3640K  2088K select 1   0:38  0.00% sshd
94077 apache       1   4    0 37572K 30908K sbwait 1   0:30  0.00% httpd
95011 apache       1   4    0 37488K 30824K sbwait 0   0:29  0.00% httpd
93265 apache       1   4    0 37408K 30732K sbwait 0   0:29  0.00% httpd
96241 apache       1   4    0 37432K 30784K sbwait 0   0:28  0.00% httpd
94275 apache       1   4    0 37624K 30976K sbwait 1   0:28  0.00% httpd
94091 apache       1   4    0 37536K 30872K sbwait 0   0:28  0.00% httpd
94365 apache       1   4    0 37380K 30736K sbwait 1   0:28  0.00% httpd
94963 apache       1   4    0 37476K 30812K sbwait 0   0:28  0.00% httpd
95010 apache       1   4    0 37504K 30860K sbwait 1   0:28  0.00% htt
Reply With Quote
  #2   (View Single Post)  
Old 16th May 2008
vermaden's Avatar
vermaden vermaden is offline
Administrator
 
Join Date: Apr 2008
Location: pl_PL.lodz
Posts: 1,051
Thanked 118 Times in 93 Posts
Default

100% - one core
200% - 100% of each core = 200%
__________________
religions, worst damnation of mankind
"If 386BSD had been available when I started on Linux, Linux would probably never had happened." Linus Torvalds

Linux is not UNIX! Face it! It is not an insult. It is fact: GNU is a recursive acronym for “GNU's Not UNIX”.
vermaden's: links resources deviantart spreadbsd
Reply With Quote
  #3   (View Single Post)  
Old 16th May 2008
bdj bdj is offline
New User
 
Join Date: May 2008
Posts: 4
Thanked 0 Times in 0 Posts
Default

Thanks for the reply,

Do you think that 130% - 140% is no problem ? The average load is only max 6,9
Reply With Quote
  #4   (View Single Post)  
Old 16th May 2008
18Googol2's Avatar
18Googol2 18Googol2 is offline
Real Name: whoami
Spam Deminer
 
Join Date: Apr 2008
Location: pwd
Posts: 283
Thanked 20 Times in 18 Posts
Default

I think its serious issue. If its not mission critical machine, restart mysql and see how it goes
__________________
The power of plain text? It can control an entire OS
Reply With Quote
  #5   (View Single Post)  
Old 16th May 2008
bdj bdj is offline
New User
 
Join Date: May 2008
Posts: 4
Thanked 0 Times in 0 Posts
Default

the amount of cpu rises and drops depending on the amount of connected threads, if I restart mysql, the script which causes all the cpu will start connecting again and create load.
Reply With Quote
  #6   (View Single Post)  
Old 16th May 2008
bdj bdj is offline
New User
 
Join Date: May 2008
Posts: 4
Thanked 0 Times in 0 Posts
Default

I flushed the entire database and now all cpu usage is gone. I have to contact the scripter because this script is not very cpu friendly.

thanks for the replies.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
MySql on NetBSD 5.0 Zvrk NetBSD General 6 17th August 2009 12:31 PM
OpenLDAP and MySQL PatrickBaer FreeBSD General 1 4th November 2008 04:44 PM
MYSQL 's fault? disappearedng FreeBSD General 3 14th October 2008 11:53 PM
MYSQL HOW TO START disappearedng FreeBSD General 7 18th September 2008 09:48 AM


All times are GMT. The time now is 11:46 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick