Cores and threads
23 minutes ago, Fez760 said:Simple question that apparently google cant answer (or i dont know where to look) is there a notable difference between 4c 4t and 4c 8t
Yes and no. It depends on what the application is doing. Which all of this will be explained in the next bit ![]()
QuotePS what on earth is a thread and why are they (from what ive noticed) double the cores
This is going to take a bit of explaining to scratch the surface of this.
Basically, a thread is a task in an application. If our application is a web browser, there would be threads for handling the network traffic, rendering the GUI, and executing the JavaScript code, among others. For the purposes of scheduling what work goes on a CPU, threads are the smallest unit that can be scheduled. Threads also have a life cycle and they reside in one of the following states:
- Blocked/Sleeping: The thread is waiting on something, like an event or a computer resource that some other thread has.
- Ready: Whatever the thread was waiting on happened and can be executed
- Running: The thread is currently running on a CPU
- Done: The thread is done executing and its resources can be freed up.
That takes care of the software side, now onto the hardware side.
CPUs used to be able to do only one thing at a time. Then some people thought of a way to do more work at the same time. One of these methods is called superscalar pipelining. Instead of having one execution unit, the CPU has two or more. And if a thread has operations that don't affect each other, like say x = a + b and y = c + d, then the CPU can execute those operations at the same time use those extra execution units.
Someone figured out that not every application's threads can utilize all the extra execution units, leaving wasted potential. So they made it that the CPU can take in another thread that can use the unused execution units. Intel calls this feature HyperThreading, though the generic name for this is simultaneous multithreading (or SMT).
The thing with SMT is its benefits depend on the average utilization of execution units on what we'll call the primary thread (this isn't a real term, I just lack a better one). So if the primary thread is taking up say 75% of the execution units on a core, that only leaves 25% left for a secondary thread to use. In practice, SMT improves performance by about 10%-20% on average for an application that is optimized for it.
So it's a way to squeeze more processing power out of a CPU, but it's not exactly a miracle feature.
EDIT: The reason why threads are double the core count is because for most use cases, there's almost zero benefit for adding more threads to the CPU. Though some processors have more than two threads per core, like Xeon Phi which can have four threads per CPU core. But from what I could gather, the reason why it does this it's more expensive to switch threads out than it is to leave them on the CPU.

Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now