PDA

View Full Version : How do I tell if I'm using SMP kernel?



ben.carbery
26th March 2007, 04:21 AM
Hi,
I have a server that judging by /proc/cpuinfo has 2 CPUs but I am unsure how to tell if both are being used since the intall was done by another colleague.
How can I tell? And what are the steps to convert - do I just need to reboot with a different kernel?
Any help or links appreciated.

thanks,

Ben

snoze
26th March 2007, 04:36 AM
In the terminal type
top

check your cpu info on the top.. in smp both cpu's info are shown by cpuload %. However you can see both cpu load also in top. While running top press letter 'c' to check your job id etc

ben.carbery
26th March 2007, 06:48 AM
Thanks,

I ran top and here is the 'top' of top.

<pre>
top - 15:44:52 up 26 days, 14:56, 6 users, load average: 2.06, 1.74, 1.78
Tasks: 144 total, 1 running, 142 sleeping, 0 stopped, 1 zombie
Cpu(s): 7.4%us, 46.0%sy, 0.0%ni, 31.4%id, 14.0%wa, 0.3%hi, 0.8%si, 0.0%st
Mem: 1034528k total, 1020056k used, 14472k free, 2576k buffers
Swap: 2031608k total, 93120k used, 1938488k free, 855576k cached
</pre>

So it looks like only one cpu is being used, yes?

How would I go about getting both in use?

cheers,

Ben C

markkuk
26th March 2007, 07:05 AM
"top" shows only the summary of all CPUs by default. Hit the "1" key (number one) to see both the CPUs on separate lines.
If /proc/cpuinfo shows multiple CPUs, then the kernel is using all of them.

ben.carbery
26th March 2007, 07:13 AM
Ah, looks like it's using both.
vmware is killing this machine!

top - 16:12:41 up 26 days, 15:23, 6 users, load average: 2.22, 1.97, 1.87
Tasks: 143 total, 2 running, 140 sleeping, 0 stopped, 1 zombie
Cpu0 : 25.5%us, 42.7%sy, 0.0%ni, 19.5%id, 12.3%wa, 0.0%hi, 0.0%si, 0.0%st
Cpu1 : 19.5%us, 53.5%sy, 0.0%ni, 17.2%id, 4.6%wa, 1.0%hi, 4.3%si, 0.0%st
Mem: 1034528k total, 1020360k used, 14168k free, 1448k buffers
Swap: 2031608k total, 93116k used, 1938492k free, 858528k cached

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
9985 root 5 -10 808m 635m 625m S 93 62.9 324:51.47 vmware-vmx

thanks for help

wt6g
27th March 2007, 07:26 AM
I'm not so sure. I've been noticing that my CPU time seems to MAX out at 50% most of the time when running CPU intensive tasks. I'm running a Pentium D, FC6 686. I did the Top/1 and it shows me two CPU's, with different utilization sometimes, but there really is only 1 cpu. I think there's something wrong with the way fedora uses and configures the Pentium. I see no such problem with my AMD machines, but ALL of my Pentium D machines running FC6 seem to have a performance problem like this.

If the machine is running several tasks the CPU utilization goes over 50%, but running things like YUMEX clearly show a CPU limit of 50% even though Python would like to suck the entire machine down. On the AMD machines Yumex gets the entire CPU when it needs it. I'm not sure what is going on, but the AMD boxes that were about the same speed with FC4 are now 2X as fast with FC6 (or should I say that the Pentium D boxes are running at 1/2 speed!)
/Len
WT6G

drunkahol
27th March 2007, 07:46 AM
wt6g:

Don't view the 50% "limit" as a problem. The CPU is reporting back 2 CPU's to the OS (this may be two cores or just hyperthreading). If a process takes up ALL of the time of one of those cores (virtual or not), it can only be taking 50% of the theoretical maximum of the system.

Hyperthreading allows an extra 15% CPU cycles perhaps.

However many cores you have should be divided into 100% to get the "maximum" a single process can use. As an example, we have a 4-way dual core AMD server here at work. When we load up the server with a single highly CPU intensive process we will only find 12.5% CPU utilisation.

The only way to max out a multi-core system (or multi CPU) is to run multiple threads. A single thread can only run on on core at a time - even if that core is a virtual core on a hyperthreaded CPU.

You should view it as an accounting inaccuracy at worst. Your system is still being fully used, but that can only be reported by the OS as 50% of the available cores working at full speed.

Cheers

Duncan

P.S. The main way to tell what kernel you are running is `uname -a`. Look for the phrase "SMP"

markkuk
27th March 2007, 08:42 AM
I'm running a Pentium D, FC6 686. I did the Top/1 and it shows me two CPU's, with different utilization sometimes, but there really is only 1 cpu.
Pentium D is a dual-core processor. From the OS point of view that's two CPUs even if they are physically in one package.