LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (http://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   Centos thinks there is 32 cores when there are only 16 (http://www.linuxquestions.org/questions/linux-hardware-18/centos-thinks-there-is-32-cores-when-there-are-only-16-a-4175435069/)

ptricky 11-01-2012 09:23 AM

Centos thinks there is 32 cores when there are only 16
 
I have a HP server that has 16 cores, I look in the ilo and see 16. When I use the tool hpasmcli it shows 16

Processor: 0
Name : Intel Xeon
Stepping : 7
Speed : 2600 MHz
Bus : 100 MHz
Core : 8
Thread : 16
Socket : 1
Level2 Cache : 2048 KBytes
Level3 Cache : 20480 KBytes
Status : Ok

Processor: 1
Name : Intel Xeon
Stepping : 7
Speed : 2600 MHz
Bus : 100 MHz
Core : 8
Thread : 16
Socket : 2
Level2 Cache : 2048 KBytes
Level3 Cache : 20480 KBytes
Status : Ok

Processor total : 2



But CentOS thinks there is 32

# cat /proc/cpuinfo | grep processor | wc -l
32



What gives?

The motherboard was replaced recently so I don't know if that has anything to do with it.

johnsfine 11-01-2012 09:28 AM

That means you have hyperthreading turned on. There is a BIOS setting to turn that off if you don't want it.

Hyperthreading makes each core act like two cores that are each around half as fast as the real core. For some work loads, each half of a core may be significantly more than half as fast as the real core, so that for those work loads having hyperthreading turned on will improve total system performance. Computations that switch between a high rate of branch misprediction and a high rate of floating point computation can benefit a lot from hyperthreading (as long as you also have enough threads doing that kind of work).

For some work loads, especially those with high cache miss rates, each half core may be significantly slower than half a real core, so hyperthreading may significantly reduce total system performance.

If you have fewer than 32 threads using CPU time, the OS should be smart enough to idle half of each core before idling all of any one core. When hyperthreading is enabled but half of a core is idle, the other half is nearly as fast as it would have been with hyperthreading disabled. So often having fewer than 32 threads active is not necessarily a reason for wanting hyperthreading off. But if you rarely have more than 16 threads active, then there is some overhead to having hyperthreading enabled with half of each core idle vs. hyperthreading disabled.

If you have processes active with a variety of different priorities, hyperthreading could make the high priority processes get half as much work done as they would without hyperthreading, while low priority processes get more work done.

Hopefully, I have given you some of the basic concepts to inform the decision of whether you should reboot into BIOS setup and disable hyperthreading. But ultimately that decision is either a guess or the result of very difficult controlled experiments. Determining whether hyperthreading is better or worse from just the kind of general ideas I described above is not a reliable way to make the best decision.

BTW, others reading this may have very few cores and have the decision of whether to turn hyperthreading on or off. With very few cores, hyperthreading may improve the responsiveness of the system and reduce various latencies even though it slows the throughput of major computations. So it might be a good idea even if it doesn't improve total performance. The OP, with 16 real cores, is far outside the range where you would enable hyperthreading to reduce latencies. If it doesn't improve the total throughput, turn it off.

ptricky 11-01-2012 09:57 AM

You are correct. Thanks for the detailed response!

H_TeXMeX_H 11-01-2012 03:13 PM

I would test things out before turning it off for good. From my tests on fewer cores, hyper-threading can greatly improve performance in many situations.

snowcake 11-02-2012 03:01 PM

Its Hyper-threading. Edit, i didnīt saw it was solved.


All times are GMT -5. The time now is 02:00 PM.