LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   how to find out how many processors on the server (https://www.linuxquestions.org/questions/linux-general-1/how-to-find-out-how-many-processors-on-the-server-119804/)

ashley75 11-25-2003 11:26 AM

how to find out how many processors on the server
 
when I do command: top

I saw :

CPU0 states: 0.0% user, 0.1% system, 0.0% nice, 99.0% idle
CPU1 states: 0.0% user, 0.0% system, 0.0% nice, 100.0% idle



does it mean that I have two porcessors???? but the person who ordered the server told me thathe order only one processor.

I just want to confirm

hol 11-25-2003 11:37 AM

Chances are you're running on a machine with Intel's HyperThreading if you know you have one CPU but Linux tells you you have two. Linux sees HT Processors as 2 CPUs. The only way to know for sure is to check your system's POST boot-up screen or assume that if you have a Pentium 4 with 3 GHz or more that it does.

You can look at the file /proc/cpuinfo and see if (going by memory here) the characters 'ht' are listed in the line called 'flags' for CPU0.

As a side note it's probably useful to disable hyper-threading while running Linux with Kernel version 2.4 (which you probably have) since the second CPU is 'not quite really' a second processor and the kernel may spend time scheduling work for the virtual processor when you really do not get the benefit from it.

stickman 11-25-2003 11:43 AM

Is it P4? Hyperthreading will make it show up as two processors.

jkobrien 11-25-2003 11:45 AM

Quote:

As a side note it's probably useful to disable hyper-threading while running
Linux with Kernel version 2.4 (which you probably have) since the second CPU is 'not quite really' a second processor and the kernel may spend time scheduling work for the virtual processor when you really do not get the benefit from it.
My :twocents: on this...

I have a dual processor with hyper-threading enabled. I was interested in whether hyper-threading actually increased performance and tested this by running two and four setiathome clients. With hyper-threading each of the four setiathome clients did run slower than the two unthreaded clients, but not half as slow. I didn't keep the figures but I think the gain in performance was about 50% with hyperthreading.

John

ashley75 11-25-2003 12:41 PM

thanks so much for the values input, by the way, what is hyper threading mean ????

Joey.Dale 11-27-2003 10:46 AM

The easyest way to tell is to open your box and have a look.

schpanky 11-27-2003 04:53 PM

Quote:

Originally posted by ashley75
thanks so much for the values input, by the way, what is hyper threading mean ????
Hyper-Threading is the hardware-level system in which the CPU emulates dual processors, thus spreading work over "two" processors or loading the program to either processor for seperate processing.

In theory, it's neat because if you have two 3.06 Intel Pentium-4 Based Xeons then you theoretically have 4 processors ! :eek:

iceman47 11-27-2003 05:27 PM

just to add, you can see cpu info in /proc/cpuinfo.
so:
cat /proc/cpuinfo


All times are GMT -5. The time now is 05:14 PM.