public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-user] hyperthreading
@ 2005-12-13 15:48 Nick Smith
  2005-12-13 16:10 ` Jeff Williams
  0 siblings, 1 reply; 14+ messages in thread
From: Nick Smith @ 2005-12-13 15:48 UTC (permalink / raw
  To: gentoo-user

just did a reinstall of my gentoo box, (been almost a year or so) and
for some reason this time around it doesnt see my hyperthreading p4 as
two cpu's anymore, i have hyperthreading and smp support turned on in
the kernel like i had before.  is this normal? what can i do to get
gentoo to see this machine as an smp machine again?

thanks

Nick

-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [gentoo-user] hyperthreading
  2005-12-13 15:48 [gentoo-user] hyperthreading Nick Smith
@ 2005-12-13 16:10 ` Jeff Williams
  2005-12-13 16:48   ` Nick Smith
  0 siblings, 1 reply; 14+ messages in thread
From: Jeff Williams @ 2005-12-13 16:10 UTC (permalink / raw
  To: gentoo-user

Are you viewing /proc/cpuinfo to get that information or just watching
as it boots? Also, what do you get if you do this:

grep -i 'smp' /boot/config

If you don't have a symbolic link from /boot/config to your kernel
config you will have to change the path somewhat (for example,
/boot/config-2.6.14-gentoo-r2 if you are using the 2.6.14-r2 gentoo
sources). This should give you a result similar to the following:

CONFIG_SMP=y
CONFIG_X86_FIND_SMP_CONFIG=y
CONFIG_X86_SMP=y

Hope this helps.

Jeff

On 12/13/05, Nick Smith <nick.smith79@gmail.com> wrote:
> just did a reinstall of my gentoo box, (been almost a year or so) and
> for some reason this time around it doesnt see my hyperthreading p4 as
> two cpu's anymore, i have hyperthreading and smp support turned on in
> the kernel like i had before.  is this normal? what can i do to get
> gentoo to see this machine as an smp machine again?
>
> thanks
>
> Nick
>
> --
> gentoo-user@gentoo.org mailing list
>
>

-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [gentoo-user] hyperthreading
  2005-12-13 16:10 ` Jeff Williams
@ 2005-12-13 16:48   ` Nick Smith
  2005-12-13 16:57     ` Richard Fish
  2005-12-13 19:44     ` Mark Knecht
  0 siblings, 2 replies; 14+ messages in thread
From: Nick Smith @ 2005-12-13 16:48 UTC (permalink / raw
  To: gentoo-user

On 12/13/05, Jeff Williams <jeffwilliams05@gmail.com> wrote:
> Are you viewing /proc/cpuinfo to get that information or just watching
> as it boots? Also, what do you get if you do this:
>
i was actually watching 'top' i could never get the smp function to
work. here is what cpuinfo gives:

mail ~ # cat /proc/cpuinfo
processor       : 0
vendor_id       : GenuineIntel
cpu family      : 15
model           : 2
model name      : Intel(R) Pentium(R) 4 CPU 2.80GHz
stepping        : 9
cpu MHz         : 2793.380
cache size      : 512 KB
physical id     : 0
siblings        : 2
core id         : 0
cpu cores       : 1
fdiv_bug        : no
hlt_bug         : no
f00f_bug        : no
coma_bug        : no
fpu             : yes
fpu_exception   : yes
cpuid level     : 2
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge
mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe cid
xtpr
bogomips        : 5593.96


> grep -i 'smp' /boot/config
>
this is my boot/config grepped:

mail ~ # grep -i 'smp' /boot/config
# CONFIG_X86_BIGSMP is not set
CONFIG_SMP=y
CONFIG_X86_FIND_SMP_CONFIG=y
CONFIG_X86_SMP=y

> If you don't have a symbolic link from /boot/config to your kernel
> config you will have to change the path somewhat (for example,
> /boot/config-2.6.14-gentoo-r2 if you are using the 2.6.14-r2 gentoo
> sources). This should give you a result similar to the following:
>
> CONFIG_SMP=y
> CONFIG_X86_FIND_SMP_CONFIG=y
> CONFIG_X86_SMP=y
>
> Hope this helps.
>
> Jeff

seems to look correct doesnt it? its just not showing up as two cpus,
:-\  what do you think?

-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [gentoo-user] hyperthreading
  2005-12-13 16:48   ` Nick Smith
