# Hyperthread Support FreeBSD 9



## npgm (May 26, 2013)

Is enabling hyperthreading still a security concern in FreeBSD 9? Does it improve or hinder performance in version 9? I read this page from back in 2008 that says hyperthreading helps performance. But then, the 9.1 release notes say that sometimes hyperthreading can result in suboptimal performance. Is it that hyperthreading worked better in the past and now it's broken? Or does it only work with certain hardware?

Also, in the release notes, the bit about hyperthreading is under section 2.2, i386, not under 2.1, amd64. So, then would this affect an Ivy Bridge Core i7 CPU?


----------



## mav@ (May 26, 2013)

The phrase about "no attempt is made to optimize scheduling" in the release notes is not correct. The default SCHED_ULE scheduler does know about hyper-threading and attempts to avoid extra resource sharing. About a year ago between FreeBSD 9.0 and 9.1 releases additional improvements were made in this area.

Still doubling the number of logical CPUs in a system creates additional scheduling overhead, that in theory may penalize some workloads. But from my experience benefits from hyper-threading are usually bigger than penalties, so it's worth having it enabled.


----------



## phoenix (May 27, 2013)

It also depends on which CPU you are discussing. HT in the P4 is really little more than a hack. HT in the latest Core i- series CPUs can improve performance almost across the board. Each generation of Intel CPUs has improved HT support and performance.


----------

