[vfio-users] Advice on cpu pinning AMD FX 8350

Marcel Bieberbach mauorrizze at gmail.com
Mon Aug 31 10:23:21 UTC 2015


David,
I think you're right regarding the connected modules on your AMD CPU. I
just want to add, that this very nice cpu-latencies script (thanks Alex!)
reacts very differently on different architectures. On my Sandy Xeon E3
with enabled hyperthreading, I get this (0-4, 1-5, 2-6, 3-7):

  |  0  1  2  3  4  5  6  7
--+------------------------
 0| 10  8  8  8  6  8  8  8
 1|  8 10  8  8  8  6  8  8
 2|  8  8 10  8  8  8  6  8
 3|  8  8  8 10  8  8  8  6
 4|  6  8  8  8 10  8  8  8
 5|  8  6  8  8  8 10  8  8
 6|  8  8  6  8  8  8 10  8
 7|  8  8  8  6  8  8  8 10

So, apparently with sending and receiving threads on the same Intel-Thread
/ AMD-Core, the latency increases (shared resources). On the same Intel
core in different threads it decreases (profit from L2 cache), but in your
case on the same module with different cores, the latency INcreases. Though
having a shared L2 cache, some other parts of the module might get locked
by one thread and blocks the other.
Thus, ANY correlation between cores/threads/modules detected by the
cpu-latencies script might indicate the connection.

If you want to endorse your settings with some benchmarks, be sure to
utilize all other non-VM cores (mprime/prime95). I've tried to benchmark my
VM with super-pi and was surprised how passing connected threads was slower
than passing a single thread from different cores. Of course, if the other
thread has nothing to do, the benchmark is faster (so if you plan to use
your VM intensively while the rest of your CPU idles, you might benefit
from that), but generally the efficiency of the whole cpu should be higher
when you pass connected threads/cores because of shared caches and other
synergistic effects.

Regards,
Marcel

2015-08-31 1:23 GMT+02:00 David Sutton <kantras at gmail.com>:

> Alex,
>
>
> On Sun, Aug 30, 2015 at 5:16 PM, Alex Williamson <
> alex.l.williamson at gmail.com> wrote:
>
>> On Sun, Aug 30, 2015 at 4:08 PM, David Sutton <kantras at gmail.com> wrote:
>>
>>> Hi there,
>>>
>>> On Sat, Aug 29, 2015 at 8:00 PM, Blank Field <ihatethisfield at gmail.com>
>>> wrote:
>>>
>>>> Everything as usual. By usual i mean i7 hyperthreaded cores.
>>>> Pair siblings cores.
>>>> Those, who share the FPU, and, AFAIR, caches.
>>>> To know your exact logical CPU numbers you should examine /proc/cpuinfo
>>>> closely.
>>>>
>>>>
>>>   I was aware of the core/module pairings, so /proc/cpuinfo was one of
>>> the first places that I had looked for clues; the problem is that I don't
>>> see it showing anywhere obvious about how the core/module pairing is
>>> numbered (ie 0-1,2-3,4-5,6-7 or 0-4,1-5,2-6,3-7)
>>>
>>
>> You can try my script that uses netperf to determine core-to-core
>> latencies to figure out whether cores are paired:
>>
>> https://github.com/awilliam/cpu-latencies
>>
>> Hopefully you'll at most need to change the path to netperf and netserver
>> and have taskset and bc installed.  Give it a try.
>>
>
> Thanks for the advice - your script worked well:
>
> The output I got was:
>
>  |  0  1  2  3  4  5  6  7
> --+------------------------
> 0| 10  8  7  7  7  7  7  7
> 1|  8 10  7  7  7  7  7  7
> 2|  7  7 10  8  7  7  7  7
> 3|  7  7  8 10  7  7  7  7
> 4|  7  7  7  7 10  8  7  7
> 5|  7  7  7  7  8 10  7  7
> 6|  7  7  7  7  7  7 10  8
> 7|  7  7  7  7  7  7  8 10
>
> So it appears that it is 0-1,2-3,4-5 and 6-7.
>
> Regards,
>
>   David
>
> _______________________________________________
> vfio-users mailing list
> vfio-users at redhat.com
> https://www.redhat.com/mailman/listinfo/vfio-users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/vfio-users/attachments/20150831/fc97e065/attachment.htm>


More information about the vfio-users mailing list