hyperthreading

Is it possible to check in Java if the CPU is hyper threading?

心已入冬 提交于 2019-12-21 07:09:02
问题 I would like to know the optimal number of threads I can run. Normally, this equals to Runtime.getRuntime().availableProcessors() . However, the returned number is twice as high on a CPU supporting hyper threading. Now, for some tasks hyper threading is good, but for others it does nothing. In my case, I suspect, it does nothing and so I wish to know whether I have to divide the number returned by Runtime.getRuntime().availableProcessors() in two. For that I have to deduce whether the CPU is

Poor performance due to hyper-threading with OpenMP: how to bind threads to cores

。_饼干妹妹 提交于 2019-12-20 17:59:32
问题 I am developing large dense matrix multiplication code. When I profile the code it sometimes gets about 75% of the peak flops of my four core system and other times gets about 36%. The efficiency does not change between executions of the code. It either starts at 75% and continues with that efficiency or starts at 36% and continues with that efficiency. I have traced the problem down to hyper-threading and the fact that I set the number of threads to four instead of the default eight. When I

Why does Hyper-threading get reported as supported on processors without it?

烂漫一生 提交于 2019-12-19 05:50:16
问题 I'm trying to gather system information and noticed the following on an Intel Xeon E5420: After executing CPUID(EAX=1) , EDX[28] is set, indicating Hyper-threading support, despite the fact that the processor is listed on the Intel website as not supporting Hyper-threading (ark.intel.com) Does anyone have an explanation for this? 回答1: Here's the definition of that bit according to the Intel Developer's Manual: Max APIC IDs reserved field is Valid. A value of 0 for HTT indicates there is only

multi-CPU, multi-core and hyper-thread

帅比萌擦擦* 提交于 2019-12-17 06:23:12
问题 Could anyone recommend some documents to me to illustrate the differences between multi-CPU, multi-core, and hyper-thread? I am always confused about these differences, and about the pros/cons of each architecture in different scenarios. EDIT: here is my current understanding after learning online and learning from others' comments; could anyone review comment please? I think hyper-thread is the most inferior technology among them, but cheap. Its main idea is duplicate registers to save

multi-CPU, multi-core and hyper-thread

假装没事ソ 提交于 2019-12-17 06:23:03
问题 Could anyone recommend some documents to me to illustrate the differences between multi-CPU, multi-core, and hyper-thread? I am always confused about these differences, and about the pros/cons of each architecture in different scenarios. EDIT: here is my current understanding after learning online and learning from others' comments; could anyone review comment please? I think hyper-thread is the most inferior technology among them, but cheap. Its main idea is duplicate registers to save

How to Detect the Number of Physical Processors / Cores on Windows, Mac and Linux

 ̄綄美尐妖づ 提交于 2019-12-17 03:04:23
问题 I have a multi threaded c++ application that runs on Windows, Mac and a few Linux flavors. To make a long story short: In order for it to run at maximum efficiency, I have to be able to instantiate a single thread per physical processor/core. Creating more threads than there are physical processors/cores degrades the performance of my program considerably. I can already correctly detect the number of logical processors/cores correctly on all three of these platforms. To be able to detect the

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

别等时光非礼了梦想. 提交于 2019-12-12 09:39:36
问题 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 have. Here's the doc I found on the SYSTEM_INFO structure: http://msdn.microsoft.com/en-us/library/ms724958(v=VS.85).aspx And here's the doc on GetLogicalProcessorInformation: (spaces added to get through spam filter) http:// msdn.microsoft.com/ en-us/

Why does hyper-threading benefit my algorithm?

时光毁灭记忆、已成空白 提交于 2019-12-12 00:29:20
问题 I have a dual core machine with 4 logical processors thanks to hyper-threading. I am executing a SHA1 pre-image brute force test in C#. In each thread I basically have a for loop and compute a SHA1 hash and then compare the hash to what I am looking for. I made sure that all threads execute in complete separation. No memory is shared between them. (Except one variable: long count, which I increment in each thread using: System.Threading.Interlocked.Increment(ref count); I get about 1 mln sha1

Physical core and Logical cores on diffrent cpu AMD/Intel

白昼怎懂夜的黑 提交于 2019-12-11 16:45:35
问题 Can anyone confirm that for example Intel I3 CPU has 2 physical cores and 4 logical cores, so if I set Process afinity to Core #0 so that means I set on first physical cores 1 logical core, but if I set on Core #1 so it means I set on first physical core 1 HyperThreading core, but how about AMD CPU since they got somekind of "modules" atleast what I read on internet, how to work with amd cpus? And does intel ALWAYS has this come physical core contains 1 logical and 1 HT core? How about AMD

Creating a friendly timed busy loop for a hyperthread

a 夏天 提交于 2019-12-10 17:35:14
问题 Imagine I want to have one main thread and a helper thread run as the two hyperthreads on the same physical core (probably by forcing their affinity to approximately ensure this). The main thread will be doing important high IPC, CPU-bound work. The helper thread should do nothing other than periodically updating a shared timestamp value that the the main thread will periodically read. The update frequency is configurable, but could be as fast as 100 MHz or more. Such fast updates more or