Linux Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsOperating SystemsLinux Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old June 8th, 2012, 08:46 AM
alexo alexo is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2006
Posts: 144 alexo User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 Day 3 h 44 m 50 sec
Reputation Power: 7
Send a message via ICQ to alexo
How-to determine the number of physical CPUs

Hi

Few days ago i had problems with one of my sites, which use too much CPU.
Typing "TOP" i got that mysqld use 200-400 %CPU.

As i cann't find the real reason, i move it to another host - where it work well without any problem.

Now, when on previous host everying is well i check that mysql %CPU is fine, but TIME+ digits usually are very high - like in this example.

Can anybody explain what this mean "137:31.72"

PHP Code:
 PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
 8927 apache    20   0 36228  14m 5016 S  4.7  0.7   0
:11.32 httpd
 1771 mysql     20   0 53172  31m 4340 S  0.7  1.5 137
:31.72 mysqld 


Also, as i understand on previous host there are 4 processores, and 2 cores

grep "core id" /proc/cpuinfo


PHP Code:
[root@www ~]# grep "core id" /proc/cpuinfo
core id         0
core id         
0
core id         
1
core id         



but cann't understand how many cores are on new host (with 8 processors)

PHP Code:
[root@host ~]# cat /proc/cpuinfo
processor       0
vendor_id       
GenuineIntel
cpu family      
6
model           
23
model name      
Intel(RXeon(RCPU           L5420  2.50GHz
stepping        
10
cpu MHz         
2499.994
cache size      
6144 KB
fdiv_bug        
no
hlt_bug         
no
f00f_bug        
no
coma_bug        
no
fpu             
yes
fpu_exception   
yes
cpuid level     
13
wp              
yes
flags           
fpu tsc msr pae cx8 apic cmov pat clflush acpi mmx fxsr sse sse2 ss ht nx constant_tsc pni vmx est ssse3 sse4_1
bogomips        
6258.29

processor       
1
vendor_id       
GenuineIntel
cpu family      
6
model           
23
model name      
Intel(RXeon(RCPU           L5420  2.50GHz
stepping        
10
cpu MHz         
2499.994
cache size      
6144 KB
fdiv_bug        
no
hlt_bug         
no
f00f_bug        
no
coma_bug        
no
fpu             
yes
fpu_exception   
yes
cpuid level     
13
wp              
yes
flags           
fpu tsc msr pae cx8 apic cmov pat clflush acpi mmx fxsr sse sse2 ss ht nx constant_tsc up pni vmx est ssse3 sse4_1
bogomips        
6258.29

processor       
2
vendor_id       
GenuineIntel
cpu family      
6
model           
23
model name      
Intel(RXeon(RCPU           L5420  2.50GHz
stepping        
10
cpu MHz         
2499.994
cache size      
6144 KB
fdiv_bug        
no
hlt_bug         
no
f00f_bug        
no
coma_bug        
no
fpu             
yes
fpu_exception   
yes
cpuid level     
13
wp              
yes
flags           
fpu tsc msr pae cx8 apic cmov pat clflush acpi mmx fxsr sse sse2 ss ht nx constant_tsc up pni vmx est ssse3 sse4_1
bogomips        
6258.29

processor       
3
vendor_id       
GenuineIntel
cpu family      
6
model           
23
model name      
Intel(RXeon(RCPU           L5420  2.50GHz
stepping        
10
cpu MHz         
2499.994
cache size      
6144 KB
fdiv_bug        
no
hlt_bug         
no
f00f_bug        
no
coma_bug        
no
fpu             
yes
fpu_exception   
yes
cpuid level     
13
wp              
yes
flags           
fpu tsc msr pae cx8 apic cmov pat clflush acpi mmx fxsr sse sse2 ss ht nx constant_tsc up pni vmx est ssse3 sse4_1
bogomips        
6258.29

processor       
4
vendor_id       
GenuineIntel
cpu family      
6
model           
23
model name      
Intel(RXeon(RCPU           L5420  2.50GHz
stepping        
10
cpu MHz         
2499.994
cache size      
6144 KB
fdiv_bug        
no
hlt_bug         
no
f00f_bug        
no
coma_bug        
no
fpu             
yes
fpu_exception   
yes
cpuid level     
13
wp              
yes
flags           
fpu tsc msr pae cx8 apic cmov pat clflush acpi mmx fxsr sse sse2 ss ht nx constant_tsc up pni vmx est ssse3 sse4_1
bogomips        
6258.29

processor       
5
vendor_id       
GenuineIntel
cpu family      
6
model           
23
model name      
Intel(RXeon(RCPU           L5420  2.50GHz
stepping        
10
cpu MHz         
2499.994
cache size      
6144 KB
fdiv_bug        
no
hlt_bug         
no
f00f_bug        
no
coma_bug        
no
fpu             
yes
fpu_exception   
yes
cpuid level     
13
wp              
yes
flags           
fpu tsc msr pae cx8 apic cmov pat clflush acpi mmx fxsr sse sse2 ss ht nx constant_tsc up pni vmx est ssse3 sse4_1
bogomips        
6258.29

processor       
6
vendor_id       
GenuineIntel
cpu family      
6
model           
23
model name      
Intel(RXeon(RCPU           L5420  2.50GHz
stepping        
10
cpu MHz         
2499.994
cache size      
6144 KB
fdiv_bug        
no
hlt_bug         
no
f00f_bug        
no
coma_bug        
no
fpu             
yes
fpu_exception   
yes
cpuid level     
13
wp              
yes
flags           
fpu tsc msr pae cx8 apic cmov pat clflush acpi mmx fxsr sse sse2 ss ht nx constant_tsc up pni vmx est ssse3 sse4_1
bogomips        
6258.29

processor       
7
vendor_id       
GenuineIntel
cpu family      
6
model           
23
model name      
Intel(RXeon(RCPU           L5420  2.50GHz
stepping        
10
cpu MHz         
2499.994
cache size      
6144 KB
fdiv_bug        
no
hlt_bug         
no
f00f_bug        
no
coma_bug        
no
fpu             
yes
fpu_exception   
yes
cpuid level     
13
wp              
yes
flags           
fpu tsc msr pae cx8 apic cmov pat clflush acpi mmx fxsr sse sse2 ss ht nx constant_tsc up pni vmx est ssse3 sse4_1
bogomips        
6258.29 


As this command don't work on that host

PHP Code:
[root@host ~]# grep "core id" /proc/cpuinfo
[root@host ~]


thank you
__________________
Your Health Encyclopedia :: Recurrent Depression
Medical and health consumer information resources containing comprehensive and unbiased information in patient-friendly language

Reply With Quote
  #2  
Old June 8th, 2012, 03:38 PM
E-Oreo's Avatar
E-Oreo E-Oreo is offline
Lost in code
Click here for more information.
 
Join Date: Dec 2004
Posts: 7,947 E-Oreo User rank is General 91st Grade (Above 100000 Reputation Level)E-Oreo User rank is General 91st Grade (Above 100000 Reputation Level)E-Oreo User rank is General 91st Grade (Above 100000 Reputation Level)E-Oreo User rank is General 91st Grade (Above 100000 Reputation Level)E-Oreo User rank is General 91st Grade (Above 100000 Reputation Level)E-Oreo User rank is General 91st Grade (Above 100000 Reputation Level)E-Oreo User rank is General 91st Grade (Above 100000 Reputation Level)E-Oreo User rank is General 91st Grade (Above 100000 Reputation Level)E-Oreo User rank is General 91st Grade (Above 100000 Reputation Level)E-Oreo User rank is General 91st Grade (Above 100000 Reputation Level)E-Oreo User rank is General 91st Grade (Above 100000 Reputation Level)E-Oreo User rank is General 91st Grade (Above 100000 Reputation Level)E-Oreo User rank is General 91st Grade (Above 100000 Reputation Level)E-Oreo User rank is General 91st Grade (Above 100000 Reputation Level)E-Oreo User rank is General 91st Grade (Above 100000 Reputation Level)E-Oreo User rank is General 91st Grade (Above 100000 Reputation Level)  Folding Points: 945 Folding Title: Novice Folder
Time spent in forums: 2 Months 10 h 55 m 23 sec
Reputation Power: 7053
Quote:
Also, as i understand on previous host there are 4 processores, and 2 cores

It's not physically possible to have fewer cores than processors. It's hard to tell from just seeing the "core id" lines, but my guess is that your old host was a single processor system with 2 physical cores with hyper-threading.

The L5420 is a 4 core processor without hyper-threading, so it looks like your new host is a dual processor system with a total of 8 physical cores.

Quote:
Can anybody explain what this mean "137:31.72"

It means the process has spent 137 minutes and 31.72 seconds of the processor's time. If the processor has 2 cores, then for every 1 minute of real time the processor has 2 minutes of processor time available.
__________________
PHP FAQ
How to program a basic, secure login system using PHP
Connect with me on LinkedIn


Quote:
Originally Posted by Spad
Ah USB, the only rectangular connector where you have to make 3 attempts before you get it the right way around

Reply With Quote
  #3  
Old June 8th, 2012, 04:56 PM
alexo alexo is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2006
Posts: 144 alexo User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 Day 3 h 44 m 50 sec
Reputation Power: 7
Send a message via ICQ to alexo
Quote:
Originally Posted by E-Oreo
It's not physically possible to have fewer cores than processors. It's hard to tell from just seeing the "core id" lines, but my guess is that your old host was a single processor system with 2 physical cores with hyper-threading.


Here are outputs of few commands that i know - > OLD HOST

PHP Code:
 grep 'cpu cores' /proc/cpuinfo
cpu cores       
2
cpu cores       
2
cpu cores       
2
cpu cores       



PHP Code:
 grep CPU /proc/cpuinfo
model name      
Intel(RXeon(RCPU            5150  2.66GHz
model name      
Intel(RXeon(RCPU            5150  2.66GHz
model name      
Intel(RXeon(RCPU            5150  2.66GHz
model name      
Intel(RXeon(RCPU            5150  2.66GHz 


PHP Code:
 grep processor /proc/cpuinfo
processor       
0
processor       
1
processor       
2
processor       



PHP Code:
 grep coreid /proc/cpuinfo grep -0$ | grep ^0$ >> /dev/null && grep -c processor /proc/cpuinfo || grep coreid /proc/cpuinfo grep -0$



PHP Code:
 grep -c processor /proc/cpuinfo



PHP Code:
 cat /proc/cpuinfo
processor       
0
vendor_id       
GenuineIntel
cpu family      
6
model           
15
model name      
Intel(RXeon(RCPU            5150  2.66GHz
stepping        
6
cpu MHz         
2666.664
cache size      
4096 KB
physical id     
0
siblings        
2
core id         
0
cpu cores       
2
apicid          
0
initial apicid  
0
fpu             
yes
fpu_exception   
yes
cpuid level     
10
wp              
yes
flags           
fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall lm constant_tsc arch_perfmon pebs bts rep_good aperfmperf pni dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm dca lahf_lm dts tpr_shadow
bogomips        
5319.54
clflush size    
64
cache_alignment 
64
address sizes   
36 bits physical48 bits virtual
power management
:

processor       1
vendor_id       
GenuineIntel
cpu family      
6
model           
15
model name      
Intel(RXeon(RCPU            5150  2.66GHz
stepping        
6
cpu MHz         
2666.664
cache size      
4096 KB
physical id     
3
siblings        
2
core id         
0
cpu cores       
2
apicid          
6
initial apicid  
6
fpu             
yes
fpu_exception   
yes
cpuid level     
10
wp              
yes
flags           
fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall lm constant_tsc arch_perfmon pebs bts rep_good aperfmperf pni dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm dca lahf_lm dts tpr_shadow
bogomips        
5320.05
clflush size    
64
cache_alignment 
64
address sizes   
36 bits physical48 bits virtual
power management
:

processor       2
vendor_id       
GenuineIntel
cpu family      
6
model           
15
model name      
Intel(RXeon(RCPU            5150  2.66GHz
stepping        
6
cpu MHz         
2666.664
cache size      
4096 KB
physical id     
0
siblings        
2
core id         
1
cpu cores       
2
apicid          
1
initial apicid  
1
fpu             
yes
fpu_exception   
yes
cpuid level     
10
wp              
yes
flags           
fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall lm constant_tsc arch_perfmon pebs bts rep_good aperfmperf pni dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm dca lahf_lm dts tpr_shadow
bogomips        
5320.03
clflush size    
64
cache_alignment 
64
address sizes   
36 bits physical48 bits virtual
power management
:

processor       3
vendor_id       
GenuineIntel
cpu family      
6
model           
15
model name      
Intel(RXeon(RCPU            5150  2.66GHz
stepping        
6
cpu MHz         
2666.664
cache size      
4096 KB
physical id     
3
siblings        
2
core id         
1
cpu cores       
2
apicid          
7
initial apicid  
7
fpu             
yes
fpu_exception   
yes
cpuid level     
10
wp              
yes
flags           
fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall lm constant_tsc arch_perfmon pebs bts rep_good aperfmperf pni dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm dca lahf_lm dts tpr_shadow
bogomips        
5320.03
clflush size    
64
cache_alignment 
64
address sizes   
36 bits physical48 bits virtual
power management





Quote:
Originally Posted by E-Oreo
It means the process has spent 137 minutes and 31.72 seconds of the processor's time. If the processor has 2 cores, then for every 1 minute of real time the processor has 2 minutes of processor time available.


Is it normal to be so high ? For example just now it's 147:01.69 mysqld. It's calculated starting last restart or for any period of time.

Thank you very much

Reply With Quote
  #4  
Old June 13th, 2012, 06:05 PM
Lux Perpetua Lux Perpetua is offline
Contributing User
Dev Shed Intermediate (1500 - 1999 posts)
 
Join Date: Feb 2004
Location: San Francisco Bay
Posts: 1,936 Lux Perpetua User rank is General 5th Grade (Above 100000 Reputation Level)Lux Perpetua User rank is General 5th Grade (Above 100000 Reputation Level)Lux Perpetua User rank is General 5th Grade (Above 100000 Reputation Level)Lux Perpetua User rank is General 5th Grade (Above 100000 Reputation Level)Lux Perpetua User rank is General 5th Grade (Above 100000 Reputation Level)Lux Perpetua User rank is General 5th Grade (Above 100000 Reputation Level)Lux Perpetua User rank is General 5th Grade (Above 100000 Reputation Level)Lux Perpetua User rank is General 5th Grade (Above 100000 Reputation Level)Lux Perpetua User rank is General 5th Grade (Above 100000 Reputation Level)Lux Perpetua User rank is General 5th Grade (Above 100000 Reputation Level)Lux Perpetua User rank is General 5th Grade (Above 100000 Reputation Level)Lux Perpetua User rank is General 5th Grade (Above 100000 Reputation Level)Lux Perpetua User rank is General 5th Grade (Above 100000 Reputation Level)Lux Perpetua User rank is General 5th Grade (Above 100000 Reputation Level)Lux Perpetua User rank is General 5th Grade (Above 100000 Reputation Level)Lux Perpetua User rank is General 5th Grade (Above 100000 Reputation Level) 
Time spent in forums: 1 Month 1 Week 2 h 12 m 42 sec
Reputation Power: 1312
Quote:
Originally Posted by alexo
Is it normal to be so high ? For example just now it's 147:01.69 mysqld. It's calculated starting last restart or for any period of time.
I don't understand your last sentence. The time value is per-process, so if you were to kill mysqld and restart it, the time would restart from 0:00.00.

mysqld is the MySQL server daemon. A daemon is a program that runs in the background, usually providing a particular service (in this case, access to your MySQL database). A daemon runs in the background for an arbitrary amount of time, potentially accruing CPU time as it goes, so your question about whether your particular running time value is "normal" doesn't really make sense. mysqld could have been running on that server for years, for all we know.

From your posts in this thread, I gather that you're running a database-heavy website that is eating a lot of your server's CPU time. Unfortunately, this is something I know nothing about. Good luck...

Reply With Quote
  #5  
Old June 13th, 2012, 11:32 PM
E-Oreo's Avatar
E-Oreo E-Oreo is offline
Lost in code
Click here for more information.
 
Join Date: Dec 2004
Posts: 7,947 E-Oreo User rank is General 91st Grade (Above 100000 Reputation Level)E-Oreo User rank is General 91st Grade (Above 100000 Reputation Level)E-Oreo User rank is General 91st Grade (Above 100000 Reputation Level)E-Oreo User rank is General 91st Grade (Above 100000 Reputation Level)E-Oreo User rank is General 91st Grade (Above 100000 Reputation Level)E-Oreo User rank is General 91st Grade (Above 100000 Reputation Level)E-Oreo User rank is General 91st Grade (Above 100000 Reputation Level)E-Oreo User rank is General 91st Grade (Above 100000 Reputation Level)E-Oreo User rank is General 91st Grade (Above 100000 Reputation Level)E-Oreo User rank is General 91st Grade (Above 100000 Reputation Level)E-Oreo User rank is General 91st Grade (Above 100000 Reputation Level)E-Oreo User rank is General 91st Grade (Above 100000 Reputation Level)E-Oreo User rank is General 91st Grade (Above 100000 Reputation Level)E-Oreo User rank is General 91st Grade (Above 100000 Reputation Level)E-Oreo User rank is General 91st Grade (Above 100000 Reputation Level)E-Oreo User rank is General 91st Grade (Above 100000 Reputation Level)  Folding Points: 945 Folding Title: Novice Folder
Time spent in forums: 2 Months 10 h 55 m 23 sec
Reputation Power: 7053
The 5150 is actually a dual core processor without hyper threading, so your old host must have had a dual processor system with two 5150's for a total of four cores.

Reply With Quote
Reply

Viewing: Dev Shed ForumsOperating SystemsLinux Help > How-to determine the number of physical CPUs

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap