Re: Dual core CPU's, but only 2 CPU's in-use?

2008-02-25 Thread Ivan Voras
Tigger wrote:

> The only security advisory I could find was for 5.x and contained info
> on how to disable, not enable.
> 
> http://security.freebsd.org/advisories/FreeBSD-SA-05:09.htt.asc

It's the same security issue, but it's handled differently on 5.x since
it's old.

See machdep.hyperthreading_allowed sysctl.

Also, try benchmarking the system with and without hyperthreading (on
the real work the machine will be doing) since in some cases turning on
hyperthreading will result in globally lower performance.



signature.asc
Description: OpenPGP digital signature


Re: Dual core CPU's, but only 2 CPU's in-use?

2008-02-25 Thread Tigger
On Mon, 25 Feb 2008 11:30:13 +0100
Kris Kennaway <[EMAIL PROTECTED]> wrote:

> Tigger wrote:
> > On Sun, 24 Feb 2008 15:59:49 +0100
> > Kris Kennaway <[EMAIL PROTECTED]> wrote:
> > 
> >> Tigger wrote:
> >>> On Sun, 24 Feb 2008 12:46:23 +0100
> >>> Dominic Fandrey <[EMAIL PROTECTED]> wrote:
> >>>
>  Tigger wrote:
> > Hello. I have a Xeon system with 2 CPU's installed (dual-cores).
> > Under FreeBSD 6.2, a systat reported 4 CPUs in use and so did
> > dmesg. 
> >
> > Under FreeBSD 6.3, dmesg is reporting the 4 CPUs, but systat is
> > only reporting 2 CPUs (CPU 0 and CPU 2). 
> >
> > How do I enabled the second cores on the CPU's or are they
> > really running but systat is not reporting the CPU load across
> > the cores?
>  You can run 'top -S' to check how many idle processes exist. If
>  there are four, everything is fine.
> 
> >>>
> >>> Sadly, no luck. Only cpu0 and cpu2 are reported:
> >>>
> >>>   PID USERNAME  THR PRI NICE   SIZERES STATE  C   TIME   WCPU
> >>> COMMAND 11 root1 171   52 0K 8K CPU2   2 143:43
> >>> 92.38% idle: cpu2 13 root1 171   52 0K 8K RUN0
> >>> 142:33 92.04% idle: cpu0
> >> Are your CPUs really dual-core, or single core + hyperthreaded?
> >>
> >> Kris
> >>
> > 
> > Thank you! Your email sent me off to do what I should have done
> > first - some research. I assumed (wrongly) that 'Logical CPUs per
> > core: 2' meant 'Dual Core', and when I saw the following:
> > 
> > FreeBSD/SMP: Multiprocessor System Detected: 4 CPUs
> >  cpu0 (BSP): APIC ID:  0
> >  cpu1 (AP): APIC ID:  1
> >  cpu2 (AP): APIC ID:  6
> >  cpu3 (AP): APIC ID:  7
> > 
> > I also thought 'Dual Core', however this is not the case. The CPU's
> > are single core with Hyper Threading Tech.
> > 
> > But this research has also lead to some confusion. Its clear there
> > are 2 CPU with 2 Logical cores each, but only 2 cores are in use -
> > why?
> > 
> > Also, the 'man (4) smp' talks about (possible) performance issues
> > with Hyper Threading enabled - does this mean I should set
> > 'machdep.hlt_logical_cpus 1' (it is currently set to 0) - or
> > because the Logical Cores are not being used I can forget about
> > this?
> 
> hyperthreading is not enabled by default on 6.x.  See the security 
> advisory for discussion and how to enable it.
> 
> Kris
> 

The only security advisory I could find was for 5.x and contained info
on how to disable, not enable.

http://security.freebsd.org/advisories/FreeBSD-SA-05:09.htt.asc

Also, 'machdep.hlt_logical_cpus' is already set to 0 (I'm assuming the
'hlt' means 'halt' in the sysctl switch).

-Tig

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Dual core CPU's, but only 2 CPU's in-use?

2008-02-25 Thread Kris Kennaway

Tigger wrote:

On Sun, 24 Feb 2008 15:59:49 +0100
Kris Kennaway <[EMAIL PROTECTED]> wrote:


Tigger wrote:

On Sun, 24 Feb 2008 12:46:23 +0100
Dominic Fandrey <[EMAIL PROTECTED]> wrote:


Tigger wrote:

Hello. I have a Xeon system with 2 CPU's installed (dual-cores).
Under FreeBSD 6.2, a systat reported 4 CPUs in use and so did
dmesg. 


Under FreeBSD 6.3, dmesg is reporting the 4 CPUs, but systat is
only reporting 2 CPUs (CPU 0 and CPU 2). 


How do I enabled the second cores on the CPU's or are they really
running but systat is not reporting the CPU load across the cores?

You can run 'top -S' to check how many idle processes exist. If
there are four, everything is fine.



Sadly, no luck. Only cpu0 and cpu2 are reported:

  PID USERNAME  THR PRI NICE   SIZERES STATE  C   TIME   WCPU
