0

Hyperthreading doubles the logical cores, but doesn't double CPU resources.

Linux measure CPU usage in %, allocating 100% points for each thread, thus reporting a maximum of 800% for a quad-core CPU with HT activated.

Anyhow I understand that under real usage you will not reach 800%.

What is the reasonable maximum for CPU, before I should start worrying about my servers? 400%? 600%?

Mascarpone
  • 872
  • 3
  • 9
  • 28

1 Answers1

3

You will reach 800% (within rounding error), but it's not 8 times 100% usage.

The point is that hyperthreads are not separate processors, they use most of the same resources, so the usage 'spills' to the other thread.

Imagine one single-trheaded task, consuming 100% of its logical core. You see 100% usage and the task proceeds, for example at 10 stones per second.

Now you start a second task and runs on the other thread, same physical core. Now you see 200% usage, and both tasks proceed, but not at 10 stones/sec each, lets say 6 stones/sec each.

In other words, the work advances 20% faster than on a single thread, but each thread is less capable (since it has less resources); so when all threads are busy, the 100% figure is just 60% of the one-thread-per-core scenario.

Javier
  • 9,268
  • 2
  • 24
  • 24