Hello,

as I recently had great issues with HyperThreading I can tell you the
results of my investigations:

At least up to Micro Architecture "Nehalem" it should be considered to
deactivate HyperThreading, if you do not have a Operating Systems which
directly and officially supports it. Hearsay has it that Hyperthreading got
a ironed out quite a bit with "Sandy Bridge", but (for economical reasons)
we purchased "Nehalem" so I can not vouch for anything further down the
line.

The problem with Hyperthreading is that if the OS is not aware of
Hyperthreading it schedules work on all cores available. The nature of the
beast, as I understood it is, and please anybody chime in if I am not
correct, that if you have thread-heavy applications (like we have with our
FreeSWITCH PBX Boxes) or if you do virtualization (Which we do KVM based),
it can (and will) happen that you cog your CPU's. In the event that all
physical cores get used up by one process, and they are I/O bound and are
waiting for I/O, then all other processes which are scheduled on the other
cores won't be able to work, and your system freezes up.

You will note huge raise in context-switches and with luck the problem
resolves itselve in minutes, sometimes you better reboot so your users stop
screeming. Sometimes it only blocks some applications, e.g. a Virtualized
Box uses x physical cores and some other process is scheduled on their HT
cores, etc.

If I'l ever get my hands on Sandy Bridge I'l probably do some tests again
with Hyper-Threading to see if those problems are resolved as claimed and
if it's safe to let it turned on in our machines and workloads.

As you see, it's not really a question if you should turn it on or off,
it's more a question if your typical workload works well with
hyperthreading or if it can introduce more problems.


Now in regard to PFSense, I have no idea how threading works in BSD, if
it's the same as in Linux, if BSD is hyperthreading aware, so I am not
sure, but I would recommend to turn it off if your architecture is below
"Sandy Bridge" and monitor your context-switches and be alert if you have
spikes which are not typically for your workload.


That being said, if you checkout some pages on HyperThreading Intel claims
better performance on some types of workload, so it's not as it clones your
CPU's and you have magically more power, in most cases I would bet you
don't note any differences, our KVM Virtualized Servers run with the same
load-average with 12 cores than they run with 24 cores + HT enabled, just
way more stable.

Best regards
Ray




2013/4/12 Nathan C. Smith <[email protected]>

>
> A couple years ago when the topic of CPU hyper threading came up I
> remember folks being advised to disable it.  Is that still the prevailing
> wisdom and current best practice?
>
> Thank you.
>
> -Nate
> _______________________________________________
> List mailing list
> [email protected]
> http://lists.pfsense.org/mailman/listinfo/list
>
_______________________________________________
List mailing list
[email protected]
http://lists.pfsense.org/mailman/listinfo/list

Reply via email to