@ 2005-12-13 16:57     ` Richard Fish
  2005-12-13 19:44     ` Mark Knecht
  1 sibling, 0 replies; 14+ messages in thread
From: Richard Fish @ 2005-12-13 16:57 UTC (permalink / raw
  To: gentoo-user

On 12/13/05, Nick Smith <nick.smith79@gmail.com> wrote:
> seems to look correct doesnt it? its just not showing up as two cpus,
> :-\  what do you think?

I think HT support is tied somehow to ACPI.  Do you have ACPI support
built into your kernel?

-Richard

-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [gentoo-user] hyperthreading
  2005-12-13 16:48   ` Nick Smith
  2005-12-13 16:57     ` Richard Fish
@ 2005-12-13 19:44     ` Mark Knecht
  2005-12-13 20:29       ` Nick Smith
  1 sibling, 1 reply; 14+ messages in thread
From: Mark Knecht @ 2005-12-13 19:44 UTC (permalink / raw
  To: gentoo-user

On 12/13/05, Nick Smith <nick.smith79@gmail.com> wrote:
> On 12/13/05, Jeff Williams <jeffwilliams05@gmail.com> wrote:
> > Are you viewing /proc/cpuinfo to get that information or just watching
> > as it boots? Also, what do you get if you do this:
> >
> i was actually watching 'top' i could never get the smp function to
> work.

In top what happens when you hit the number '1'?

> here is what cpuinfo gives:
>
> mail ~ # cat /proc/cpuinfo
> processor       : 0
> vendor_id       : GenuineIntel
> cpu family      : 15
> model           : 2
> model name      : Intel(R) Pentium(R) 4 CPU 2.80GHz
> stepping        : 9
> cpu MHz         : 2793.380
> cache size      : 512 KB
> physical id     : 0
> siblings        : 2
> core id         : 0
> cpu cores       : 1
> fdiv_bug        : no
> hlt_bug         : no
> f00f_bug        : no
> coma_bug        : no
> fpu             : yes
> fpu_exception   : yes
> cpuid level     : 2
> wp              : yes
> flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge
> mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe cid
> xtpr
> bogomips        : 5593.96

I see both 'processors':

mark@dragonfly ~ $ cat /proc/cpuinfo
processor       : 0
vendor_id       : GenuineIntel
cpu family      : 15
model           : 3
model name      : Intel(R) Pentium(R) 4 CPU 3.00GHz
stepping        : 3
cpu MHz         : 2995.432
cache size      : 1024 KB
physical id     : 0
siblings        : 2
core id         : 0
cpu cores       : 1
fdiv_bug        : no
hlt_bug         : no
f00f_bug        : no
coma_bug        : no
fpu             : yes
fpu_exception   : yes
cpuid level     : 5
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge
mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe pni
monitor ds_cpl cid
bogomips        : 5998.45

processor       : 1
vendor_id       : GenuineIntel
cpu family      : 15
model           : 3
model name      : Intel(R) Pentium(R) 4 CPU 3.00GHz
stepping        : 3
cpu MHz         : 2995.432
cache size      : 1024 KB
physical id     : 0
siblings        : 2
core id         : 0
cpu cores       : 1
fdiv_bug        : no
hlt_bug         : no
f00f_bug        : no
coma_bug        : no
fpu             : yes
fpu_exception   : yes
cpuid level     : 5
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge
mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe pni
monitor ds_cpl cid
bogomips        : 5990.23

mark@dragonfly ~ $



>
>
> > grep -i 'smp' /boot/config
> >
> this is my boot/config grepped:
>
> mail ~ # grep -i 'smp' /boot/config
> # CONFIG_X86_BIGSMP is not set
> CONFIG_SMP=y
> CONFIG_X86_FIND_SMP_CONFIG=y
> CONFIG_X86_SMP=y

mark@dragonfly ~ $ grep -i 'smp' /usr/src/linux/.config
# CONFIG_X86_BIGSMP is not set
CONFIG_SMP=y
CONFIG_X86_FIND_SMP_CONFIG=y
CONFIG_X86_SMP=y
mark@dragonfly ~ $


>
> seems to look correct doesnt it? its just not showing up as two cpus,
> :-\  what do you think?

Seems a bit strange to me.

- Mark

-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [gentoo-user] hyperthreading
  2005-12-13 19:44     ` Mark Knecht
@ 2005-12-13 20:29       ` Nick Smith
  2005-12-13 20:43         ` Richard Fish
  2005-12-13 20:55         ` Glenn Enright
  0 siblings, 2 replies; 14+ messages in thread
From: Nick Smith @ 2005-12-13 20:29 UTC (permalink / raw
  To: gentoo-user

> In top what happens when you hit the number '1'?
>
it only lists the one cpu.

>
> Seems a bit strange to me.
>
> - Mark
>
its a server, i dont think i built ACPI into the kernel cause i didnt
need/want it, dont think that should make a difference.

> --
> gentoo-user@gentoo.org mailing list
>
>

-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [gentoo-user] hyperthreading
  2005-12-13 20:29       ` Nick Smith
@ 2005-12-13 20:43         ` Richard Fish
  2005-12-13 21:19           ` kashani
  2005-12-13 20:55         ` Glenn Enright
  1 sibling, 1 reply; 14+ messages in thread
From: Richard Fish @ 2005-12-13 20:43 UTC (permalink / raw
  To: gentoo-user

On 12/13/05, Nick Smith <nick.smith79@gmail.com> wrote:
> its a server, i dont think i built ACPI into the kernel cause i didnt
> need/want it, dont think that should make a difference.

I think it does.  At least, there is an "acpi=ht" boot option for the
kernel that says to enable just enough of ACPI to get hyperthreading
working.  So I think you need some level of ACPI support.

-Richard

-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [gentoo-user] hyperthreading
  2005-12-13 20:29       ` Nick Smith
  2005-12-13 20:43         ` Richard Fish
@ 2005-12-13 20:55         ` Glenn Enright
  2005-12-13 21:27           ` Nick Smith
  1 sibling, 1 reply; 14+ messages in thread
From: Glenn Enright @ 2005-12-13 20:55 UTC (permalink / raw
  To: gentoo-user

On Wednesday 14 December 2005 09:29, Nick Smith wrote:
> its a server, i dont think i built ACPI into the kernel cause i didnt
> need/want it, dont think that should make a difference.

>From what I can see SMP functoinality seems to rely quite heavily on ACPI 
discovery. Having said that, lots of code in mpparse.c says it should just 
work like in previous versions. 

Is this the first time building this kernel version?  

What does 'dmesg | grep CPU' say? anything in /var/log/syslog.log?

Have you added any extra patches to the kernel recently?

-- 
The sounds of the nouns are mostly unbound.
In town a noun might wear a gown,
or further down, might dress a clown.
A noun that's sound would never clown,
but unsound nouns jump up and down.
The sound of a noun could distrub the plowing,
and then, my dear, you'd be put in the pound.
But please don't let that get you down,
the renown of your gown is the talk of the town.
		-- A. Nonnie Mouse

-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [gentoo-user] hyperthreading
  2005-12-13 20:43         ` Richard Fish
@ 2005-12-13 21:19           ` kashani
  2005-12-13 22:08             ` Nick Smith
  0 siblings, 1 reply; 14+ messages in thread
From: kashani @ 2005-12-13 21:19 UTC (permalink / raw
  To: gentoo-user

Richard Fish wrote:
> On 12/13/05, Nick Smith <nick.smith79@gmail.com> wrote:
> 
>>its a server, i dont think i built ACPI into the kernel cause i didnt
>>need/want it, dont think that should make a difference.
> 
> 
> I think it does.  At least, there is an "acpi=ht" boot option for the
> kernel that says to enable just enough of ACPI to get hyperthreading
> working.  So I think you need some level of ACPI support.

I was setting up two new servers today and noticed that they both were 
not recognizing the HT cpus. I enabled ACPI, rebooted, and now they show 
up. This appears to be a new thing in 2.6.14 as my 2.6.13 box sees the 
HT cpus without ACPI.

Here's my working config, though you may be able to strip it down some more.

# Power management options (ACPI, APM)
# ACPI (Advanced Configuration and Power Interface) Support
CONFIG_ACPI=y
CONFIG_ACPI_AC=y
CONFIG_ACPI_BATTERY=y
CONFIG_ACPI_BUTTON=y
CONFIG_ACPI_VIDEO=y
# CONFIG_ACPI_HOTKEY is not set
CONFIG_ACPI_FAN=y
CONFIG_ACPI_PROCESSOR=y
CONFIG_ACPI_THERMAL=y
# CONFIG_ACPI_ASUS is not set
# CONFIG_ACPI_IBM is not set
# CONFIG_ACPI_TOSHIBA is not set
CONFIG_ACPI_BLACKLIST_YEAR=0
# CONFIG_ACPI_DEBUG is not set
CONFIG_ACPI_EC=y
CONFIG_ACPI_POWER=y
CONFIG_ACPI_SYSTEM=y

kashani
-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [gentoo-user] hyperthreading
  2005-12-13 20:55         ` Glenn Enright
@ 2005-12-13 21:27           ` Nick Smith
  0 siblings, 0 replies; 14+ messages in thread
From: Nick Smith @ 2005-12-13 21:27 UTC (permalink / raw
  To: gentoo-user

On 12/13/05, Glenn Enright <elinar@ihug.co.nz> wrote:
> On Wednesday 14 December 2005 09:29, Nick Smith wrote:
> > its a server, i dont think i built ACPI into the kernel cause i didnt
> > need/want it, dont think that should make a difference.
>
> From what I can see SMP functoinality seems to rely quite heavily on ACPI
> discovery. Having said that, lots of code in mpparse.c says it should just
> work like in previous versions.
>
> Is this the first time building this kernel version?

probably, i will try adding ACPI support and see what i get, thanks
for the suggestions.

>
> What does 'dmesg | grep CPU' say? anything in /var/log/syslog.log?
>
mail ~ # dmesg | grep CPU
Initializing CPU#0
CPU: After generic identify, caps: bfebfbff 00000000 00000000 00000000
00004400 00000000 00000000
CPU: After vendor identify, caps: bfebfbff 00000000 00000000 00000000
00004400 00000000 00000000
CPU: Trace cache: 12K uops, L1 D cache: 8K
CPU: L2 cache: 512K
CPU: Physical Processor ID: 0
CPU: After all inits, caps: bfebfbff 00000000 00000000 00000080
00004400 00000000 00000000
Intel machine check reporting enabled on CPU#0.
CPU0: Intel P4/Xeon Extended MCE MSRs (12) available
CPU0: Thermal monitoring enabled
CPU0: Intel(R) Pentium(R) 4 CPU 2.80GHz stepping 09
Brought up 1 CPUs


> Have you added any extra patches to the kernel recently?
>

nope

> --
> The sounds of the nouns are mostly unbound.
> In town a noun might wear a gown,
> or further down, might dress a clown.
> A noun that's sound would never clown,
> but unsound nouns jump up and down.
> The sound of a noun could distrub the plowing,
> and then, my dear, you'd be put in the pound.
> But please don't let that get you down,
> the renown of your gown is the talk of the town.
>                 -- A. Nonnie Mouse
>
> --
> gentoo-user@gentoo.org mailing list
>
>

-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [gentoo-user] hyperthreading
  2005-12-13 21:19           ` kashani
@ 2005-12-13 22:08             ` Nick Smith
  0 siblings, 0 replies; 14+ messages in thread
From: Nick Smith @ 2005-12-13 22:08 UTC (permalink / raw
  To: gentoo-user

thanks to everyone that helped, ya'll are gods, that got me working with smp/HT

thanks again

Nick

-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 14+ messages in thread

* [gentoo-user] Hyperthreading
@ 2011-05-10 10:28 Adam Carter
  2011-05-10 12:11 ` Joost Roeleveld
  0 siblings, 1 reply; 14+ messages in thread
From: Adam Carter @ 2011-05-10 10:28 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 629 bytes --]

I haven't been able to find clear info on Hyperthreading, but from what I
can tell it appears that with Hyperthreading On;
1. per core performance is slightly reduced
2. you can run two threads per core, but there is some contention between
threads

So, generally, if you have less busy threads than cores, you should leave it
off and if you have more busy threads than cores you should turn it on.

Does that sound right?

I assume that newer Nehalem/Core i7 HT (otherwise known as simultaneous
multi-threading, SMT) just has less contention between threads than the
older P4 HT, but the busy threads vs core principle remains.

[-- Attachment #2: Type: text/html, Size: 678 bytes --]

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [gentoo-user] Hyperthreading
  2011-05-10 10:28 [gentoo-user] Hyperthreading Adam Carter
@ 2011-05-10 12:11 ` Joost Roeleveld
  2011-05-10 23:53   ` Adam Carter
  0 siblings, 1 reply; 14+ messages in thread
From: Joost Roeleveld @ 2011-05-10 12:11 UTC (permalink / raw
  To: gentoo-user

On Tuesday 10 May 2011 12:28:01 Adam Carter wrote:
> I haven't been able to find clear info on Hyperthreading, but from what I
> can tell it appears that with Hyperthreading On;
> 1. per core performance is slightly reduced

Not in all circumstances...

> 2. you can run two threads per core, but there is some contention between
> threads

Not in all circumstances...

> So, generally, if you have less busy threads than cores, you should leave
> it off and if you have more busy threads than cores you should turn it on.
> 
> Does that sound right?

Nope :)

HT is based on the theory that not all threads are the same. That means that 
certain parts of a core can be kept busy with a completely different task.
If the system is used for lots of different things simultaneously, then HT can 
lead to better performance.

However, if the system is doing a lot of identical calculations, then 
performance will actually be less as the CPU is trying to find tasks that can 
use unused parts. These are, in this case, extremely rare as the vast majority 
of CPU-tasks are identical.

> I assume that newer Nehalem/Core i7 HT (otherwise known as simultaneous
> multi-threading, SMT) just has less contention between threads than the
> older P4 HT, but the busy threads vs core principle remains.

HT is still based on the same theory as it was when it was first introduced. 
The algorithms are probably improved, but the same problem will occur.

In general, for a desktop or server that is doing a lot of different things, HT 
is likely to improve performance.
If the server is dedicated to a single service, there is a distinct chance HT 
will lead to decreased performance.

--
Joost



^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [gentoo-user] Hyperthreading
  2011-05-10 12:11 ` Joost Roeleveld
@ 2011-05-10 23:53   ` Adam Carter
  0 siblings, 0 replies; 14+ messages in thread
From: Adam Carter @ 2011-05-10 23:53 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 282 bytes --]

>
> In general, for a desktop or server that is doing a lot of different
> things, HT
> is likely to improve performance.
> If the server is dedicated to a single service, there is a distinct chance
> HT
> will lead to decreased performance.
>
> Thanks Joost! That certainly helps.

[-- Attachment #2: Type: text/html, Size: 436 bytes --]

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2011-05-10 23:55 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-05-10 10:28 [gentoo-user] Hyperthreading Adam Carter
2011-05-10 12:11 ` Joost Roeleveld
2011-05-10 23:53   ` Adam Carter
  -- strict thread matches above, loose matches on Subject: below --
2005-12-13 15:48 [gentoo-user] hyperthreading Nick Smith
2005-12-13 16:10 ` Jeff Williams
2005-12-13 16:48   ` Nick Smith
2005-12-13 16:57     ` Richard Fish
2005-12-13 19:44     ` Mark Knecht
2005-12-13 20:29       ` Nick Smith
2005-12-13 20:43         ` Richard Fish
2005-12-13 21:19           ` kashani
2005-12-13 22:08             ` Nick Smith
2005-12-13 20:55         ` Glenn Enright
2005-12-13 21:27           ` Nick Smith

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox