OPNsense
  • Home
  • Help
  • Search
  • Login
  • Register

  • OPNsense Forum »
  • English Forums »
  • Hardware and Performance »
  • Hyperthreading is available in 19.1.x?
« previous next »
  • Print
Pages: [1]

Author Topic: Hyperthreading is available in 19.1.x?  (Read 6923 times)

Ricardo

  • Full Member
  • ***
  • Posts: 233
  • Karma: 12
    • View Profile
Hyperthreading is available in 19.1.x?
« on: July 10, 2019, 02:05:20 pm »
Hi all,

is hyperthreading (HTT) available in opnsense 19.1.x? The APU2 I have seems to have HTT capability as per the dmesg CPU feature flags:

CPU: AMD GX-412TC SOC                                (998.15-MHz K8-class CPU)
  Origin="AuthenticAMD"  Id=0x730f01  Family=0x16  Model=0x30  Stepping=1
  Features=0x178bfbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CLFLUSH,MMX,FXSR,SSE,SSE2,HTT>  -> see at the very end

FreeBSD/SMP: Multiprocessor System Detected: 4 CPUs
FreeBSD/SMP: 1 package(s) x 4 core(s)

 and sysctl machdep.hyperthreading_allowed: 1 allows it.

Still, I only see 4 physical CPU cores according to:

hw.ncpu: 4

Are there any settings in the OS that prohibit the usage of HTT? Or is this a coreboot BIOS defect?
« Last Edit: July 12, 2019, 11:13:25 am by Ricardo »
Logged

mimugmail

  • Hero Member
  • *****
  • Posts: 6767
  • Karma: 494
    • View Profile
Re: Hyperthreading is vailable in 19.1.x?
« Reply #1 on: July 10, 2019, 02:12:44 pm »
Isn't this Intel-only .. ?
Logged
WWW: www.routerperformance.net
Support plans: https://www.max-it.de/en/it-services/opnsense/
Commercial Plugins (German): https://opnsense.max-it.de/

phoenix

  • Hero Member
  • *****
  • Posts: 545
  • Karma: 58
    • View Profile
Re: Hyperthreading is vailable in 19.1.x?
« Reply #2 on: July 10, 2019, 02:51:22 pm »
Quote from: mimugmail on July 10, 2019, 02:12:44 pm
Isn't this Intel-only .. ?
Yes HT Technology is Intel and the equivalent for AMD it is SMT (i.e. multiple threads) but the SOC model above appears to have 4 cores on the chip and that's just physical cores not SMT.
Logged
Regards


Bill

Ricardo

  • Full Member
  • ***
  • Posts: 233
  • Karma: 12
    • View Profile
Re: Hyperthreading is vailable in 19.1.x?
« Reply #3 on: July 11, 2019, 10:27:31 am »
Quote from: phoenix on July 10, 2019, 02:51:22 pm
Quote from: mimugmail on July 10, 2019, 02:12:44 pm
Isn't this Intel-only .. ?
Yes HT Technology is Intel and the equivalent for AMD it is SMT (i.e. multiple threads) but the SOC model above appears to have 4 cores on the chip and that's just physical cores not SMT.

I dont know, if HTT is restricted to be present only in intel CPUs or not, but this AMD CPU clearly adcertises that CPU feature flag. If it in fact does not support HTT, it should not advertise such capability.
Logged

mimugmail

  • Hero Member
  • *****
  • Posts: 6767
  • Karma: 494
    • View Profile
Re: Hyperthreading is vailable in 19.1.x?
« Reply #4 on: July 11, 2019, 12:10:43 pm »
This has to be checked with the hardware vendor I'd guess
Logged
WWW: www.routerperformance.net
Support plans: https://www.max-it.de/en/it-services/opnsense/
Commercial Plugins (German): https://opnsense.max-it.de/

Ricardo

  • Full Member
  • ***
  • Posts: 233
  • Karma: 12
    • View Profile
Re: Hyperthreading is vailable in 19.1.x?
« Reply #5 on: July 11, 2019, 02:46:57 pm »
Quote from: mimugmail on July 11, 2019, 12:10:43 pm
This has to be checked with the hardware vendor I'd guess

Actually, I just checked this strange behavior on my 11 yr old Intel Core 2 Duo machine. No Core 2 duo (or Quad, for the record) ever supported Hyperthreading. Thats for sure. Still, that CPU also reports "HTT" in the dmesg under Freebsd 12.0. But it reports only 2x CPU cores afterwards. So somebody is lying here... either BSD detects it totally wrong, or HTT doesnt mean HyperThreading in the CPU capability flag list.
Logged

