# Threads or Cores: Which Do You Need?



## lotuseclat79 (Sep 12, 2003)

Threads or Cores: Which Do You Need?.



> Anyone contemplating a new computer purchase (for personal use or business) is confronted with new (and confusing) hardware choices. Intel and AMD have done their best to differentiate the x86 architecture as much as possible while retaining compatibility between the two CPUs, but the differences between the two are growing. One key differentiator is hyperthreading; Intel does it, AMD does not. This article explains what that really means, with particular attention to the way different server OSs take advantage (or don't). Plenty of meaty tech stuff.


Reference article: Threads or Cores: Which Do You Need?.

-- Tom


----------



## jp1203 (Jul 21, 2005)

I'll say this: a 3.2 GHz HT P4 is no match for a 2.5 GHz Pentium Dual Core in my experience.


----------



## ekim68 (Jul 8, 2003)

I've run into a few dual core machines and I'm impressed...I'm also impressed with how the 64-bit machines handle the large chunks of memory, with respect to how much they should slow down with infections but still work well...


----------



## JohnWill (Oct 19, 2002)

Hyperthreading is nowhere close to dual-core, it typically adds 10-20% maximum to the CPU throughput. Obviously, if you have multiple cores that are all hyperthreaded, you can pick up some performance.

I'll take the cores, the threads will have more processors to run on.


----------



## lotuseclat79 (Sep 12, 2003)

Having programmed a run-time library for a multiprocessor that was able to be configured with 18 cores + 2 cores for the system OS, I can tell you from experience that there is nothing like having multiple cores. The one I worked on was the Encore Multimax which had a 10MHz processor, and we used one for the entire company of about 150 people back in the late 80s. Response was immediate - it was great! There were BSD and SysV OSes as well as research Mach OS micro-kernel projects. We were a mean and lean company, e.g. only one person for each subproject (one for all the Unix commands). It was actually fun to debug with a multiprocessing debugger with multiple cores being controlled to execute a program that had problems.

The problems I have with articles like the one that started this thread is that there are important points left out that are mentioned for their lack thereof like the OS capability (if it is built in) to load balance between cores and even move processes between cores (think a large shared memory multiprocessor).

Thread are great as well, since they are a lighter weight form of using multi-processes. The usual problem is the great lag in applications that are not programmed to take advantage of either multi-threading or multi-processing.

Not many programmers have the skills to do the programming.

I prefer a power-of-2 in terms of how many cores I would ideally like to have: 2,4,8.16,...

-- Tom


----------



## aka Brett (Nov 25, 2008)

Good link
Thanks Tom


----------



## loserOlimbs (Jun 19, 2004)

JStergis said:


> I'll say this: a 3.2 GHz HT P4 is no match for a 2.5 GHz Pentium Dual Core in my experience.


The netburst architecture was junk! In fact, I usually turned HT off to improve performance. HT seemed to make everything feel less responsive. By turning it off it made the machine seem snappier, more like AMD Athlon chip even .


----------



## TheShooter93 (Jul 10, 2008)

What exactly is the difference between the two?


----------



## aka Brett (Nov 25, 2008)

TheShooter93 said:


> What exactly is the difference between the two?


 The link in the first post goes into pretty good detail......It has answered some questions I always had in my mind about HT.


----------



## TheShooter93 (Jul 10, 2008)

I read that a few days ago but it is still unclear to me. Any simplistic explanation out there that someone can give me?


----------



## JohnWill (Oct 19, 2002)

Hyperthreading Processor

Multi-Core Processor


----------



## lotuseclat79 (Sep 12, 2003)

TheShooter93 said:


> I read that a few days ago but it is still unclear to me. Any simplistic explanation out there that someone can give me?


Hi TheShooter93,

HyperThreading (HT) is the practice of booting the processor with a virtual shadow of itself - which, in my experience, does not compare to having real multi-processors and/or multicores on one chip. It might speed up multiprogramming software, but not by as much as having multiple cores available to really do the work without the overhead of HT.

-- Tom


----------



## JohnWill (Oct 19, 2002)

You can follow the link to read the rest of the article.

[WEBQUOTE="http://en.wikipedia.org/wiki/Hyper-threading"]Hyper-threading works by duplicating certain sections of the processorthose that store the architectural statebut not duplicating the main execution resources. This allows a hyper-threading processor to appear as two "logical" processors to the host operating system, allowing the operating system to schedule two threads or processes simultaneously. When execution resources would not be used by the current task in a processor without hyper-threading, and especially when the processor is stalled, a hyper-threading equipped processor can use those execution resources to execute another scheduled task. (The processor may stall due to a cache miss, branch misprediction, or data dependency.)[/WEBQUOTE]


----------

