Hyperthreading vs throughput

3

I came to the following conclusion, can you tell me if I'm right or wrong.

In my explanation 2x6 CORE CPU, the OS will see 12 CPUs

I'm running a DB and the licence is limited to 10 CPU (I could get more, but far too expensive), I'm trying to get the most of it in term of performance.

If i buy 2 six CORE CPU and my licence is for 10 CPU, I believe that my application will be running faster than if hyperthreading was enabled in the bios, because I will then end up with 24 CPU on the box but will only use 10, therefore by disabling hyperthreading each CPU will be faster.

Also i believe than when i comes to throughput, highest frequency is better.

If i was running an application with no licence, then enable hyperthreading would make sens.

Thx for your inputs.

rno

Posted 2013-06-25T16:37:19.017

Reputation: 31

Question was closed 2013-06-28T22:29:06.303

2you will have to inquire with the DB manufacturer as to whether threads count as cores per their licensing model. – Frank Thomas – 2013-06-25T16:56:18.547

Answers

2

You don't list an OS, but assuming the OS does thread scheduling properly, you should get about the same performance both with and without hyperthreading in your scenario.

You have:

  • 12 Hardware Cores
  • 24 Hardware Threads
  • Restriction to 10 software threads

If you have HT disabled, then it'll schedule 1 thread per core, and leave 2 cores idle.

If you have HT enabled, then the OS should still schedule the DB's threads 1 software thread per core, leaving idle hardware threads between the DB threads; The database will be scheduled on Thread 0, Thread 2, Thread 4, Thread 6, etc. and leave odd-numbered hardware threads idle (or for use by other applications on the system).

Hyperthreading is a bit weird when estimating performance, because 12 threads isn't using half the CPU - it's using the whole CPU. The remaining 12 threads only give you about 10%-15% additional power. The benefit with them is that the CPU can do other things while the first 12 are waiting on data to be returned from the disk or from RAM.

Darth Android

Posted 2013-06-25T16:37:19.017

Reputation: 35 133

Thanks for your answer, things seems to be slightly more complicated than I thought... I'm using Solaris and Linux and if I understand well what you are saying hyperthreading, give you more slitly throughput if you use it but nothing more if you don't us it. I've seen some software asking for it to be disable I start to wonder why. – rno – 2013-06-26T07:53:43.070

It will give you slightly more (10-15%) throughput if you have 13-24 threads trying to run at once. If you have 1-12 threads, then you won't see much benefit from HT. So, 12 threads = 100%, and 24 threads = 115% with HT, and without HT 12 threads = 100% and 24 threads = 100% – Darth Android – 2013-06-26T18:47:46.800