mimugmail

  • Hero Member
  • *****
  • Posts: 6767
  • Karma: 494
    • View Profile
Re: Hyperthreading is vailable in 19.1.x?
« Reply #6 on: July 11, 2019, 05:02:08 pm »
But for sure, it's not related to OPNsense ...
Logged
WWW: www.routerperformance.net
Support plans: https://www.max-it.de/en/it-services/opnsense/
Commercial Plugins (German): https://opnsense.max-it.de/

tillsense

  • Sr. Member
  • ****
  • Posts: 325
  • Karma: 49
    • View Profile
Re: Hyperthreading is vailable in 19.1.x?
« Reply #7 on: July 11, 2019, 07:54:27 pm »
Hi all,

the HTT flag of AMD GX-412TC is multithreading no hyperthreading and no simultaneous multithreading (SMT)! These are 3 different technologies. The APU2 has only 4 real cores.

cheers
till
Logged

Ricardo

  • Full Member
  • ***
  • Posts: 233
  • Karma: 12
    • View Profile
Re: Hyperthreading is vailable in 19.1.x?
« Reply #8 on: July 12, 2019, 11:09:55 am »
@mimugmail: sorry, but I think it does make sense to raise this topic in the hardware section for opnsense.

@tillsense: What you said, is a little bit unclear to me. I do know what Intel HTT does. I do understand, that HTT is a vendor-branding name for the concept called Symmetric Multithreading, SMT. What I dont really understand, how AMD implemented their own version of SMT.

Does that mean that 1 single core of the GX-412TC can execute 2 threads in parallel, but its not called as Hyperthreading, so the logical CPU count actually equals the physical CPU core count, and the SMT magic is hidden from the OS schedulers eyes?

I am curious whether machdep.hyperthreading_allowed="0" should be set, if HTT is not supported by this CPU, but multithreading is?

Update: according to wikipedia, Jaguar class CPUs (like the GX-412TC) do not feature Clustered MultiThread (CMT), the type of SMT we are speculating as incorrectly marked as HTT capability

Jaguar does not feature clustered multi-thread (CMT), meaning that execution resources are not shared between cores
Source:
https://en.m.wikipedia.org/wiki/Jaguar_(microarchitecture)
« Last Edit: July 12, 2019, 01:24:30 pm by Ricardo »
Logged

tillsense

  • Sr. Member
  • ****
  • Posts: 325
  • Karma: 49
    • View Profile
Re: Hyperthreading is available in 19.1.x?
« Reply #9 on: July 12, 2019, 08:50:48 pm »
Hi all,

there's a good explanation here:

https://stackoverflow.com/questions/14143329/difference-b-w-hyper-threading-and-multithreading

cheers
till
Logged

Ricardo

  • Full Member
  • ***
  • Posts: 233
  • Karma: 12
    • View Profile
Re: Hyperthreading is available in 19.1.x?
« Reply #10 on: July 13, 2019, 11:41:47 am »
I have read the linked page, but not sure if I understood it fully.

In laymans term,
a) do you think the advertising of CPU feature flag HTT in this specific case is false or correct info?
b) for a 4core CPU should any OS report 4 logical cores or 8?
c) setting sysctl HTT enable/disable should have any effect, or its completely irrelevant, as this CPU is simply a non-HTT architecture?
d) if the OS does not see the SMT parts if this CPU, can the behavior of such CPU be adjusted from OS side, or simply no performance tuning can be set?
Logged

Ricardo

  • Full Member
  • ***
  • Posts: 233
  • Karma: 12
    • View Profile
Re: Hyperthreading is available in 19.1.x?
« Reply #11 on: July 17, 2019, 04:17:26 pm »
Well, I seem always asking too much...
Logged

mimugmail

  • Hero Member
  • *****
  • Posts: 6767
  • Karma: 494
    • View Profile
Re: Hyperthreading is available in 19.1.x?
« Reply #12 on: July 17, 2019, 05:28:43 pm »
You should ask at pcengines forum, there are the experts for this device
Logged
WWW: www.routerperformance.net
Support plans: https://www.max-it.de/en/it-services/opnsense/
Commercial Plugins (German): https://opnsense.max-it.de/

  • Print
Pages: [1]
« previous next »
  • OPNsense Forum »
  • English Forums »
  • Hardware and Performance »
  • Hyperthreading is available in 19.1.x?
 

OPNsense is an OSS project © Deciso B.V. 2015 - 2024 All rights reserved
  • SMF 2.0.19 | SMF © 2021, Simple Machines
    Privacy Policy
    | XHTML | RSS | WAP2