Re: Virtualization Performance: Intel vs. AMD

Avi Kivity
2009-11-16T12:10:40Z

On 11/16/2009 12:29 AM, Gordan Bobic wrote:
> Thomas Fjellstrom wrote:
>> On Sun November 15 2009, Neil Aggarwal wrote:
>>>> The Core i7 has hyperthreading, so you see 8 logical CPUs.
>>> Are you saying the AMD processors do not have hyperthreading?
>>
>> Course not. Hyperthreading is dubious at best.
>
> That's a rather questionable answer to a rather broad issue. SMT is
> useful, especially on processors with deep pipelines (think Pentium 4
> - and in general, deeper pipelines tend to be required for higher
> clock speeds), because it reduces the number of context switches.
> Context switches are certainly one of the most expensive operations if
> not the most expensive operation you can do on a processor, and
> typically requires flushing the pipelines. Double the number of
> hardware threads, and you halve the number of context switches.
>

The real win is in parallelizing memory access. If a cache miss costs
200 cycles, no amount of pipelining and out-of-order execution will hide
this cost. Running two threads in parallel will at best hide the cost
by letting another thread execute, or at least issue two memory accesses
in parallel instead of just one.

> This typically isn't useful if your CPU is processing one
> single-threaded application 99% of the time, but on a loaded server it
> can make a significant difference to throughput.

If you are able to saturate the multiple threads (typically easier with
many small guests rather than a few large ones) then hyperthreading is
likely a win.

--
error compiling committee.c: too many arguments to function