Unix & Linux Stack Exchange
Q&A for users of Linux, FreeBSD and other Unix-like operating systems
Latest Questions
8
votes
1
answers
710
views
Kernel shows SMT as "notsupported" for AMD 3970x
I have a Threadripper 3970x that has 32 cores and 64 threads. I installed Linux and the kernel shows SMT as being "notsupported": root@services:~# cat /sys/devices/system/cpu/smt/control notsupported Kernel version: 6.8.12-11-pve I know that SMT is supported for this CPU. I have also enabled SMT in...
I have a Threadripper 3970x that has 32 cores and 64 threads. I installed Linux and the kernel shows SMT as being "notsupported":
root@services:~# cat /sys/devices/system/cpu/smt/control
notsupported
Kernel version: 6.8.12-11-pve
I know that SMT is supported for this CPU. I have also enabled SMT in the BIOS.
When I first did a
lscpu
I found there were vulnerabilities that disabled SMT. So I added mitigations=off
to the GRUB_CMDLINE_LINUX_DEFAULT
line in /etc/default/grub
:
GRUB_CMDLINE_LINUX_DEFAULT="quiet amd_iommu=on mitigations=off"
After running update-grub
and a reboot the mitigations were disabled, but SMT was still not enabled. This is the current output of lscpu
showing the mitigations were disabled and still no SMT support:
root@services:~# lscpu
Architecture: x86_64
CPU op-mode(s): 32-bit, 64-bit
Address sizes: 43 bits physical, 48 bits virtual
Byte Order: Little Endian
CPU(s): 32
On-line CPU(s) list: 0-31
Vendor ID: AuthenticAMD
BIOS Vendor ID: Advanced Micro Devices, Inc.
Model name: AMD Ryzen Threadripper 3970X 32-Core Processor
BIOS Model name: AMD Ryzen Threadripper 3970X 32-Core Processor Unknown CPU @ 3.7GHz
BIOS CPU family: 107
CPU family: 23
Model: 49
Thread(s) per core: 1
Core(s) per socket: 32
Socket(s): 1
Stepping: 0
Frequency boost: enabled
CPU(s) scaling MHz: 82%
CPU max MHz: 4549.1211
CPU min MHz: 2200.0000
BogoMIPS: 7399.55
Flags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr ss
e sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm constant_tsc rep_good nopl nonstop_t
sc cpuid extd_apicid aperfmperf rapl pni pclmulqdq monitor ssse3 fma cx16 sse4_1 sse4_2 mov
be popcnt aes xsave avx f16c rdrand lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a mis
alignsse 3dnowprefetch osvw ibs skinit wdt tce topoext perfctr_core perfctr_nb bpext perfct
r_llc mwaitx cpb cat_l3 cdp_l3 hw_pstate ssbd mba ibpb stibp vmmcall fsgsbase bmi1 avx2 sme
p bmi2 cqm rdt_a rdseed adx smap clflushopt clwb sha_ni xsaveopt xsavec xgetbv1 cqm_llc cqm
_occup_llc cqm_mbm_total cqm_mbm_local clzero irperf xsaveerptr rdpru wbnoinvd amd_ppin ara
t npt lbrv svm_lock nrip_save tsc_scale vmcb_clean flushbyasid decodeassists pausefilter pf
threshold avic v_vmsave_vmload vgif v_spec_ctrl umip rdpid overflow_recov succor smca sev s
ev_es
Virtualization features:
Virtualization: AMD-V
Caches (sum of all):
L1d: 1 MiB (32 instances)
L1i: 1 MiB (32 instances)
L2: 16 MiB (32 instances)
L3: 128 MiB (8 instances)
NUMA:
NUMA node(s): 1
NUMA node0 CPU(s): 0-31
Vulnerabilities:
Gather data sampling: Not affected
Itlb multihit: Not affected
L1tf: Not affected
Mds: Not affected
Meltdown: Not affected
Mmio stale data: Not affected
Reg file data sampling: Not affected
Retbleed: Vulnerable
Spec rstack overflow: Vulnerable
Spec store bypass: Vulnerable
Spectre v1: Vulnerable: __user pointer sanitization and usercopy barriers only; no swapgs barriers
Spectre v2: Vulnerable; IBPB: disabled; STIBP: disabled; PBRSB-eIBRS: Not affected; BHI: Not affected
Srbds: Not affected
Tsx async abort: Not affected
When I run dmidecode
this is the output for the cpu section:
Processor Information
Socket Designation: SP3r2
Type: Central Processor
Family: Zen
Manufacturer: Advanced Micro Devices, Inc.
ID: 10 0F 83 00 FF FB 8B 17
Signature: Family 23, Model 49, Stepping 0
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 Threadripper 3970X 32-Core Processor
Voltage: 1.1 V
External Clock: 100 MHz
Max Speed: 4550 MHz
Current Speed: 3700 MHz
Status: Populated, Enabled
Upgrade: Socket SP3r2
L1 Cache Handle: 0x001A
L2 Cache Handle: 0x001B
L3 Cache Handle: 0x001C
Serial Number: Unknown
Asset Tag: Unknown
Part Number: Unknown
Core Count: 32
Core Enabled: 32
Thread Count: 64
Characteristics:
64-bit capable
Multi-Core
Hardware Thread
Execute Protection
Enhanced Virtualization
Power/Performance Control
So dmidecode
shows that the CPU is capable of hyperthreading, I just can't figure out how to enable it.
Why would SMT be marked as "notsupported" and, if possible, how can I enable it?
JackCarmichael
(181 rep)
Jun 22, 2025, 10:55 PM
• Last activity: Jun 26, 2025, 06:25 PM
1
votes
1
answers
128
views
How to measure actual CPU utilization in Linux for multi core applications?
I have a computation intensive process that I need to run multiple times on a multi-core processor but "top" isn't showing utilization or load in a useful way. For example, imagine my task runs in 1 minute in a single thread on a single core of my six core, 12 thread, SMT CPU. If I start the same ta...
I have a computation intensive process that I need to run multiple times on a multi-core processor but "top" isn't showing utilization or load in a useful way.
For example, imagine my task runs in 1 minute in a single thread on a single core of my six core, 12 thread, SMT CPU. If I start the same task six times using six threads, it still finishes in 1 minute and top shows the load average as 6.0 and the cpu(s) at 50% us and 50% id. In the top process list, each of the six processes is showing 100% CPU. If I do the same thing but start 12 threads, it finishes the 12 jobs in 2 minutes and top shows the load average as 12.0, cpu(s) at 100% us 0% id, with 12 processes each at 100% CPU.
Now, the 6 thread and 12 thread examples are both processing at the same fully loaded rate of completing 1/6 job per minute but why does top show the 6-thread case being 50% idle when clearly it isn't? Is there a better way of determining the actual load of the CPUs?
This was run on a Ryzen 5600X processor on Ubuntu 24.12.
Edit: top output for 12 tasks:
top - 08:35:37 up 54 days, 20:49, 3 users, load average: 12.20, 6.70, 2.80
Tasks: 346 total, 13 running, 332 sleeping, 0 stopped, 1 zombie
%Cpu(s): 98.2 us, 1.7 sy, 0.0 ni, 0.0 id, 0.0 wa, 0.0 hi, 0.1 si, 0.0 st
MiB Mem : 64221.7 total, 1572.7 free, 4983.4 used, 58684.1 buff/cache
MiB Swap: 8192.0 total, 7863.7 free, 328.3 used. 59238.3 avail Mem
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
2249765 user 20 0 126952 64132 51200 R 100.0 0.1 3:48.87 sonicLiquidFoam
2249759 user 20 0 127060 64220 51200 R 100.0 0.1 3:48.93 sonicLiquidFoam
2249757 user 20 0 126624 64064 51328 R 100.0 0.1 3:49.32 sonicLiquidFoam
2249761 user 20 0 128276 64868 50688 R 100.0 0.1 3:47.65 sonicLiquidFoam
2249762 user 20 0 127652 63688 50432 R 100.0 0.1 3:49.13 sonicLiquidFoam
2249755 user 20 0 128844 66128 51200 R 100.0 0.1 3:46.06 sonicLiquidFoam
2249766 user 20 0 126576 63952 51328 R 100.0 0.1 3:47.87 sonicLiquidFoam
2249764 user 20 0 126612 63824 51072 R 99.0 0.1 3:48.59 sonicLiquidFoam
2249760 user 20 0 126888 63972 51072 R 98.7 0.1 3:45.06 sonicLiquidFoam
2249758 user 20 0 127500 64860 51200 R 97.7 0.1 3:48.64 sonicLiquidFoam
2249763 user 20 0 127916 64944 51072 R 97.0 0.1 3:39.58 sonicLiquidFoam
2249756 user 20 0 126828 63948 51072 R 96.0 0.1 3:48.77 sonicLiquidFoam
For 6 tasks:
top - 08:40:22 up 54 days, 20:53, 3 users, load average: 6.11, 6.67, 3.90
Tasks: 335 total, 7 running, 327 sleeping, 0 stopped, 1 zombie
%Cpu(s): 50.0 us, 1.0 sy, 0.0 ni, 49.0 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st
MiB Mem : 64221.7 total, 1616.2 free, 4914.6 used, 58710.3 buff/cache
MiB Swap: 8192.0 total, 7863.7 free, 328.3 used. 59307.1 avail Mem
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
2250032 user 20 0 127392 64676 51200 R 100.0 0.1 2:39.15 sonicLiquidFoam
2250027 user 20 0 126828 63096 50176 R 100.0 0.1 2:39.23 sonicLiquidFoam
2250028 user 20 0 127060 63260 50176 R 100.0 0.1 2:39.23 sonicLiquidFoam
2250029 user 20 0 128844 66124 51200 R 100.0 0.1 2:39.12 sonicLiquidFoam
2250030 user 20 0 128276 65508 51200 R 100.0 0.1 2:39.21 sonicLiquidFoam
2250031 user 20 0 126596 63808 51072 R 100.0 0.1 2:39.21 sonicLiquidFoam
tkw954
(113 rep)
Apr 23, 2025, 07:35 PM
• Last activity: Apr 24, 2025, 02:43 PM
85
votes
15
answers
230782
views
Checking if HyperThreading is enabled or not?
How can I check if hyperthreading is enabled on a Linux machine, using a perl script to check for it? I'm trying the following way: dmidecode -t processor | grep HTT Let me know if I'm on right track.
How can I check if hyperthreading is enabled on a Linux machine, using a perl script to check for it?
I'm trying the following way:
dmidecode -t processor | grep HTT
Let me know if I'm on right track.
doubledecker
(1897 rep)
Mar 5, 2012, 09:13 AM
• Last activity: Jan 22, 2025, 09:51 PM
1
votes
3
answers
6130
views
How hyperthreading is useful in kvm based guest VM?
We are creating virtual os threads inside guest os but the actual physical core is on the host machine. Will `hyperthread = true` in guest VM config make any difference? I can visualize how hyperthreading works on the host as it has a physical core, but VM has virtualized os threads so it hard for m...
We are creating virtual os threads inside guest os but the actual physical core is on the host machine. Will
hyperthread = true
in guest VM config make any difference?
I can visualize how hyperthreading works on the host as it has a physical core, but VM has virtualized os threads so it hard for me to visualize hyperthreading inside a VM.
Can someone please explain to me how it will be useful.
Karthik Nedunchezhiyan
(825 rep)
Mar 6, 2020, 04:53 AM
• Last activity: Sep 25, 2024, 06:21 AM
3
votes
2
answers
778
views
Why does higher CPU-usage slow down a task?
I am using [whisper.cpp][1] to transcribe some sound files. It is a very CPU heavy process so I try to find some optimal settings and therefore I have done some tests with the thread setting (-t) but the results are super confusing. This is the command I execute: date; time ./main -t [number of thre...
I am using whisper.cpp to transcribe some sound files. It is a very CPU heavy process so I try to find some optimal settings and therefore I have done some tests with the thread setting (-t) but the results are super confusing. This is the command I execute:
date; time ./main -t [number of threads] -m ggml-model.bin -f 5min-16kHz.wav; date
I run this on a Macbook Pro with an Intel i7 with 6 cores (+ 6 hyperthread cores).
I have tried with the default settings (4 threads), 6 and 12 threads (and 14 threads but that didn't produce any output although all CPUs run at 100 %). Here is the result:
Threads | output from time
-|-
4 | 1750.84s user 11.02s system 564% cpu 5:11.87 total
4 | 1862.04s user 18.63s system 553% cpu 5:39.58 total
6 | 2199.42s user 16.79s system 720% cpu 5:07.51 total
6 | 2212.72s user 14.49s system 722% cpu 5:08.22 total
12 | 4595.03s user 22.21s system 1053% cpu 7:18.47 total
12 | 4298.11s user 22.53s system 1059% cpu 6:47.85 total
As you can see, the CPU load increases as I increase the number of threads. You would expect the real time to decrease proportionally to the increase in CPU load (100 % for a minute should, approximately, correspond to 200 % for half a minute and 50 % for two minutes) but that doesn't happen here.
Instead I get approximately the same real time results with 4 and 6 threads while the CPU usage time increases with ≈ 25 % when running 6 threads. And 12 threads are even worse, the CPU-time doubles compared to 6 threads and the real time increases with 40 %.
I don't understand this. Of course, more threads don't scale linearly but **CPU time should remain quite constant when performing the same task, independently of how many threads, shouldn't it? And real time should decrease when CPU-usage increases?**
**And considering the task and my hardware, what should be a reasonable setting for the number of threads to use?** I was expecting it to be the number of cores + a little extra in case a thread waits for I/O. The sound file I process is 10 MB, whisper.cpp uses ≈ 3,6 GB on a computer with 32 GB (currently about 10 GB unused, memory pressure is "green").
----
Edit: corresponding values using only one thread (-t 1):
1619.90s user 20.86s system 197% cpu 13:48.78 total
Note that one thread used almost 200 % CPU. Not sure I understand that. But 13 minutes real time makes sense.
Edit 2: adding more CPUs (-p) made the performance worse.
-t 6 -p 3
- 6804.14s user 38.58s system 1040% cpu 10:57.84 total
(twice as much real time, 3-4 times more CPU-time)
-t 8 -p 2
- 10573.58s user 57.47s system 1018% cpu 17:23.63 total
(more than 3 times as much real time and 6 time as much CPU-time)
-t 4 -p 2
- 2962.38s user 28.65s system 854% cpu 5:50.01 total
(approximately the same as with -t 4)
I think -p only should be used if you want to limit how much this task affects the computer. Otherwise, it will just use as many processers as it can.
I don't think it is I/O. It reads 3,08 GB in the first 5-10 seconds and then less than 10 MB for the rest of the run (that lasts at least 5 minutes).
Edit 3: using -t 13
, that is, one more thread than my CPU supports, generates very odd results: 93213.70s user 450.23s system 978% cpu 2:39:36.88 total
No, I am not joking, more than 50x as much CPU-time as -t 4
, while CPU-usage is almost twice as high (978 % vs 564 %) and real-time increased more than 30x.
If I compare with -t 12
CPU-time increased by more than 20x, CPU usage is approximately the same, and real-time also increased by more than 20x. By just adding ONE more thread.
Something is iffy here, isn't it?
**Edit 4:**
Selected benchmark data
./bench -m ./models/ggml-small.en.bin -t 4
system_info: n_threads = 4 / 12 | AVX = 1 | AVX2 = 1 | AVX512 = 0 | FMA = 1 | NEON = 0 | ARM_FMA = 0 | F16C = 1 | FP16_VA = 0 | WASM_SIMD = 0 | BLAS = 1 | SSE3 = 1 | VSX = 0 |
whisper_print_timings: load time = 540.82 ms
whisper_print_timings: encode time = 3490.52 ms
whisper_print_timings: total time = 4031.40 ms
**5 threads are ≈ 8 % faster than 4 threads:**
whisper_print_timings: load time = 547.27 ms
whisper_print_timings: encode time = 3193.27 ms
whisper_print_timings: total time = 3740.58 ms
**6 threads are 1 % slower than 5 threads:**
whisper_print_timings: load time = 591.16 ms
whisper_print_timings: encode time = 3158.88 ms
whisper_print_timings: total time = 3750.10 ms
7 threads are 15 % slower than 6 threads. And it is downhill from there. I guess this task only uses the 6 "real" cores I have, not the hyperthreading cores. I theory I guess 6 threads should be faster than 5 but I guess the computer performs some other tasks that interrupts one of the threads and uses one core from time to time when running this benchmark.
**Edit 5:**
Running the benchmark with a -20 nice value gave some interesting results (just listing the total time here)
Threads Total time (ms) ∆ (negative is better)
4 3512 -13%
5 3510 -6%
6 3251 !! -13%
7 3962 -8%
∆ is compared with the same number of threads with normal priority. 6 threads with high priority is 19 % faster than the default settings with normal priority.
d-b
(2047 rep)
Feb 10, 2023, 04:49 PM
• Last activity: Feb 14, 2023, 04:52 PM
3
votes
1
answers
821
views
Hyper Threading and Process Priority
Are there any methods (linux kernel options, sysctl settings or configurable scheduler modules) that can cause a high priority process/thread to run on a physical processor core with the second (hyper threading) virtual core unscheduled in order to maximize single thread performance (by preventing f...
Are there any methods (linux kernel options, sysctl settings or configurable scheduler modules) that can cause a high priority process/thread to run on a physical processor core with the second (hyper threading) virtual core unscheduled in order to maximize single thread performance (by preventing from competitive situations, not sharing the L1 cache and the possible use of maximum cpu clock - Turbo Boost), while at the same time running lower priority processes/threads on both virtual cores of other physical cores with lower cpu clock to maximize total system throughput ?
In other words: __Is it possible to disable hyper threading dynamically based on priority ?__
In case there are any CPUs using the process/thread priority to decide which of the two threads on a hyper threading core is allowed to make progress first in a competitive situation, is the linux kernel able to schedule high priority processes/threads such that they share the physical core only with very low priority processes/threads in order to minimize their effect on the other thread ?
While the high priority process is sleeping, both virtual cores of its former physical core should again become available for lower priority processes, which makes it inappropriate to use
taskset
to exclude one physical core from the CPU affinity mask of all other processes.
Edit: With the advent of the [Alder Lake processor](https://en.wikipedia.org/wiki/Alder_Lake) with its hybrid architecture of performance and efficient cores, this question extends to:
__How to force low-priority processes to the efficient cores__ and keep the performance cores either idle (to save power) or reserved for high-priority processes (to reserve thermal budget in order to maximize [Turbo Boost](https://en.wikipedia.org/wiki/Intel_Turbo_Boost)) ?
Juergen
(754 rep)
Aug 24, 2017, 12:50 PM
• Last activity: Jan 28, 2023, 09:17 AM
1
votes
1
answers
1971
views
Processor affinity not respected by iperf threads
I'm running iperf in server mode on a Ubuntu box (14.04 LTS). The hardware is quad core with hyper-threading, so I have cores 0-7 available (0 is paired with 4, 1 with 5 and so on). I've set the processor affinity of the running iperf process to use only processors 0,1. I can verify this with taskse...
I'm running iperf in server mode on a Ubuntu box (14.04 LTS). The hardware is quad core with hyper-threading, so I have cores 0-7 available (0 is paired with 4, 1 with 5 and so on).
I've set the processor affinity of the running iperf process to use only processors 0,1. I can verify this with taskset:
$ taskset -pc 27745
pid 27745's current affinity list: 0,1
If I view the process in top or htop then the process correctly shows as only ever running on one of those cores. However, if I switch to thread view then I see the child threads running on arbitrary cores.
Is top/htop misleading me somehow? Can this genuinely happen? If so, why and how do I prevent it?
**EDIT**
I should comment that whilst I see this with iperf I'm not necessarily implying it's iperf specific. It just happens to be the setup I have. If I can't get to the bottom of this then I'll likely play around with other executables and see if the behaviour is reproducible.
Andrew Parker
(133 rep)
Jul 18, 2016, 08:18 AM
• Last activity: Dec 29, 2022, 10:00 AM
57
votes
3
answers
82145
views
VirtualBox: Is it a bad idea to assign more virtual CPU cores than number of physical CPU cores
VirtualBox: As I have [Hyper-Threading][1] capable CPU, I wonder: Is it a bad idea to assign more virtual CPU cores than a number of physical CPU cores as the following warning suggests (simply using all 8 virtual cores of 4 physical core CPU for instance): [
vm.swappiness
, 4GB for this VM), and so on.
Vlastimil Burián
(30505 rep)
Nov 25, 2016, 06:05 AM
• Last activity: Feb 13, 2022, 09:11 AM
0
votes
0
answers
68
views
Linux 5.10 E5-2666 V3 hyperthreading not detected
Per the title, I have a Supermicro X10-DRLi based machine with 2x E5-2666 V3 (the Amazon OEM CPUs) in it. Secure Boot, FWIW, is disabled. Linux 5.10 (debian 11 stock kernel, amd64) tells me via the `/sys/devices/system/cpu/smt/control` interface that SMT is 'notsupported'. According to Intel, it sho...
Per the title, I have a Supermicro X10-DRLi based machine with 2x E5-2666 V3 (the Amazon OEM CPUs) in it.
Secure Boot, FWIW, is disabled.
Linux 5.10 (debian 11 stock kernel, amd64) tells me via the
/sys/devices/system/cpu/smt/control
interface that SMT is 'notsupported'. According to Intel, it should be.
Where is the issue and how can I change it? Is it possible that the 'unusual' CPU is not being identified as HT capable? The HT flag is present in dmidecode
and /proc/cpuinfo
. And yes, HT is enabled in the BIOS, which is the latest for the MB.
lfabio
(131 rep)
Feb 9, 2022, 02:35 AM
3
votes
0
answers
329
views
How do I flag a process to avoid hyperthreading (SMT)?
Suppose I have an 18 core CPU with SMT enabled, and there are 18 long runnning processes, all using ~100% of a thread. If I start a 19th process, the kernel will schedule it to run on one of the cores, as a hypersibling of one of the 18 other processes. If that 19th process is something I want to ha...
Suppose I have an 18 core CPU with SMT enabled, and there are 18 long runnning processes, all using ~100% of a thread. If I start a 19th process, the kernel will schedule it to run on one of the cores, as a hypersibling of one of the 18 other processes.
If that 19th process is something I want to have complete faster without interrupting the first 18, I would want to ask the kernel to "give that one an entire core", and push one of the rest to be a hypersibling.
In other words, I want to flag the 19th process to never be scheduled on a thread which has a hypersibling in use by another process.
Using nice -20 does not seem to work for this purpose.
uLoop
(141 rep)
Dec 14, 2021, 10:04 PM
0
votes
0
answers
774
views
Determining the number of threads per EPYC AMD 7601 cpu
I'm trying to confirm that my AMD EPYC 7601 CPUs are set up with dual threading. I have 2 X 32 CPUs and should have 2 threads per CPU. When I run: ``` lscpu | grep -E '^Thread|^Core|^Socket|^CPU\(' ``` I get: CPU(s): 64 Thread(s) per core: 1 Core(s) per socket: 32 Socket(s): 2 Why are the Threads =...
I'm trying to confirm that my AMD EPYC 7601 CPUs are set up with dual threading.
I have 2 X 32 CPUs and should have 2 threads per CPU.
When I run:
lscpu | grep -E '^Thread|^Core|^Socket|^CPU\('
I get:
CPU(s): 64
Thread(s) per core: 1
Core(s) per socket: 32
Socket(s): 2
Why are the Threads = 1 and not = 2?
dtx1
(39 rep)
Nov 10, 2021, 01:20 AM
0
votes
1
answers
702
views
Linux Mint showing 1 thread per core in a 4 thread/core cpu
I have a [Ryzen 3 3200g](https://www.amd.com/en/products/apu/amd-ryzen-3-3200g) and, when I do lscpu in a Linux Mint 20.1 Cinnamon OS terminal, the output says that I only have 1 thread per core. The Windows system's info accurately recognizes that my CPU has 4 threads, so is Linux Mint having some...
I have a [Ryzen 3 3200g](https://www.amd.com/en/products/apu/amd-ryzen-3-3200g) and, when I do lscpu in a Linux Mint 20.1 Cinnamon OS terminal, the output says that I only have 1 thread per core. The Windows system's info accurately recognizes that my CPU has 4 threads, so is Linux Mint having some problem in recognize hyper-threading? If yes, how can i fix it?
Vitor_figm
(103 rep)
Jun 27, 2021, 02:47 AM
• Last activity: Jun 27, 2021, 04:48 AM
0
votes
1
answers
611
views
Does a process filling all logical cores have a negative impact on performance?
Because of hyper-threading, my CPU has 2 logical processors per core. If I understand the premise of hyper-threading correctly, it allows each core to have a separate cache and instruction pointer for 2 separate threads simultaneously, but does *not* allow for simultaneous execution of 2 threads by...
Because of hyper-threading, my CPU has 2 logical processors per core. If I understand the premise of hyper-threading correctly, it allows each core to have a separate cache and instruction pointer for 2 separate threads simultaneously, but does *not* allow for simultaneous execution of 2 threads by a single core. As such, it basically just mitigates the high overhead of thread swapping, meaning that the negative performance impact that occurs from having more threads running than cores to run them is reduced. I would, however, still expect that there would be *some* overhead involved, and *some* negative performance impact when running, for example, 16 threads on a system with only 8 physical cores.
It appears that the software running in my system believes I have 16 CPU cores, due to my hyper-threading with 8 physical cores. There is some software, such as certain build systems, that default to using all available cores in order to maximize parallelization. I know that I can specify the number of threads through arguments for the software I am thinking of. Am I correct in thinking that going beyond 8 threads will have no benefit to performance? Am I correct in thinking that going beyond 8 threads will actually impede performance? Should I, therefore, instruct the programs to use no more than 8 threads?
Charlim
(131 rep)
Aug 13, 2020, 11:10 PM
• Last activity: Aug 14, 2020, 11:48 PM
1
votes
1
answers
688
views
In Solaris box how do we check if hyper-threading/multi-threading is enabled or not using command?
In Solaris, how we can find the status or check hyper-threading or multi-threading is enabled or not using commands?
In Solaris, how we can find the status or check hyper-threading or multi-threading is enabled or not using commands?
sandeep
(11 rep)
Jun 11, 2020, 12:15 PM
• Last activity: Jun 11, 2020, 01:13 PM
3
votes
1
answers
835
views
How to reliably tell from Linux whether the CPU supports Hyperthreading, even if Hyperthreading is disabled?
The following is what I am doing to tell whether a processor does support HT or not, regardless of whether it is enabled or disabled: # dmidecode -t processor | grep "Hardware Thread" | wc -l If result is 0, then the processor does not support HT. If result is > 0, then it does. However, I'm not so...
The following is what I am doing to tell whether a processor does support HT or not, regardless of whether it is enabled or disabled:
# dmidecode -t processor | grep "Hardware Thread" | wc -l
If result is 0, then the processor does not support HT.
If result is > 0, then it does.
However, I'm not so sure if this is universally reliable. I've checked this at least with Ubuntu 16.04, 18.04, and SLES 12, with different Intel processors on a few servers (Xeons) and laptops (e.g. Core i5), and works well there. But would it reliably work for any processor (e.g. AMDs, even ARM maybe?) and in all distributions, by just checking whether
dmidecode
lists that exact text, "Hardware Thread"? Is there a safer way?
From what I can tell, for sure the HT flag listed by [lscpu
](https://linux.die.net/man/1/lscpu) is not at all the way to go, because it gets listed even for a core i5 processor, which does not support HT.
PS. The following posts do float around this topic, but whether Hyperthreading is enabled or not is a different matter:
https://unix.stackexchange.com/questions/33450/checking-if-hyperthreading-is-enabled-or-not ,
[How can I test if Ubuntu activated hyperthreading?](https://askubuntu.com/questions/72999/how-can-i-test-if-ubuntu-activated-hyperthreading)
Raulinbonn
(66 rep)
Feb 12, 2020, 09:44 AM
• Last activity: Feb 12, 2020, 01:41 PM
4
votes
1
answers
271
views
Can hyperthread be enabled
I would like to know if hyperthread can be enabled on my operating system or not? I am using HP-UX Itanium, below is truncated output of machinfo Intel(R) Itanium(R) Processor 9560 (2.53 GHz, 32 MB) 8 cores, 16 logical processors per socket 6.38 GT/s QPI, CPU version D0 Active processor count: 1 soc...
I would like to know if hyperthread can be enabled on my operating system or not? I am using HP-UX Itanium, below is truncated output of machinfo
Intel(R) Itanium(R) Processor 9560 (2.53 GHz, 32 MB)
8 cores, 16 logical processors per socket
6.38 GT/s QPI, CPU version D0
Active processor count:
1 socket
8 cores (8 per socket)
8 logical processors (8 per socket)
LCPU attribute is disabled
OS Info is as below:
Release: HP-UX B.11.31
Learning_DBAdmin
(159 rep)
Feb 24, 2019, 11:30 AM
• Last activity: Feb 24, 2019, 12:18 PM
3
votes
1
answers
151
views
CMOS occasionally resets hyperthreading. Can I force hyperthreading on using Linux kernel?
I have some i7-4700EQ based embedded server systems that require hyperthreading. All is good except that, on rare occasions, the hyperthreading flag in CMOS gets set to disabled. While the hardware is still in my possession, I can simply reboot, go into CMOS and fix the setting. (All other settings...
I have some i7-4700EQ based embedded server systems that require hyperthreading. All is good except that, on rare occasions, the hyperthreading flag in CMOS gets set to disabled. While the hardware is still in my possession, I can simply reboot, go into CMOS and fix the setting. (All other settings in CMOS stay good including the time/date so I'm thinking it isn't the battery.)
However, once deployed, there is no console access. If the CMOS setting is lost, the equipment could be "repaired" but that seems like a great deal of work for a very simple problem.
My understanding is that the Linux kernel reads the BIOS only to initialize kernel variables. Is that correct?
If that is correct, is there a way to tell the Linux kernel to ignore what the BIOS reports and simply enable hyperthreading in the kernel?
If possible, is there an easy way (eg grub command line setting) to do this? Else if possible but difficult, can ignoring what the BIOS says and enabling hyperthreading be accomplished by modifying kernel source and recompiling?
While I didn't think it would work, I already tried in /etc/default/grub
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash maxcpus=8 nr_cpus=8"
followed with using update-grub and rebooting. (I also tried setting maxcpus and nr_cpus individually.)
I have found numerous examples of disabling hyperthreading on a running system and then re-enabling it. But not examples of enabling if the kernel incorrectly thinks a human intentionally disabled hyperthreading.
Finally, I could claim "broken hardware" but that isn't going to win any "wars" on its own. If it is not possible to force hyperthreading to be enabled despite the BIOS, that is a valid answer - and the answer will be useful to me if it includes evidence / explanations why.
Hugh McCurdy
(53 rep)
Jan 22, 2019, 03:57 PM
• Last activity: Jan 22, 2019, 05:09 PM
7
votes
1
answers
5037
views
Should I disable hyperthreading when concerned about performance of single-threaded applications?
I use a i5-2410M processor, which is setup to do hyperthreading by default on my laptop. Considering that this is a 2-core processor, this means it can do 4 threads at a time. This also means that single-threaded applications only use a maximum of 25% of processing power, and I would rather have the...
I use a i5-2410M processor, which is setup to do hyperthreading by default on my laptop. Considering that this is a 2-core processor, this means it can do 4 threads at a time. This also means that single-threaded applications only use a maximum of 25% of processing power, and I would rather have them max at 50% instead. Will disabling hyperthreading have adverse effects (this is a development machine and runs a desktop)? Am I even reading **
top
** properly?
tshepang
(67482 rep)
Aug 12, 2011, 01:30 PM
• Last activity: Mar 17, 2018, 11:52 PM
2
votes
0
answers
2086
views
How to tell if the CPU supports hyper threading
I know it should be a simple matter of `grep -wl ht /proc/cpuinfo` but that's not always accurate. I have an i5-7440HQ CPU which doesn't support hyper-threading ( Intel , WikiPedia , and my BIOS agree on this). Yet `/proc/cpuinfo` and `dmidecode` both show that hyperthreading is supported (but disab...
I know it should be a simple matter of
grep -wl ht /proc/cpuinfo
but that's not always accurate.
I have an i5-7440HQ CPU which doesn't support hyper-threading (Intel, WikiPedia, and my BIOS agree on this).
Yet /proc/cpuinfo
and dmidecode
both show that hyperthreading is supported (but disabled). Kernel 4.10.8
When running a report of all machines that are HT capable, but have it disabled, this machine shows as a false positive... I'd like to fix that.
Is there a more accurate test that will show that this CPU really doesn't have HT?
**Edit:**
The related question https://unix.stackexchange.com/questions/33450/checking-if-hyperthreading-is-enabled-or-not asks how to tell if it's *enabled*, which is not what I'm asking. Some of the answers to that question mistakenly attempt to answer this question instead, but none of them provide a correct answer (as noted above).
TheAmigo
(383 rep)
Apr 7, 2017, 04:46 AM
• Last activity: Apr 12, 2017, 08:16 AM
-1
votes
1
answers
177
views
Are there UNIX variants or other OS which make user level threads visible to OS kernel?
Are there UNIX variants or other OS which make user level threads visible to OS kernel ?
Are there UNIX variants or other OS which make user level threads visible to OS kernel ?
bawejakunal
(169 rep)
Oct 4, 2016, 01:17 AM
• Last activity: Oct 4, 2016, 05:50 AM
Showing page 1 of 20 total questions