hyperthreading

How to find the Number of physical CPU Cores (not logical SMT hyperthreads) via .NET Core?

只谈情不闲聊 提交于 2020-03-22 08:48:25
问题 I want to detect the number of real physical cores, not logical cores, for workloads that scale negatively when more threads compete for private per-core caches, and/or have high enough IPC that running more than one logical thread per core doesn't increase throughput by more than the increase in threading overhead, especially for problems that don't scale perfectly to lots of cores. Or to put it another way, the number of threads that can run without any of them competing for execution

How to find the Number of physical CPU Cores (not logical SMT hyperthreads) via .NET Core?

妖精的绣舞 提交于 2020-03-22 08:48:11
问题 I want to detect the number of real physical cores, not logical cores, for workloads that scale negatively when more threads compete for private per-core caches, and/or have high enough IPC that running more than one logical thread per core doesn't increase throughput by more than the increase in threading overhead, especially for problems that don't scale perfectly to lots of cores. Or to put it another way, the number of threads that can run without any of them competing for execution

Hyper-threading, Multi-threading, Multi-processing and Multi-tasking - Theory

喜你入骨 提交于 2020-01-30 08:05:28
问题 I am confused on the different terms as to their actual differences. What are each of them and what do they actually mean? My IT teacher at school gives us one definition the one day, and another the next, so please can you shed some light for me. Thanks. 回答1: A thread is a sequence of program instructions that are executed by the machine. We call a program multi-threaded when a single execution of the program has more than one thread. Multi-threading can be simulated on a single-processor

How to find physical and logical core number in a kernel module?

故事扮演 提交于 2020-01-11 08:16:28
问题 Are there kernel functions in Linux that would return the number of the physical core and logical core (in case of Hyperthreading) on which a kernel module is running ? 回答1: Have a look at the end of include/linux/smp.h : smp_processor_id() gives you the number of the current executing CPU. get_cpu() will do the same and will also disable preemption so that you will stay on that CPU until put_cpu() is called. From user-space, you can use sched_getcpu() or getcpu() to obtain the same

How to find physical and logical core number in a kernel module?

眉间皱痕 提交于 2020-01-11 08:16:18
问题 Are there kernel functions in Linux that would return the number of the physical core and logical core (in case of Hyperthreading) on which a kernel module is running ? 回答1: Have a look at the end of include/linux/smp.h : smp_processor_id() gives you the number of the current executing CPU. get_cpu() will do the same and will also disable preemption so that you will stay on that CPU until put_cpu() is called. From user-space, you can use sched_getcpu() or getcpu() to obtain the same

Enable Intel Hyperthreading in Java

ε祈祈猫儿з 提交于 2020-01-02 04:40:28
问题 I have a multithreaded program running on a quad-core Intel i7. When I execute Runtime.getRuntime.availableProcessors() , I get 8, and I know that hyperthreading is available on this CPU. However, when I create threads, my CPU levels are at 100% (i.e. non-zero) for 4 threads, meaning that 4 threads are unused. Is there any way to enable hyperthreading in Java? 回答1: Hyperthreading is enabled by the fact that all modern JVMs use native threads, thus this is a OS/CPU config setting. However

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

*爱你&永不变心* 提交于 2019-12-31 02:21:08
问题 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 simultaneous multithreading (or hyper-threading on Intel)? Why wouldn't tripling (quadrupling, and so on) those same resources give us three logical cores and, therefore, even faster throughput? Is duplication that researchers arrived at in some sense optimal

Hyper-threading and gaming (and other computing applications)?

旧巷老猫 提交于 2019-12-23 05:48:09
问题 I was wondering what the real-world performance effects are of hyperthreading (multiple logical cores for each physical core) in different situations. Intel advertises this as being effective for when threads of execution are waiting for I/O, however in memory intensive applications, it can be ineffective because when a switch occurs between logical cores, locality is lost in the processor cache. The second application's data is loaded into cache, forcing the first application's memory out of

Hyper-threading Performance Comparison

亡梦爱人 提交于 2019-12-22 10:57:51
问题 I have written a project, which uses some basic functions in openssl such as RAND_bytes and des_ecb_encrypt . My computer has i7-2600(4 cores and 8 logic CPU). When I run my project with 4 threads, it will costs 10 seconds. When I run it with 8 threads, it also costs 10 seconds. What I mean is that hyper-threading doesn't give me any performance improvement. In Linux, the experiment result is same. I found here tells me that hyper-threading doesn't give me some improvement in some situations.

Is HyperThreading / SMT a flawed concept?

我的未来我决定 提交于 2019-12-21 09:29:07
问题 The primary idea behind HT/SMT was that when one thread stalls, another thread on the same core can co-opt the rest of that core's idle time and run with it, transparently. In 2013 Intel dropped SMT in favor of out-of-order execution for its Silvermont processor cores, as they found this gave better performance. ARM no longer support SMT (for energy reasons). AMD never supported it. In the wild, we still have various processors that support it. From my perspective, if data and algorithms are