Questions tagged [hyperthreading]

In a hyperthreaded CPU, for each processor core that is physically present, the operating system addresses two virtual or logical cores, and shares the workload between them when possible.

In an hyper threaded environment, For each processor core that is physically present, the operating system addresses two virtual or logical cores, and shares the workload between them when possible.

This allows to decrease the number of dependent instructions on the pipeline. It takes advantage of superscalar architecture (multiple instructions operating on separate data in parallel).

223 questions
6
votes
2 answers

Why SCHED_FIFO threads are assigned to the same physical CPU even though idle CPUs are available?

While debugging some performance issue in app I'm working on, I found out weird behaviour of kernel scheduler. It seems that busy SCHED_FIFO tasks tend to be scheduled on logical cores from the same physical CPU even though there are idle physical…
terion
  • 35
  • 9
6
votes
15 answers

Does hyperthreading lead to unstable systems?

I'm building a PC with the new Intel I7 quad core processor. With hyperthreading turned on it will report 8 cores in Task Manager. Some of my colleagues are saying that hyperthreading will make the system unreliable and suggest turning it off. Can…
Simon Hughes
  • 3,534
  • 3
  • 24
  • 45
6
votes
4 answers

Turning off Hyper-Threading in 6-core Intel Xeon

We got a 12-core MacPro to do some Monte Carlo calculations. Its Intel Xeon processors have Hyper-Threading (HT) enabled, so in fact there should be 24 processes running in parallel to make them fully utilized. However, our calcs are more efficient…
Andrei Fokau
  • 225
  • 1
  • 4
  • 11
6
votes
1 answer

When does hyperthreading happen using MPI and OpenMP and PBS Pro?

On a shared memory system running Linux, say it has 4 Intel Xeon-E5 CPUs and each CPU has 10 cores. PBS Pro is installed. And for example users use qsub -l select=1:ncpu=30 to run software programs if they wanted to run on 30 cores. Or would do…
ron
  • 967
  • 6
  • 23
6
votes
1 answer

With Hyper Threading, threads of one physical core are exchanging via what level of cache L1/L2/L3?

Does the Hyper Threading allow to use of L1-cache to exchange the data between the two threads, which are executed simultaneously on a single physical core, but in two virtual cores? With the proviso that both belong to the same process, i.e. in the…
Alex
  • 12,578
  • 15
  • 99
  • 195
6
votes
4 answers

Best gcc optimization switches for hyperthreading

Background I have an EP (Embarassingly Parallell) C application running four threads on my laptop which contains an intel i5 M 480 running at 2.67GHz. This CPU has two hyperthreaded cores. The four threads execute the same code on different subsets…
Olof Forshell
  • 3,169
  • 22
  • 28
6
votes
1 answer

OpenMP drastic slowdown for specific thread number

I ran an OpenMP program to perform the Jacobi method, and it was working very well, 2 threads performed slightly over 2x 1 thread, and 4 threads 2x faster than 1 thread. I felt everything was working perfectly... until I reached exactly 20, 22, and…
6
votes
3 answers

About Adaptive Mode for L1 Cache in Hyper-threading

I'm a student doing some research on Hyper-threading recently. I'm a little confused about the feature - L1 Data Cache Context Mode. In the architecture optimization manual, it was described that L1 cache can operate in two modes: The first level…
6
votes
5 answers

assign two MPI processes per core

How do I assign 2 MPI processes per core? For example, if I do mpirun -np 4 ./application then it should use 2 physical cores to run 4 MPI processes (2 processes per core). I am using Open MPI 1.6. I did mpirun -np 4 -nc 2 ./application but wasn't…
codereviewanskquestions
  • 13,460
  • 29
  • 98
  • 167
5
votes
1 answer

Can different processes run RDTSC at the same time?

Can different processes run RDTSC at the same time? Or is this a resource that only one core can operate on at the same time? TSC is in every core (at least you can adjust it separately for every core), so it should be possible. But what about Hyper…
kuga
  • 1,483
  • 1
  • 17
  • 38
5
votes
2 answers

Better way to disable hyper threading in AWS EC2?

I am doing some benchmarking tests and would like to disable hyper threading in an EC2 to see it's effect on my test application performance. A single instance of my application uses only 1 thread during execution. I understand that I can't access…
Sri Hari Vignesh
  • 256
  • 4
  • 11
5
votes
1 answer

Go counts virtual cores, not physical?

I have some Go code I am benchmarking on my Macbook (Intel Core i5 processor with two physical cores). Go's runtime.NumCPU() yields 4, because it counts "virtual cores" I don't know much about virtual cores in this context, but my benchmarks seems…
domoarigato
  • 2,802
  • 4
  • 24
  • 41
5
votes
1 answer

Is duplication of state resources considered optimal for hyper-threading?

This question has an answer that says: Hyper-threading duplicates internal resources to reduce context switch time. Resources can be: Registers, arithmetic unit, cache. Why did CPU designers end up with duplication of state resources for…
Leo Heinsaar
  • 3,887
  • 3
  • 15
  • 35
5
votes
1 answer

Performance of map pattern in multithreaded program lower than expected (4x speedup vs 8x)

I'm getting started in multithreaded programming so please excuse me if the following seems obvious. I am adding multithreading to an image processing program and the speedup isn't exactly the one I expected. I'm currently getting a speedup of 4x…
5
votes
1 answer

Does GetSystemInfo (on Windows) always return the number of logical processors?

Reading up on this, and specifically reading the Microsoft docs, it looks like it should be returning the number of PHYSICAL processors, and that you should use GetLogicalProcessorInformation to figure out how many LOGICAL processors you…
mhughes
  • 71
  • 1
  • 2