Rich Freeman on 20 Mar 2013 09:35:26 -0700

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: [PLUG] Dumb question about System Monitor

On Wed, Mar 20, 2013 at 11:15 AM, Adam Zion <> wrote:
>> I've noticed across two Ubuntu releases and two Fedora releases, that
>> System Monitor is reporting more CPU cores than I'm expecting.
>> Hyper Threading is the likely culprit.
> OK- any way to solve this?

What's to solve?  A 4-core Intel processor exposes 8 virtual cores,
and as far as the OS is concerned that's how it behaves.  It just can
only run 4 of those virtual cores at any particular time.

You could solve it by buying an AMD processor instead I suppose, but
it won't make your system any faster (well, that depends a bit on
where you buy on the price/performance curve and the phase of the moon
and how heat-adverse you are - not really the topic here).

Back in the P4 days the Intel chips were developing much longer
pipelines than AMD, and that made the cost of a failed branch
prediction much higher.  Their solution was hyperthreading - have more
instructions staged to go on the CPU, and if for whatever reason if
the CPU had to bail and restart on one of them it could instead
process the other one while the other pipeline refilled.  That keeps
the chip busier, and reduces the impact of failed branch prediction.

AMD had shorter pipelines, so they didn't bother with any of that.

I'm not sure what the length of the pipelines are on modern chips, but
whether for that reason or others Intel has kept the feature.  No
doubt implementing it costs them transistors, but their engineers have
obviously decided that's the best use of them right now.

For most purposes you can just pretend you have extra cores and not
worry about it.  Maybe in some realtime situations they might cause
issues (those cores are not truly independent), and perhaps Linux has
some way to disable hyperthreading on some/all cores.  However, I'd
expect your overall performance to drop if you did that, though your
performance on a single thread might pick up (but when that thread
stalls the only way for the CPU to do other work is for the OS to
perform a full context switch).

Philadelphia Linux Users Group         --
Announcements -
General Discussion  --