8 logical threads at 4 cores will at a maximum run 4 times faster in parallel?

前端 未结 5 565
悲哀的现实
悲哀的现实 2021-02-04 08:28

I\'m benchmarking software which executes 4x faster on Intel 2670QM then my serial version using all 8 of my \'logical\' threads. I would like some community feedback on my

5条回答
  •  故里飘歌
    2021-02-04 09:14

    A i7-2670QM processor has 4 cores. But it can run 8 threads in parallel. This means that it only has 4 processing units (Cores) but has support in hardware to run 8 threads in parallel. This means that a maximum of four jobs run in on the Cores, if one of the jobs stall due to for example memory access another thread can very fast start executing on the free Core with very little penalty. Read more on Hyper threading. In Reality there are few scenarios where hyper threading gives a large performance gain. More modern processors handle hyper threading better than older processors.

    Your benchmark showed that it was CPU bound, i.e. There was little stalls in the pipeline that would have given Hyper Threading an advantage. 50% CPU is correct has the 4 cores are working and the 4 extra are not doing anything. Turn of hyper threading in the BIOS and you will see 100% CPU.

提交回复
热议问题