COMMAND 11 root1 171   52 0K 8K CPU2   2 143:43
92.38% idle: cpu2 13 root1 171   52 0K 8K RUN0
142:33 92.04% idle: cpu0

Are your CPUs really dual-core, or single core + hyperthreaded?

Kris



Thank you! Your email sent me off to do what I should have done first -
some research. I assumed (wrongly) that 'Logical CPUs per core: 2'
meant 'Dual Core', and when I saw the following:

FreeBSD/SMP: Multiprocessor System Detected: 4 CPUs
 cpu0 (BSP): APIC ID:  0
 cpu1 (AP): APIC ID:  1
 cpu2 (AP): APIC ID:  6
 cpu3 (AP): APIC ID:  7

I also thought 'Dual Core', however this is not the case. The CPU's
are single core with Hyper Threading Tech.

But this research has also lead to some confusion. Its clear there are
2 CPU with 2 Logical cores each, but only 2 cores are in use - why?

Also, the 'man (4) smp' talks about (possible) performance issues with
Hyper Threading enabled - does this mean I should set
'machdep.hlt_logical_cpus 1' (it is currently set to 0) - or because the
Logical Cores are not being used I can forget about this?


hyperthreading is not enabled by default on 6.x.  See the security 
advisory for discussion and how to enable it.


Kris
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Dual core CPU's, but only 2 CPU's in-use?

2008-02-25 Thread Tigger
On Sun, 24 Feb 2008 15:59:49 +0100
Kris Kennaway <[EMAIL PROTECTED]> wrote:

> Tigger wrote:
> > On Sun, 24 Feb 2008 12:46:23 +0100
> > Dominic Fandrey <[EMAIL PROTECTED]> wrote:
> > 
> >> Tigger wrote:
> >>> Hello. I have a Xeon system with 2 CPU's installed (dual-cores).
> >>> Under FreeBSD 6.2, a systat reported 4 CPUs in use and so did
> >>> dmesg. 
> >>>
> >>> Under FreeBSD 6.3, dmesg is reporting the 4 CPUs, but systat is
> >>> only reporting 2 CPUs (CPU 0 and CPU 2). 
> >>>
> >>> How do I enabled the second cores on the CPU's or are they really
> >>> running but systat is not reporting the CPU load across the cores?
> >> You can run 'top -S' to check how many idle processes exist. If
> >> there are four, everything is fine.
> >>
> > 
> > 
> > Sadly, no luck. Only cpu0 and cpu2 are reported:
> > 
> >   PID USERNAME  THR PRI NICE   SIZERES STATE  C   TIME   WCPU
> > COMMAND 11 root1 171   52 0K 8K CPU2   2 143:43
> > 92.38% idle: cpu2 13 root1 171   52 0K 8K RUN0
> > 142:33 92.04% idle: cpu0
> 
> Are your CPUs really dual-core, or single core + hyperthreaded?
> 
> Kris
> 

Thank you! Your email sent me off to do what I should have done first -
some research. I assumed (wrongly) that 'Logical CPUs per core: 2'
meant 'Dual Core', and when I saw the following:

FreeBSD/SMP: Multiprocessor System Detected: 4 CPUs
 cpu0 (BSP): APIC ID:  0
 cpu1 (AP): APIC ID:  1
 cpu2 (AP): APIC ID:  6
 cpu3 (AP): APIC ID:  7

I also thought 'Dual Core', however this is not the case. The CPU's
are single core with Hyper Threading Tech.

But this research has also lead to some confusion. Its clear there are
2 CPU with 2 Logical cores each, but only 2 cores are in use - why?

Also, the 'man (4) smp' talks about (possible) performance issues with
Hyper Threading enabled - does this mean I should set
'machdep.hlt_logical_cpus 1' (it is currently set to 0) - or because the
Logical Cores are not being used I can forget about this?

-Tig



___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Dual core CPU's, but only 2 CPU's in-use?

2008-02-24 Thread Kris Kennaway

Tigger wrote:

On Sun, 24 Feb 2008 12:46:23 +0100
Dominic Fandrey <[EMAIL PROTECTED]> wrote:


Tigger wrote:

Hello. I have a Xeon system with 2 CPU's installed (dual-cores).
Under FreeBSD 6.2, a systat reported 4 CPUs in use and so did
dmesg. 


Under FreeBSD 6.3, dmesg is reporting the 4 CPUs, but systat is only
reporting 2 CPUs (CPU 0 and CPU 2). 


How do I enabled the second cores on the CPU's or are they really
running but systat is not reporting the CPU load across the cores?

You can run 'top -S' to check how many idle processes exist. If there
are four, everything is fine.




Sadly, no luck. Only cpu0 and cpu2 are reported:

  PID USERNAME  THR PRI NICE   SIZERES STATE  C   TIME   WCPU
COMMAND 11 root1 171   52 0K 8K CPU2   2 143:43 92.38%
idle: cpu2 13 root1 171   52 0K 8K RUN0 142:33
92.04% idle: cpu0


Are your CPUs really dual-core, or single core + hyperthreaded?

Kris

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Dual core CPU's, but only 2 CPU's in-use?

2008-02-24 Thread Tigger
On Sun, 24 Feb 2008 12:46:23 +0100
Dominic Fandrey <[EMAIL PROTECTED]> wrote:

> Tigger wrote:
> > Hello. I have a Xeon system with 2 CPU's installed (dual-cores).
> > Under FreeBSD 6.2, a systat reported 4 CPUs in use and so did
> > dmesg. 
> > 
> > Under FreeBSD 6.3, dmesg is reporting the 4 CPUs, but systat is only
> > reporting 2 CPUs (CPU 0 and CPU 2). 
> > 
> > How do I enabled the second cores on the CPU's or are they really
> > running but systat is not reporting the CPU load across the cores?
> 
> You can run 'top -S' to check how many idle processes exist. If there
> are four, everything is fine.
> 


Sadly, no luck. Only cpu0 and cpu2 are reported:

  PID USERNAME  THR PRI NICE   SIZERES STATE  C   TIME   WCPU
COMMAND 11 root1 171   52 0K 8K CPU2   2 143:43 92.38%
idle: cpu2 13 root1 171   52 0K 8K RUN0 142:33
92.04% idle: cpu0

-Tig

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Dual core CPU's, but only 2 CPU's in-use?

2008-02-24 Thread Dominic Fandrey

Tigger wrote:

Hello. I have a Xeon system with 2 CPU's installed (dual-cores). Under
FreeBSD 6.2, a systat reported 4 CPUs in use and so did dmesg. 


Under FreeBSD 6.3, dmesg is reporting the 4 CPUs, but systat is only
reporting 2 CPUs (CPU 0 and CPU 2). 


How do I enabled the second cores on the CPU's or are they really
running but systat is not reporting the CPU load across the cores?


You can run 'top -S' to check how many idle processes exist. If there are 
four, everything is fine.

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Dual core CPU's, but only 2 CPU's in-use?

2008-02-24 Thread Tigger
Hello. I have a Xeon system with 2 CPU's installed (dual-cores). Under
FreeBSD 6.2, a systat reported 4 CPUs in use and so did dmesg. 

Under FreeBSD 6.3, dmesg is reporting the 4 CPUs, but systat is only
reporting 2 CPUs (CPU 0 and CPU 2). 

How do I enabled the second cores on the CPU's or are they really
running but systat is not reporting the CPU load across the cores?

dmesg from 6.3 (snipped):
CPU: Intel(R) Xeon(TM) CPU 2.80GHz (2790.73-MHz 686-class CPU)
  Origin = "GenuineIntel"  Id = 0xf29  Stepping = 9
  
Features=0xbfebfbff
Features2=0x4400
  Logical CPUs per core: 2
real memory  = 2147352576 (2047 MB)
avail memory = 2096242688 (1999 MB)
ACPI APIC Table: 
FreeBSD/SMP: Multiprocessor System Detected: 4 CPUs
 cpu0 (BSP): APIC ID:  0
 cpu1 (AP): APIC ID:  1
 cpu2 (AP): APIC ID:  6
 cpu3 (AP): APIC ID:  7

And sysctrl dev.cpu is interesting, the 4 CPUs are found but only 2
appear to be working (cx_usage is 100% or 0%):

# sysctl dev.cpu
dev.cpu.0.%desc: ACPI CPU
dev.cpu.0.%driver: cpu
dev.cpu.0.%location: handle=\_PR_.CPU0
dev.cpu.0.%pnpinfo: _HID=none _UID=0
dev.cpu.0.%parent: acpi0
dev.cpu.0.cx_supported: C1/0
dev.cpu.0.cx_lowest: C1
dev.cpu.0.cx_usage: 100.00%
dev.cpu.1.%desc: ACPI CPU
dev.cpu.1.%driver: cpu
dev.cpu.1.%location: handle=\_PR_.CPU1
dev.cpu.1.%pnpinfo: _HID=none _UID=0
dev.cpu.1.%parent: acpi0
dev.cpu.1.cx_supported: C1/0
dev.cpu.1.cx_lowest: C1
dev.cpu.1.cx_usage: 0%
dev.cpu.2.%desc: ACPI CPU
dev.cpu.2.%driver: cpu
dev.cpu.2.%location: handle=\_PR_.CPU2
dev.cpu.2.%pnpinfo: _HID=none _UID=0
dev.cpu.2.%parent: acpi0
dev.cpu.2.cx_supported: C1/0
dev.cpu.2.cx_lowest: C1
dev.cpu.2.cx_usage: 100.00%
dev.cpu.3.%desc: ACPI CPU
dev.cpu.3.%driver: cpu
dev.cpu.3.%location: handle=\_PR_.CPU3
dev.cpu.3.%pnpinfo: _HID=none _UID=0
dev.cpu.3.%parent: acpi0
dev.cpu.3.cx_supported: C1/0
dev.cpu.3.cx_lowest: C1
dev.cpu.3.cx_usage: 0%

Thanks for any pointers on this one!

-Tig


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"