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

Re: [vfio-users] Optimize vm and host performance, is dual xeon the way ?



Yes, typically.

cpuset means which host thread will be pinned to vCPU thread.
And topology can set the deploy definition of these threads. Like you want to set these pinned threads as 6 cores, or want to set these as 6 sockets.
I suggest to set these threads as cores. 

For example,

<cputune>
    <vcpupin vcpu='0' cpuset='2'/>
    <vcpupin vcpu='1' cpuset='3'/>
    <vcpupin vcpu='2' cpuset='4'/>
    <vcpupin vcpu='3' cpuset='5'/>
    <vcpupin vcpu='4' cpuset='6'/>
    <vcpupin vcpu='5' cpuset='7'/>
</cputune>

And,

<cpu mode='host-passthrough'>
    <topology sockets='1' cores='6' threads='1'/>
</cpu>

2015-12-28 13:55 GMT+08:00 thibaut noah <thibaut noah gmail com>:
So is this the right emulation? If i understand correctly what i'm trying to get is a 3cores with 2threads per core ? (so 6cores pinned?)
I don't have that much knowledge in cpu so i'm kinda lost here.

<cputune>
    <vcpupin vcpu='0' cpuset='1'/>
    <vcpupin vcpu='1' cpuset='2'/>
    <vcpupin vcpu='2' cpuset='3'/>
    <vcpupin vcpu='3' cpuset='5'/>
    <vcpupin vcpu='4' cpuset='6'/>
    <vcpupin vcpu='5' cpuset='7'/>
  </cputune>

2015-12-26 18:53 GMT+01:00 Karsten Elfenbein <karsten elfenbein gmail com>:
check that the 2 cores for the host OS are on the same physical core
and that the VM does not use those 2 processors with the same core id

cat /proc/cpuinfo | grep -e processor -e 'core id'

CPU 0-3 should be the core 0-3
CPU 4-7 should be the core 0-3 again with HT

so leaving out CPU 0 and 4 should keep core 0 idle and the host OS responsive

taskset 1-3,5-7 startVM.sh

Karsten

2015-12-26 12:56 GMT+01:00 Eddie Yen <missile0407 gmail com>:
> Pining CPU can reduce the happening that host and guest using the same
> thread at the same time.
>
> And I don't know which program you're using on Fedora, so I don't have quite
> answer that 2 threads is enough for host or not.
> It's all depends on your usage case.
>
> 2015-12-26 19:44 GMT+08:00 thibaut noah <thibaut noah gmail com>:
>>
>> My cpu is a i7 4790k, is pinning the cpu usefull ? I'll try to derp a bit
>> with the vcpu thing, just afraid 2 threads aren't enough for fedora :/
>>
>> 2015-12-26 11:59 GMT+01:00 Eddie Yen <missile0407 gmail com>:
>>>
>>> I forgot your CPU type, so I don't know about your case.
>>>
>>> But, as I'm using 4820K, I usually using 4 to 6 threads gave to VM, only
>>> use 2 threads for Fedora host.
>>> And most important is vCPU tweaks, especially CPU topology and Hyper-V.
>>>
>>> For me, I usually set topology as "sockets=1 cores=6 threads=1" if using
>>> 6 threads from host.
>>> Then set cpuset= to let vCPU worked on pointed CPU threads.
>>>
>>> IME, set all threads as vCPU cores can got better performance on Windows
>>> 10.
>>>
>>> 2015-12-26 18:00 GMT+08:00 thibaut noah <thibaut noah gmail com>:
>>>>
>>>> Hello guys merry christmas ! o/
>>>> My current issue is vm and host optimization, i use my windows 10 vm for
>>>> gaming purposes only (like most of us i think), problem is, to keep my
>>>> performances on windows high i drain too much ressources on my fedora host
>>>> thus making it almost useless (also when leaving the vm i most of the time
>>>> found myself unable to use fedora at all so i have to reboot...).
>>>> So is it possible to improve performances to the max on the guest
>>>> without almost killing the host ?
>>>> Should i consider switching my gear for a bi-xeon? (to assign one fully
>>>> to the host and one to the guest)
>>>> I'm actually not sure about what happen here, does anyone ran into the
>>>> same sort of issue?
>>>> Have a good day
>>>>
>>>> _______________________________________________
>>>> vfio-users mailing list
>>>> vfio-users redhat com
>>>> https://www.redhat.com/mailman/listinfo/vfio-users
>>>>
>>>
>>
>
>
> _______________________________________________
> vfio-users mailing list
> vfio-users redhat com
> https://www.redhat.com/mailman/listinfo/vfio-users
>



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