LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices

Reply
 
Search this Thread
Old 11-01-2012, 09:23 AM   #1
ptricky
LQ Newbie
 
Registered: Nov 2012
Distribution: centos
Posts: 4

Rep: Reputation: Disabled
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.
 
Old 11-01-2012, 09:28 AM   #2
johnsfine
Guru
 
Registered: Dec 2007
Distribution: Centos
Posts: 5,125

Rep: Reputation: 1119Reputation: 1119Reputation: 1119Reputation: 1119Reputation: 1119Reputation: 1119Reputation: 1119Reputation: 1119Reputation: 1119
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.

Last edited by johnsfine; 11-01-2012 at 09:48 AM.
 
1 members found this post helpful.
Old 11-01-2012, 09:57 AM   #3
ptricky
LQ Newbie
 
Registered: Nov 2012
Distribution: centos
Posts: 4

Original Poster
Rep: Reputation: Disabled
Thumbs up

You are correct. Thanks for the detailed response!
 
Old 11-01-2012, 03:13 PM   #4
H_TeXMeX_H
Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269
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.
 
Old 11-02-2012, 03:01 PM   #5
snowcake
LQ Newbie
 
Registered: Nov 2012
Posts: 11

Rep: Reputation: Disabled
Its Hyper-threading. Edit, i didnīt saw it was solved.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Control of CPU cores utilization on centos server, is it possible? Alan_SP Linux - Server 15 11-13-2012 06:17 AM
[SOLVED] How to get the Number of Cores using C MarcosPauloBR Programming 10 04-14-2011 10:54 AM
How to config how many cores used? duyuyang Linux - Kernel 3 06-18-2009 04:04 AM
No of cores in Xeon linuxbeginner0 Linux - Hardware 7 01-23-2008 09:42 AM
Cores on Fedora jonty_11 Fedora 2 11-05-2004 10:25 AM


All times are GMT -5. The time now is 05:45 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration