public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-user] RYZEN 5: Hyperthreading or no hyperthreading...
@ 2020-03-27 16:20 tuxic
  2020-03-27 17:04 ` Andrea Conti
  2020-03-27 18:02 ` Jack
  0 siblings, 2 replies; 10+ messages in thread
From: tuxic @ 2020-03-27 16:20 UTC (permalink / raw
  To: Gentoo

Hi,

still not 100% sure, whether I configured the kernel correctlu:

Running an AMD RYZEN 5 3600...

lscpu displays:
Architecture:                    x86_64
CPU op-mode(s):                  32-bit, 64-bit
Byte Order:                      Little Endian
Address sizes:                   43 bits physical, 48 bits virtual
CPU(s):                          6
On-line CPU(s) list:             0-5
Thread(s) per core:              1 <<<<<<
Core(s) per socket:              6
Socket(s):                       1
Vendor ID:                       AuthenticAMD
CPU family:                      23
Model:                           113
Model name:                      AMD Ryzen 5 3600 6-Core Processor
Stepping:                        0
...

The accoring part of lshw shows:

     *-cpu
          description: CPU
          product: AMD Ryzen 5 3600 6-Core Processor
          vendor: Advanced Micro Devices [AMD]
          physical id: 15
          bus info: cpu@0
          version: AMD Ryzen 5 3600 6-Core Processor
          serial: Unknown
          slot: AM4
          size: 3649MHz
          capacity: 4200MHz
          width: 64 bits
          clock: 100MHz
          capabilities: x86-64 fpu fpu_exception wp vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp constant_tsc rep_good nopl nonstop_tsc cpuid extd_apicid aperfmperf pni pclmulqdq monitor ssse3 fma cx16 sse4_1 sse4_2 movbe popcnt aes xsave avx f16c rdrand lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw ibs skinit wdt tce topoext perfctr_core perfctr_nb bpext perfctr_llc mwaitx cpb cat_l3 cdp_l3 hw_pstate sme ssbd mba sev ibpb stibp vmmcall fsgsbase bmi1 avx2 smep bmi2 cqm rdt_a rdseed adx smap clflushopt clwb sha_ni xsaveopt xsavec xgetbv1 xsaves cqm_llc cqm_occup_llc cqm_mbm_total cqm_mbm_local clzero irperf xsaveerptr rdpru wbnoinvd arat npt lbrv svm_lock nrip_save tsc_scale vmcb_clean flushbyasid decodeassists pausefilter pfthreshold avic v_vmsave_vmload vgif umip rdpid overflow_recov succor smca cpufreq
          configuration: cores=6 enabledcores=6 threads=12
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
          !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!


I set (beside other things) these kernel configurations:

Processor type and features  --->
  [*] Symmetric multi-processing support
  [*] AMD ACPI2Platform devices support
  [*] Supported processor vendors  --->
    [*]   Support AMD processors
  [*] SMT (Hyperthreading) scheduler support
  [*] Multi-core scheduler support
      Preemption Model (Preemptible Kernel (Low-Latency Desktop))  --->
  [*] Machine Check / overheating reporting
  [*]   AMD MCE features
  Performance monitoring  --->
    <*> AMD Processor Power Reporting Mechanism
  [*]   AMD microcode loading support
Power management and ACPI options  --->
  CPU Frequency scaling  --->
    <*>   AMD Opteron/Athlon64 PowerNow!
    <*>   AMD frequency sensitivity feedback powersave bias
Device Drivers  --->
  [*] IOMMU Hardware Support  --->
    [*]   AMD IOMMU support
    <*>     AMD IOMMU Version 2 driver

htop shows six cores.

Does my CPU hyperthread? 

Cheers
Meino









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

* Re: [gentoo-user] RYZEN 5: Hyperthreading or no hyperthreading...
  2020-03-27 16:20 [gentoo-user] RYZEN 5: Hyperthreading or no hyperthreading tuxic
@ 2020-03-27 17:04 ` Andrea Conti
  2020-03-27 18:11   ` tuxic
  2020-03-27 18:02 ` Jack
  1 sibling, 1 reply; 10+ messages in thread
From: Andrea Conti @ 2020-03-27 17:04 UTC (permalink / raw
  To: gentoo-user

Hello,

> Thread(s) per core:              1 <<<<<
> Does my CPU hyperthread?

Definitely not.

Your kernel config is fine, chances are hyperthreading (aka "SMT mode") 
is disabled in your BIOS settings.

andrea


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

* Re: [gentoo-user] RYZEN 5: Hyperthreading or no hyperthreading...
  2020-03-27 16:20 [gentoo-user] RYZEN 5: Hyperthreading or no hyperthreading tuxic
  2020-03-27 17:04 ` Andrea Conti
@ 2020-03-27 18:02 ` Jack
  1 sibling, 0 replies; 10+ messages in thread
From: Jack @ 2020-03-27 18:02 UTC (permalink / raw
  To: gentoo-user

On 2020.03.27 12:20, tuxic@posteo.de wrote:
> Hi,
> 
> still not 100% sure, whether I configured the kernel correctlu:
> 
> Running an AMD RYZEN 5 3600...
> 
> lscpu displays:
> Architecture:                    x86_64
> CPU op-mode(s):                  32-bit, 64-bit
> Byte Order:                      Little Endian
> Address sizes:                   43 bits physical, 48 bits virtual
> CPU(s):                          6
> On-line CPU(s) list:             0-5
> Thread(s) per core:              1 <<<<<<
> Core(s) per socket:              6
> Socket(s):                       1
> Vendor ID:                       AuthenticAMD
> CPU family:                      23
> Model:                           113
> Model name:                      AMD Ryzen 5 3600 6-Core Processor
> Stepping:                        0
> ...
> 
> The accoring part of lshw shows:
> 
>      *-cpu
>           description: CPU
>           product: AMD Ryzen 5 3600 6-Core Processor
>           vendor: Advanced Micro Devices [AMD]
>           physical id: 15
>           bus info: cpu@0
>           version: AMD Ryzen 5 3600 6-Core Processor
>           serial: Unknown
>           slot: AM4
>           size: 3649MHz
>           capacity: 4200MHz
>           width: 64 bits
>           clock: 100MHz
>           capabilities: x86-64 fpu fpu_exception wp vme de pse tsc  
> msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr  
> sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp constant_tsc  
> rep_good nopl nonstop_tsc cpuid extd_apicid aperfmperf pni pclmulqdq  
> monitor ssse3 fma cx16 sse4_1 sse4_2 movbe popcnt aes xsave avx f16c  
> rdrand lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a  
> misalignsse 3dnowprefetch osvw ibs skinit wdt tce topoext  
> perfctr_core perfctr_nb bpext perfctr_llc mwaitx cpb cat_l3 cdp_l3  
> hw_pstate sme ssbd mba sev ibpb stibp vmmcall fsgsbase bmi1 avx2 smep  
> bmi2 cqm rdt_a rdseed adx smap clflushopt clwb sha_ni xsaveopt xsavec  
> xgetbv1 xsaves cqm_llc cqm_occup_llc cqm_mbm_total cqm_mbm_local  
> clzero irperf xsaveerptr rdpru wbnoinvd arat npt lbrv svm_lock  
> nrip_save tsc_scale vmcb_clean flushbyasid decodeassists pausefilter  
> pfthreshold avic v_vmsave_vmload vgif umip rdpid overflow_recov  
> succor smca cpufreq
>           configuration: cores=6 enabledcores=6 threads=12
>           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>           !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
> 
> 
> I set (beside other things) these kernel configurations:
> 
> Processor type and features  --->
>   [*] Symmetric multi-processing support
>   [*] AMD ACPI2Platform devices support
>   [*] Supported processor vendors  --->
>     [*]   Support AMD processors
>   [*] SMT (Hyperthreading) scheduler support
>   [*] Multi-core scheduler support
>       Preemption Model (Preemptible Kernel (Low-Latency Desktop))   
> --->
>   [*] Machine Check / overheating reporting
>   [*]   AMD MCE features
>   Performance monitoring  --->
>     <*> AMD Processor Power Reporting Mechanism
>   [*]   AMD microcode loading support
> Power management and ACPI options  --->
>   CPU Frequency scaling  --->
>     <*>   AMD Opteron/Athlon64 PowerNow!
>     <*>   AMD frequency sensitivity feedback powersave bias
> Device Drivers  --->
>   [*] IOMMU Hardware Support  --->
>     [*]   AMD IOMMU support
>     <*>     AMD IOMMU Version 2 driver
> 
> htop shows six cores.
> 
> Does my CPU hyperthread?
> 
> Cheers
> Meino
I have a Ryzen 5 2600 and an MSI B350 Tomahawk, and I show 12 threads  
in htop.  I'll look in my own BIOS next reboot, but dmidecode shows me:

Processor Information
         Socket Designation: AM4
         Type: Central Processor
         Family: Zen
         Manufacturer: Advanced Micro Devices, Inc.
         ID: 82 0F 80 00 FF FB 8B 17
         Signature: Family 23, Model 8, Stepping 2
         Flags:
                 FPU (Floating-point unit on-chip)
                 VME (Virtual mode extension)
                 DE (Debugging extension)
                 PSE (Page size extension)
                 TSC (Time stamp counter)
                 MSR (Model specific registers)
                 PAE (Physical address extension)
                 MCE (Machine check exception)
                 CX8 (CMPXCHG8 instruction supported)
                 APIC (On-chip APIC hardware supported)
                 SEP (Fast system call)
                 MTRR (Memory type range registers)
                 PGE (Page global enable)
                 MCA (Machine check architecture)
                 CMOV (Conditional move instruction supported)
                 PAT (Page attribute table)
                 PSE-36 (36-bit page size extension)
                 CLFSH (CLFLUSH instruction supported)
                 MMX (MMX technology supported)
                 FXSR (FXSAVE and FXSTOR instructions supported)
                 SSE (Streaming SIMD extensions)
                 SSE2 (Streaming SIMD extensions 2)
                 HTT (Multi-threading)
         Version: AMD Ryzen 5 2600 Six-Core Processor
         Voltage: 1.1 V
         External Clock: 100 MHz
         Max Speed: 3900 MHz
         Current Speed: 3400 MHz
         Status: Populated, Enabled
         Upgrade: Socket AM4
         L1 Cache Handle: 0x0011
         L2 Cache Handle: 0x0012
         L3 Cache Handle: 0x0013
         Serial Number: Unknown
         Asset Tag: Unknown
         Part Number: Unknown
         Core Count: 6
         Core Enabled: 6
         Thread Count: 12
         Characteristics:
                 64-bit capable
                 Multi-Core
                 Hardware Thread
                 Execute Protection
                 Enhanced Virtualization
                 Power/Performance Control

which does suggest there might be a BIOS setting involved.

Jack

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

* Re: [gentoo-user] RYZEN 5: Hyperthreading or no hyperthreading...
  2020-03-27 17:04 ` Andrea Conti
@ 2020-03-27 18:11   ` tuxic
  2020-03-27 18:51     ` Mark Knecht
  0 siblings, 1 reply; 10+ messages in thread
From: tuxic @ 2020-03-27 18:11 UTC (permalink / raw
  To: gentoo-user

On 03/27 06:04, Andrea Conti wrote:
> Hello,
> 
> > Thread(s) per core:              1 <<<<<
> > Does my CPU hyperthread?
> 
> Definitely not.
> 
> Your kernel config is fine, chances are hyperthreading (aka "SMT mode") is
> disabled in your BIOS settings.
> 
> andrea
> 

Hi Andrea,

I checked that: The BIOS setting was set to use hyperthreading.

But "Number of cores" was set to six. I changed that to 12 and 
Voila! I got two threads per core.

I think "Number of cores" is a little misleading, since there
are six physical cores (not threads) with a RYZEN 5.

I feeling not that comfortable with this solution.

Is there any way to check for the validity of this setting
beside a tool, which prints a "2" after the word "threads" ;) ?

Cheers!
Meino




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

* Re: [gentoo-user] RYZEN 5: Hyperthreading or no hyperthreading...
  2020-03-27 18:11   ` tuxic
@ 2020-03-27 18:51     ` Mark Knecht
  2020-03-28  5:57       ` tuxic
  0 siblings, 1 reply; 10+ messages in thread
From: Mark Knecht @ 2020-03-27 18:51 UTC (permalink / raw
  To: Gentoo User

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

On Fri, Mar 27, 2020 at 11:11 AM <tuxic@posteo.de> wrote:
>
> On 03/27 06:04, Andrea Conti wrote:
> > Hello,
> >
> > > Thread(s) per core:              1 <<<<<
> > > Does my CPU hyperthread?
> >
> > Definitely not.
> >
> > Your kernel config is fine, chances are hyperthreading (aka "SMT mode")
is
> > disabled in your BIOS settings.
> >
> > andrea
> >
>
> Hi Andrea,
>
> I checked that: The BIOS setting was set to use hyperthreading.
>
> But "Number of cores" was set to six. I changed that to 12 and
> Voila! I got two threads per core.
>
> I think "Number of cores" is a little misleading, since there
> are six physical cores (not threads) with a RYZEN 5.
>
> I feeling not that comfortable with this solution.
>
> Is there any way to check for the validity of this setting
> beside a tool, which prints a "2" after the word "threads" ;) ?
>
> Cheers!
> Meino
>
>

cat /proc/cpu should give info for each thread. I've been running an i7 980
Extreme processor @3.33GHz here at home for about 12 years or so. It's 6
cores but shows 12 processors on both Gentoo and now Kubuntu.

I generally run top and then hit '1' and 'z'. You can watch what percentage
each core/thread is using.

Time a BIG compile job twice, once with each kernel. If it's working you'll
measure a significant difference in time. Note that it won't be 2x as
you'll also be limited by disk read/write throughput, but you'll know it's
basically working.

On Gentoo make sure you're compile settings in (I think make.conf - I no
longer run Gentoo much) are set to take advantage of all your cores and not
limited to something smaller. Also watch overheating when using more
cores/threads. On older PCs like mine when you possibly have dust in CPU
coolers might not be as efficient as when they are new.

HTH,
Mark

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

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

* Re: [gentoo-user] RYZEN 5: Hyperthreading or no hyperthreading...
  2020-03-27 18:51     ` Mark Knecht
@ 2020-03-28  5:57       ` tuxic
  2020-03-28 12:59         ` Mark Knecht
  0 siblings, 1 reply; 10+ messages in thread
From: tuxic @ 2020-03-28  5:57 UTC (permalink / raw
  To: gentoo-user

On 03/27 11:51, Mark Knecht wrote:
> On Fri, Mar 27, 2020 at 11:11 AM <tuxic@posteo.de> wrote:
> >
> > On 03/27 06:04, Andrea Conti wrote:
> > > Hello,
> > >
> > > > Thread(s) per core:              1 <<<<<
> > > > Does my CPU hyperthread?
> > >
> > > Definitely not.
> > >
> > > Your kernel config is fine, chances are hyperthreading (aka "SMT mode")
> is
> > > disabled in your BIOS settings.
> > >
> > > andrea
> > >
> >
> > Hi Andrea,
> >
> > I checked that: The BIOS setting was set to use hyperthreading.
> >
> > But "Number of cores" was set to six. I changed that to 12 and
> > Voila! I got two threads per core.
> >
> > I think "Number of cores" is a little misleading, since there
> > are six physical cores (not threads) with a RYZEN 5.
> >
> > I feeling not that comfortable with this solution.
> >
> > Is there any way to check for the validity of this setting
> > beside a tool, which prints a "2" after the word "threads" ;) ?
> >
> > Cheers!
> > Meino
> >
> >
> 
> cat /proc/cpu should give info for each thread. I've been running an i7 980
> Extreme processor @3.33GHz here at home for about 12 years or so. It's 6
> cores but shows 12 processors on both Gentoo and now Kubuntu.
> 
> I generally run top and then hit '1' and 'z'. You can watch what percentage
> each core/thread is using.
> 
> Time a BIG compile job twice, once with each kernel. If it's working you'll
> measure a significant difference in time. Note that it won't be 2x as
> you'll also be limited by disk read/write throughput, but you'll know it's
> basically working.
> 
> On Gentoo make sure you're compile settings in (I think make.conf - I no
> longer run Gentoo much) are set to take advantage of all your cores and not
> limited to something smaller. Also watch overheating when using more
> cores/threads. On older PCs like mine when you possibly have dust in CPU
> coolers might not be as efficient as when they are new.
> 
> HTH,
> Mark

Hi Mark,

thank you for your explanations! :)

/proc/cpu doesn't exist on my system....may be you are referring to
/proc/cpuinfo?

The problem was caused by a kernel misconfiguration by me.

In the kernel setup there is a setting "Number of cores" which
I had set to six ... since my CPU has 6 physical core.

Setting this to twelve (and blurring the syntactically border between
threads and cores thereby...) gives me twelves cores in top, htop
and such and (as an example) compiling the kernel is faster -
so it is not a display gimmick only.

I think "Number of cores" is a misnomer...or am I wrong?

Cheers!
Meino



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

* Re: [gentoo-user] RYZEN 5: Hyperthreading or no hyperthreading...
  2020-03-28  5:57       ` tuxic
@ 2020-03-28 12:59         ` Mark Knecht
  2020-03-28 13:24           ` tuxic
  0 siblings, 1 reply; 10+ messages in thread
From: Mark Knecht @ 2020-03-28 12:59 UTC (permalink / raw
  To: Gentoo User

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

On Fri, Mar 27, 2020 at 10:58 PM <tuxic@posteo.de> wrote:
>
> On 03/27 11:51, Mark Knecht wrote:
> > On Fri, Mar 27, 2020 at 11:11 AM <tuxic@posteo.de> wrote:
> > >
> > > On 03/27 06:04, Andrea Conti wrote:
> > > > Hello,
> > > >
> > > > > Thread(s) per core:              1 <<<<<
> > > > > Does my CPU hyperthread?
> > > >
> > > > Definitely not.
> > > >
> > > > Your kernel config is fine, chances are hyperthreading (aka "SMT
mode")
> > is
> > > > disabled in your BIOS settings.
> > > >
> > > > andrea
> > > >
> > >
> > > Hi Andrea,
> > >
> > > I checked that: The BIOS setting was set to use hyperthreading.
> > >
> > > But "Number of cores" was set to six. I changed that to 12 and
> > > Voila! I got two threads per core.
> > >
> > > I think "Number of cores" is a little misleading, since there
> > > are six physical cores (not threads) with a RYZEN 5.
> > >
> > > I feeling not that comfortable with this solution.
> > >
> > > Is there any way to check for the validity of this setting
> > > beside a tool, which prints a "2" after the word "threads" ;) ?
> > >
> > > Cheers!
> > > Meino
> > >
> > >
> >
> > cat /proc/cpu should give info for each thread. I've been running an i7
980
> > Extreme processor @3.33GHz here at home for about 12 years or so. It's 6
> > cores but shows 12 processors on both Gentoo and now Kubuntu.
> >
> > I generally run top and then hit '1' and 'z'. You can watch what
percentage
> > each core/thread is using.
> >
> > Time a BIG compile job twice, once with each kernel. If it's working
you'll
> > measure a significant difference in time. Note that it won't be 2x as
> > you'll also be limited by disk read/write throughput, but you'll know
it's
> > basically working.
> >
> > On Gentoo make sure you're compile settings in (I think make.conf - I no
> > longer run Gentoo much) are set to take advantage of all your cores and
not
> > limited to something smaller. Also watch overheating when using more
> > cores/threads. On older PCs like mine when you possibly have dust in CPU
> > coolers might not be as efficient as when they are new.
> >
> > HTH,
> > Mark
>
> Hi Mark,
>
> thank you for your explanations! :)
>
> /proc/cpu doesn't exist on my system....may be you are referring to
> /proc/cpuinfo?
>
> The problem was caused by a kernel misconfiguration by me.
>
> In the kernel setup there is a setting "Number of cores" which
> I had set to six ... since my CPU has 6 physical core.
>
> Setting this to twelve (and blurring the syntactically border between
> threads and cores thereby...) gives me twelves cores in top, htop
> and such and (as an example) compiling the kernel is faster -
> so it is not a display gimmick only.
>
> I think "Number of cores" is a misnomer...or am I wrong?
>
> Cheers!
> Meino
>

Meino,
   Yes, /proc/cpuinfo. Sorry.

   Well yes, I guess the 'Number of cores' is a misnomer if you're trying
to equate the language in the kernel against Intel/AMD marketing data for
physical cores. 6 physical cores with or without hyperthreading is still 6
physical cores. However 6 physical cores (my processor) _WITH_
hyperthreading enabled is 12 _LOGICAL_ cores which is more what I think the
kernel verbiage is about. Semantics I suppose.

   I'm glad you found it wasn't a gimmicky number. It really does work,
within the limits of the hardware being able to figure out what one thread
should be fetching or writing while the other thread is computing. It's not
a perfect 2:1 like 12 physical cores might be, but it's a lot less silicon
and therefore a lot less expensive.

Cheers,
Mark

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

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

* Re: [gentoo-user] RYZEN 5: Hyperthreading or no hyperthreading...
  2020-03-28 12:59         ` Mark Knecht
@ 2020-03-28 13:24           ` tuxic
  2020-03-30 22:17             ` james
  0 siblings, 1 reply; 10+ messages in thread
From: tuxic @ 2020-03-28 13:24 UTC (permalink / raw
  To: gentoo-user

On 03/28 05:59, Mark Knecht wrote:
> On Fri, Mar 27, 2020 at 10:58 PM <tuxic@posteo.de> wrote:
> >
> > On 03/27 11:51, Mark Knecht wrote:
> > > On Fri, Mar 27, 2020 at 11:11 AM <tuxic@posteo.de> wrote:
> > > >
> > > > On 03/27 06:04, Andrea Conti wrote:
> > > > > Hello,
> > > > >
> > > > > > Thread(s) per core:              1 <<<<<
> > > > > > Does my CPU hyperthread?
> > > > >
> > > > > Definitely not.
> > > > >
> > > > > Your kernel config is fine, chances are hyperthreading (aka "SMT
> mode")
> > > is
> > > > > disabled in your BIOS settings.
> > > > >
> > > > > andrea
> > > > >
> > > >
> > > > Hi Andrea,
> > > >
> > > > I checked that: The BIOS setting was set to use hyperthreading.
> > > >
> > > > But "Number of cores" was set to six. I changed that to 12 and
> > > > Voila! I got two threads per core.
> > > >
> > > > I think "Number of cores" is a little misleading, since there
> > > > are six physical cores (not threads) with a RYZEN 5.
> > > >
> > > > I feeling not that comfortable with this solution.
> > > >
> > > > Is there any way to check for the validity of this setting
> > > > beside a tool, which prints a "2" after the word "threads" ;) ?
> > > >
> > > > Cheers!
> > > > Meino
> > > >
> > > >
> > >
> > > cat /proc/cpu should give info for each thread. I've been running an i7
> 980
> > > Extreme processor @3.33GHz here at home for about 12 years or so. It's 6
> > > cores but shows 12 processors on both Gentoo and now Kubuntu.
> > >
> > > I generally run top and then hit '1' and 'z'. You can watch what
> percentage
> > > each core/thread is using.
> > >
> > > Time a BIG compile job twice, once with each kernel. If it's working
> you'll
> > > measure a significant difference in time. Note that it won't be 2x as
> > > you'll also be limited by disk read/write throughput, but you'll know
> it's
> > > basically working.
> > >
> > > On Gentoo make sure you're compile settings in (I think make.conf - I no
> > > longer run Gentoo much) are set to take advantage of all your cores and
> not
> > > limited to something smaller. Also watch overheating when using more
> > > cores/threads. On older PCs like mine when you possibly have dust in CPU
> > > coolers might not be as efficient as when they are new.
> > >
> > > HTH,
> > > Mark
> >
> > Hi Mark,
> >
> > thank you for your explanations! :)
> >
> > /proc/cpu doesn't exist on my system....may be you are referring to
> > /proc/cpuinfo?
> >
> > The problem was caused by a kernel misconfiguration by me.
> >
> > In the kernel setup there is a setting "Number of cores" which
> > I had set to six ... since my CPU has 6 physical core.
> >
> > Setting this to twelve (and blurring the syntactically border between
> > threads and cores thereby...) gives me twelves cores in top, htop
> > and such and (as an example) compiling the kernel is faster -
> > so it is not a display gimmick only.
> >
> > I think "Number of cores" is a misnomer...or am I wrong?
> >
> > Cheers!
> > Meino
> >
> 
> Meino,
>    Yes, /proc/cpuinfo. Sorry.
> 
>    Well yes, I guess the 'Number of cores' is a misnomer if you're trying
> to equate the language in the kernel against Intel/AMD marketing data for
> physical cores. 6 physical cores with or without hyperthreading is still 6
> physical cores. However 6 physical cores (my processor) _WITH_
> hyperthreading enabled is 12 _LOGICAL_ cores which is more what I think the
> kernel verbiage is about. Semantics I suppose.
> 
>    I'm glad you found it wasn't a gimmicky number. It really does work,
> within the limits of the hardware being able to figure out what one thread
> should be fetching or writing while the other thread is computing. It's not
> a perfect 2:1 like 12 physical cores might be, but it's a lot less silicon
> and therefore a lot less expensive.
> 
> Cheers,
> Mark

Hi Mark,

In the meanwhile I found "glance" and installed it, which is the
bazooka-out-of-the-box-no-configuration terminal-brethren of "conky"
:) 

Enough plugins enabled (which come with it preinstalled), you can
watch in realtime, what each core/thread is doing right now...nearly. Big
Brother for the sustem with no bad intention in mind. I am only
curious :)

And you get your sensors diplayed, the workload of your GPU (nvidia in 
my case), all processes and lot lot more. 

The faster the CPU gets (my previous PC was 12 years old...), the
more the peripheral devices are becoming show stoppers ("stoppers"
in the barest truth of its meaning).

Unfortunatelu the SSD I ordered is in status "ready for delivery"
since 23.03.2020....corona....you know...

And with 12 cores enabled on a recent CPU and running for example a
bigger update via emerge (enabled for 12 threads of course)
....all the cores are simply waiting a lot
faster......for the harddisc :)

Thanks for your help -- stay healthy!

Cheers!
Meino





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

* Re: [gentoo-user] RYZEN 5: Hyperthreading or no hyperthreading...
  2020-03-28 13:24           ` tuxic
@ 2020-03-30 22:17             ` james
  2020-03-31  3:15               ` tuxic
  0 siblings, 1 reply; 10+ messages in thread
From: james @ 2020-03-30 22:17 UTC (permalink / raw
  To: gentoo-user

On 3/28/20 9:24 AM, tuxic@posteo.de wrote:
> On 03/28 05:59, Mark Knecht wrote:
>> On Fri, Mar 27, 2020 at 10:58 PM <tuxic@posteo.de> wrote:
>>>
>>> On 03/27 11:51, Mark Knecht wrote:
>>>> On Fri, Mar 27, 2020 at 11:11 AM <tuxic@posteo.de> wrote:
>>>>>
>>>>> On 03/27 06:04, Andrea Conti wrote:
>>>>>> Hello,
>>>>>>
>>>>>>> Thread(s) per core:              1 <<<<<
>>>>>>> Does my CPU hyperthread?
>>>>>>
>>>>>> Definitely not.
>>>>>>
>>>>>> Your kernel config is fine, chances are hyperthreading (aka "SMT
>> mode")
>>>> is
>>>>>> disabled in your BIOS settings.
>>>>>>
>>>>>> andrea
>>>>>>
>>>>>
>>>>> Hi Andrea,
>>>>>
>>>>> I checked that: The BIOS setting was set to use hyperthreading.
>>>>>
>>>>> But "Number of cores" was set to six. I changed that to 12 and
>>>>> Voila! I got two threads per core.
>>>>>
>>>>> I think "Number of cores" is a little misleading, since there
>>>>> are six physical cores (not threads) with a RYZEN 5.
>>>>>
>>>>> I feeling not that comfortable with this solution.
>>>>>
>>>>> Is there any way to check for the validity of this setting
>>>>> beside a tool, which prints a "2" after the word "threads" ;) ?
>>>>>
>>>>> Cheers!
>>>>> Meino
>>>>>
>>>>>
>>>>
>>>> cat /proc/cpu should give info for each thread. I've been running an i7
>> 980
>>>> Extreme processor @3.33GHz here at home for about 12 years or so. It's 6
>>>> cores but shows 12 processors on both Gentoo and now Kubuntu.
>>>>
>>>> I generally run top and then hit '1' and 'z'. You can watch what
>> percentage
>>>> each core/thread is using.
>>>>
>>>> Time a BIG compile job twice, once with each kernel. If it's working
>> you'll
>>>> measure a significant difference in time. Note that it won't be 2x as
>>>> you'll also be limited by disk read/write throughput, but you'll know
>> it's
>>>> basically working.
>>>>
>>>> On Gentoo make sure you're compile settings in (I think make.conf - I no
>>>> longer run Gentoo much) are set to take advantage of all your cores and
>> not
>>>> limited to something smaller. Also watch overheating when using more
>>>> cores/threads. On older PCs like mine when you possibly have dust in CPU
>>>> coolers might not be as efficient as when they are new.
>>>>
>>>> HTH,
>>>> Mark
>>>
>>> Hi Mark,
>>>
>>> thank you for your explanations! :)
>>>
>>> /proc/cpu doesn't exist on my system....may be you are referring to
>>> /proc/cpuinfo?
>>>
>>> The problem was caused by a kernel misconfiguration by me.
>>>
>>> In the kernel setup there is a setting "Number of cores" which
>>> I had set to six ... since my CPU has 6 physical core.
>>>
>>> Setting this to twelve (and blurring the syntactically border between
>>> threads and cores thereby...) gives me twelves cores in top, htop
>>> and such and (as an example) compiling the kernel is faster -
>>> so it is not a display gimmick only.
>>>
>>> I think "Number of cores" is a misnomer...or am I wrong?
>>>
>>> Cheers!
>>> Meino
>>>
>>
>> Meino,
>>     Yes, /proc/cpuinfo. Sorry.
>>
>>     Well yes, I guess the 'Number of cores' is a misnomer if you're trying
>> to equate the language in the kernel against Intel/AMD marketing data for
>> physical cores. 6 physical cores with or without hyperthreading is still 6
>> physical cores. However 6 physical cores (my processor) _WITH_
>> hyperthreading enabled is 12 _LOGICAL_ cores which is more what I think the
>> kernel verbiage is about. Semantics I suppose.
>>
>>     I'm glad you found it wasn't a gimmicky number. It really does work,
>> within the limits of the hardware being able to figure out what one thread
>> should be fetching or writing while the other thread is computing. It's not
>> a perfect 2:1 like 12 physical cores might be, but it's a lot less silicon
>> and therefore a lot less expensive.
>>
>> Cheers,
>> Mark
> 
> Hi Mark,
> 
> In the meanwhile I found "glance" and installed it, which is the
> bazooka-out-of-the-box-no-configuration terminal-brethren of "conky"
> :)
> 
> Enough plugins enabled (which come with it preinstalled), you can
> watch in realtime, what each core/thread is doing right now...nearly. Big
> Brother for the sustem with no bad intention in mind. I am only
> curious :)
> 
> And you get your sensors diplayed, the workload of your GPU (nvidia in
> my case), all processes and lot lot more.
> 
> The faster the CPU gets (my previous PC was 12 years old...), the
> more the peripheral devices are becoming show stoppers ("stoppers"
> in the barest truth of its meaning).
> 
> Unfortunatelu the SSD I ordered is in status "ready for delivery"
> since 23.03.2020....corona....you know...
> 
> And with 12 cores enabled on a recent CPU and running for example a
> bigger update via emerge (enabled for 12 threads of course)
> ...all the cores are simply waiting a lot
> faster......for the harddisc :)
> 
> Thanks for your help -- stay healthy!
> 
> Cheers!
> Meino

Meino,

You might like the organization and details of

"sys-process/htop"

to look at cores and processes.


hth,
James



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

* Re: [gentoo-user] RYZEN 5: Hyperthreading or no hyperthreading...
  2020-03-30 22:17             ` james
@ 2020-03-31  3:15               ` tuxic
  0 siblings, 0 replies; 10+ messages in thread
From: tuxic @ 2020-03-31  3:15 UTC (permalink / raw
  To: gentoo-user

On 03/30 06:17, james wrote:
> On 3/28/20 9:24 AM, tuxic@posteo.de wrote:
> > On 03/28 05:59, Mark Knecht wrote:
> > > On Fri, Mar 27, 2020 at 10:58 PM <tuxic@posteo.de> wrote:
> > > > 
> > > > On 03/27 11:51, Mark Knecht wrote:
> > > > > On Fri, Mar 27, 2020 at 11:11 AM <tuxic@posteo.de> wrote:
> > > > > > 
> > > > > > On 03/27 06:04, Andrea Conti wrote:
> > > > > > > Hello,
> > > > > > > 
> > > > > > > > Thread(s) per core:              1 <<<<<
> > > > > > > > Does my CPU hyperthread?
> > > > > > > 
> > > > > > > Definitely not.
> > > > > > > 
> > > > > > > Your kernel config is fine, chances are hyperthreading (aka "SMT
> > > mode")
> > > > > is
> > > > > > > disabled in your BIOS settings.
> > > > > > > 
> > > > > > > andrea
> > > > > > > 
> > > > > > 
> > > > > > Hi Andrea,
> > > > > > 
> > > > > > I checked that: The BIOS setting was set to use hyperthreading.
> > > > > > 
> > > > > > But "Number of cores" was set to six. I changed that to 12 and
> > > > > > Voila! I got two threads per core.
> > > > > > 
> > > > > > I think "Number of cores" is a little misleading, since there
> > > > > > are six physical cores (not threads) with a RYZEN 5.
> > > > > > 
> > > > > > I feeling not that comfortable with this solution.
> > > > > > 
> > > > > > Is there any way to check for the validity of this setting
> > > > > > beside a tool, which prints a "2" after the word "threads" ;) ?
> > > > > > 
> > > > > > Cheers!
> > > > > > Meino
> > > > > > 
> > > > > > 
> > > > > 
> > > > > cat /proc/cpu should give info for each thread. I've been running an i7
> > > 980
> > > > > Extreme processor @3.33GHz here at home for about 12 years or so. It's 6
> > > > > cores but shows 12 processors on both Gentoo and now Kubuntu.
> > > > > 
> > > > > I generally run top and then hit '1' and 'z'. You can watch what
> > > percentage
> > > > > each core/thread is using.
> > > > > 
> > > > > Time a BIG compile job twice, once with each kernel. If it's working
> > > you'll
> > > > > measure a significant difference in time. Note that it won't be 2x as
> > > > > you'll also be limited by disk read/write throughput, but you'll know
> > > it's
> > > > > basically working.
> > > > > 
> > > > > On Gentoo make sure you're compile settings in (I think make.conf - I no
> > > > > longer run Gentoo much) are set to take advantage of all your cores and
> > > not
> > > > > limited to something smaller. Also watch overheating when using more
> > > > > cores/threads. On older PCs like mine when you possibly have dust in CPU
> > > > > coolers might not be as efficient as when they are new.
> > > > > 
> > > > > HTH,
> > > > > Mark
> > > > 
> > > > Hi Mark,
> > > > 
> > > > thank you for your explanations! :)
> > > > 
> > > > /proc/cpu doesn't exist on my system....may be you are referring to
> > > > /proc/cpuinfo?
> > > > 
> > > > The problem was caused by a kernel misconfiguration by me.
> > > > 
> > > > In the kernel setup there is a setting "Number of cores" which
> > > > I had set to six ... since my CPU has 6 physical core.
> > > > 
> > > > Setting this to twelve (and blurring the syntactically border between
> > > > threads and cores thereby...) gives me twelves cores in top, htop
> > > > and such and (as an example) compiling the kernel is faster -
> > > > so it is not a display gimmick only.
> > > > 
> > > > I think "Number of cores" is a misnomer...or am I wrong?
> > > > 
> > > > Cheers!
> > > > Meino
> > > > 
> > > 
> > > Meino,
> > >     Yes, /proc/cpuinfo. Sorry.
> > > 
> > >     Well yes, I guess the 'Number of cores' is a misnomer if you're trying
> > > to equate the language in the kernel against Intel/AMD marketing data for
> > > physical cores. 6 physical cores with or without hyperthreading is still 6
> > > physical cores. However 6 physical cores (my processor) _WITH_
> > > hyperthreading enabled is 12 _LOGICAL_ cores which is more what I think the
> > > kernel verbiage is about. Semantics I suppose.
> > > 
> > >     I'm glad you found it wasn't a gimmicky number. It really does work,
> > > within the limits of the hardware being able to figure out what one thread
> > > should be fetching or writing while the other thread is computing. It's not
> > > a perfect 2:1 like 12 physical cores might be, but it's a lot less silicon
> > > and therefore a lot less expensive.
> > > 
> > > Cheers,
> > > Mark
> > 
> > Hi Mark,
> > 
> > In the meanwhile I found "glance" and installed it, which is the
> > bazooka-out-of-the-box-no-configuration terminal-brethren of "conky"
> > :)
> > 
> > Enough plugins enabled (which come with it preinstalled), you can
> > watch in realtime, what each core/thread is doing right now...nearly. Big
> > Brother for the sustem with no bad intention in mind. I am only
> > curious :)
> > 
> > And you get your sensors diplayed, the workload of your GPU (nvidia in
> > my case), all processes and lot lot more.
> > 
> > The faster the CPU gets (my previous PC was 12 years old...), the
> > more the peripheral devices are becoming show stoppers ("stoppers"
> > in the barest truth of its meaning).
> > 
> > Unfortunatelu the SSD I ordered is in status "ready for delivery"
> > since 23.03.2020....corona....you know...
> > 
> > And with 12 cores enabled on a recent CPU and running for example a
> > bigger update via emerge (enabled for 12 threads of course)
> > ...all the cores are simply waiting a lot
> > faster......for the harddisc :)
> > 
> > Thanks for your help -- stay healthy!
> > 
> > Cheers!
> > Meino
> 
> Meino,
> 
> You might like the organization and details of
> 
> "sys-process/htop"
> 
> to look at cores and processes.
> 
> 
> hth,
> James
> 
> 

James,

...is a companion of mine for a long time already - thanks
for your help!

Meino



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

end of thread, other threads:[~2020-03-31  3:15 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-03-27 16:20 [gentoo-user] RYZEN 5: Hyperthreading or no hyperthreading tuxic
2020-03-27 17:04 ` Andrea Conti
2020-03-27 18:11   ` tuxic
2020-03-27 18:51     ` Mark Knecht
2020-03-28  5:57       ` tuxic
2020-03-28 12:59         ` Mark Knecht
2020-03-28 13:24           ` tuxic
2020-03-30 22:17             ` james
2020-03-31  3:15               ` tuxic
2020-03-27 18:02 ` Jack

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