<div dir="ltr">Pinning/customizing vcpu AND removing the balloon apparently solve the problem</div><div class="gmail_extra"><br><div class="gmail_quote">2015-12-29 14:07 GMT+01:00 Quentin Deldycke <span dir="ltr"><<a href="mailto:quentindeldycke@gmail.com" target="_blank">quentindeldycke@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hello,<div><br><div>Little question about atop: Is this normal to have a usage of 50% in user and 50% in guest when running a task on all cores of the vm? (windows report 100% on all cores)</div></div><div><br></div><div>With full vm on full dynticks cpus + cpuset and redirected pcie ssd + ahci controlers.</div><div><br></div><div>Note: for the main topic: using a 4970k like you, 16g of ram, 12 for the guest. My debian with kde, spotify, network shares is full operational using 2 cores, having 6 allocated to the vm.</div><div><br></div><div>I am now using whole controllers to the vm, but i was using a simple .raw file before, and i never had any problem of debian lags. Can you provide the xml file? or any other information about how you start the vm?</div><div><br></div></div><div class="gmail_extra"><br clear="all"><div><div><div dir="ltr">--<div>Deldycke Quentin<br></div><div><div><br></div></div></div></div></div><div><div class="h5">
<br><div class="gmail_quote">On 29 December 2015 at 11:52, thibaut noah <span dir="ltr"><<a href="mailto:thibaut.noah@gmail.com" target="_blank">thibaut.noah@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Actually i have a lvm using the ssd for fedora os and a harddrive for the swap.</div><div class="gmail_extra"><br><div class="gmail_quote"><span>2015-12-29 11:50 GMT+01:00 thibaut noah <span dir="ltr"><<a href="mailto:thibaut.noah@gmail.com" target="_blank">thibaut.noah@gmail.com</a>></span>:<br></span><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span><div dir="ltr">Sure but how do i do that?<br>I can check the memory usage on the guest using rivaturner ( i don't use more than 9gB of ram, i have 16), may the problem come from the balloon option at the end of the xml ? Dunno how to check the rest though.<div><br>For disk io i use a separate ssd for the vm and all other disks are not mount when i launch it (it will fail otherwise if i remember correctly).<br>But talking about swap i need to check where the swap for fedora is, maybe there is something worth checking here.<div><br>I already reduced the memory i assign to the windows vm because otherwise it would fail, apparently fedora likes to take a lot of ram of nothing.</div></div></div></span><div><div><div class="gmail_extra"><br><div class="gmail_quote"><span>2015-12-29 11:38 GMT+01:00 Karsten Elfenbein <span dir="ltr"><<a href="mailto:karsten.elfenbein@gmail.com" target="_blank">karsten.elfenbein@gmail.com</a>></span>:<br></span><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span>If it takes time to recover after exiting the VM I think you have a<br>
different problem than CPU pinning.<br>
While my Windows VM is idle all CPU cores are idle on the host as well.<br>
<br>
Time to recover sounds more like a system that swapped out memory to<br>
make room for the VM. After exiting it needs the swapped out process<br>
memory which takes time.<br>
Can you check the memory/swap/disk io usage?<br>
</span><div><div><div><div><br>
2015-12-29 11:13 GMT+01:00 thibaut noah <<a href="mailto:thibaut.noah@gmail.com" target="_blank">thibaut.noah@gmail.com</a>>:<br>
> I'll try to set the topology tonight.<br>
> Fedora still takes time to be fully operationnal after exiting windows, and<br>
> i use windows only not putting more load on fedora, weird.<br>
> My goal by tweaking the vcpu is to get the best possible performance i can<br>
> reach without crippling the host os.<br>
> dual xeon are indeed expensive, specially those with 3+ghz, dunno if i need<br>
> that much cpu for windows though i'm not sure, i can try by just using<br>
> 2physical cores and see how it goes for both os, would be nice if i could<br>
> apply the new patch to move my keyboard from guest to host T_T<br>
><br>
> 2015-12-28 10:54 GMT+01:00 Karsten Elfenbein <<a href="mailto:karsten.elfenbein@gmail.com" target="_blank">karsten.elfenbein@gmail.com</a>>:<br>
>><br>
>> It just hands the layout of your CPU to the guest. So apps can decide<br>
>> on threading.<br>
>><br>
>> Pinning the CPU to avoid CPU 0 and 4 will reduce the performance a bit<br>
>> as a complete physical core is reserved for the host OS.<br>
>> There are faster Desktop CPUs to compensate if needed but dual Xeon<br>
>> that can keep up in single thread performance are expensive and you<br>
>> would need 2 CPU + memory + board.<br>
>><br>
>><br>
>><br>
>> 2015-12-28 10:24 GMT+01:00 Eddie Yen <<a href="mailto:missile0407@gmail.com" target="_blank">missile0407@gmail.com</a>>:<br>
>> ><br>
>> > This should provide the guest some details of the provided vCPUs:<br>
>> ><br>
>> > <topology sockets='1' cores='3' threads='2'/><br>
>> ><br>
>> ><br>
>> > I tested this method before, using the 4820K.<br>
>> > The result I got is the performance not get better that set whole<br>
>> > threads as<br>
>> > cores when tested 3DMark.<br>
>> > But I didn't pinning 0 and 4 thread to host.<br>
>> ><br>
>> > I'll test it again soon.<br>
>> ><br>
>> > 2015-12-28 17:13 GMT+08:00 Karsten Elfenbein<br>
>> > <<a href="mailto:karsten.elfenbein@gmail.com" target="_blank">karsten.elfenbein@gmail.com</a>>:<br>
>> >><br>
>> >> Hi,<br>
>> >><br>
>> >> that looks good. Processors 0 and 4 are not used in pinning and remain<br>
>> >> on the host OS. <a href="https://en.wikipedia.org/wiki/Hyper-threading" rel="noreferrer" target="_blank">https://en.wikipedia.org/wiki/Hyper-threading</a><br>
>> >> Basically as soon as you load one OS CPU on a physical core the other<br>
>> >> HT core will be able to perform a lot less stuff.<br>
>> >><br>
>> >> This should provide the guest some details of the provided vCPUs:<br>
>> >> <topology sockets='1' cores='3' threads='2'/><br>
>> >><br>
>> >><br>
>> >> 2015-12-28 6:55 GMT+01:00 thibaut noah <<a href="mailto:thibaut.noah@gmail.com" target="_blank">thibaut.noah@gmail.com</a>>:<br>
>> >> > So is this the right emulation? If i understand correctly what i'm<br>
>> >> > trying to<br>
>> >> > get is a 3cores with 2threads per core ? (so 6cores pinned?)<br>
>> >> > I don't have that much knowledge in cpu so i'm kinda lost here.<br>
>> >> ><br>
>> >> > <cputune><br>
>> >> >     <vcpupin vcpu='0' cpuset='1'/><br>
>> >> >     <vcpupin vcpu='1' cpuset='2'/><br>
>> >> >     <vcpupin vcpu='2' cpuset='3'/><br>
>> >> >     <vcpupin vcpu='3' cpuset='5'/><br>
>> >> >     <vcpupin vcpu='4' cpuset='6'/><br>
>> >> >     <vcpupin vcpu='5' cpuset='7'/><br>
>> >> >   </cputune><br>
>> >> ><br>
>> >> > 2015-12-26 18:53 GMT+01:00 Karsten Elfenbein<br>
>> >> > <<a href="mailto:karsten.elfenbein@gmail.com" target="_blank">karsten.elfenbein@gmail.com</a>>:<br>
>> >> >><br>
>> >> >> check that the 2 cores for the host OS are on the same physical core<br>
>> >> >> and that the VM does not use those 2 processors with the same core<br>
>> >> >> id<br>
>> >> >><br>
>> >> >> cat /proc/cpuinfo | grep -e processor -e 'core id'<br>
>> >> >><br>
>> >> >> CPU 0-3 should be the core 0-3<br>
>> >> >> CPU 4-7 should be the core 0-3 again with HT<br>
>> >> >><br>
>> >> >> so leaving out CPU 0 and 4 should keep core 0 idle and the host OS<br>
>> >> >> responsive<br>
>> >> >><br>
>> >> >> taskset 1-3,5-7 startVM.sh<br>
>> >> >><br>
>> >> >> Karsten<br>
>> >> >><br>
>> >> >> 2015-12-26 12:56 GMT+01:00 Eddie Yen <<a href="mailto:missile0407@gmail.com" target="_blank">missile0407@gmail.com</a>>:<br>
>> >> >> > Pining CPU can reduce the happening that host and guest using the<br>
>> >> >> > same<br>
>> >> >> > thread at the same time.<br>
>> >> >> ><br>
>> >> >> > And I don't know which program you're using on Fedora, so I don't<br>
>> >> >> > have<br>
>> >> >> > quite<br>
>> >> >> > answer that 2 threads is enough for host or not.<br>
>> >> >> > It's all depends on your usage case.<br>
>> >> >> ><br>
>> >> >> > 2015-12-26 19:44 GMT+08:00 thibaut noah <<a href="mailto:thibaut.noah@gmail.com" target="_blank">thibaut.noah@gmail.com</a>>:<br>
>> >> >> >><br>
>> >> >> >> My cpu is a i7 4790k, is pinning the cpu usefull ? I'll try to<br>
>> >> >> >> derp<br>
>> >> >> >> a<br>
>> >> >> >> bit<br>
>> >> >> >> with the vcpu thing, just afraid 2 threads aren't enough for<br>
>> >> >> >> fedora<br>
>> >> >> >> :/<br>
>> >> >> >><br>
>> >> >> >> 2015-12-26 11:59 GMT+01:00 Eddie Yen <<a href="mailto:missile0407@gmail.com" target="_blank">missile0407@gmail.com</a>>:<br>
>> >> >> >>><br>
>> >> >> >>> I forgot your CPU type, so I don't know about your case.<br>
>> >> >> >>><br>
>> >> >> >>> But, as I'm using 4820K, I usually using 4 to 6 threads gave to<br>
>> >> >> >>> VM,<br>
>> >> >> >>> only<br>
>> >> >> >>> use 2 threads for Fedora host.<br>
>> >> >> >>> And most important is vCPU tweaks, especially CPU topology and<br>
>> >> >> >>> Hyper-V.<br>
>> >> >> >>><br>
>> >> >> >>> For me, I usually set topology as "sockets=1 cores=6 threads=1"<br>
>> >> >> >>> if<br>
>> >> >> >>> using<br>
>> >> >> >>> 6 threads from host.<br>
>> >> >> >>> Then set cpuset= to let vCPU worked on pointed CPU threads.<br>
>> >> >> >>><br>
>> >> >> >>> IME, set all threads as vCPU cores can got better performance on<br>
>> >> >> >>> Windows<br>
>> >> >> >>> 10.<br>
>> >> >> >>><br>
>> >> >> >>> 2015-12-26 18:00 GMT+08:00 thibaut noah<br>
>> >> >> >>> <<a href="mailto:thibaut.noah@gmail.com" target="_blank">thibaut.noah@gmail.com</a>>:<br>
>> >> >> >>>><br>
>> >> >> >>>> Hello guys merry christmas ! o/<br>
>> >> >> >>>> My current issue is vm and host optimization, i use my windows<br>
>> >> >> >>>> 10<br>
>> >> >> >>>> vm<br>
>> >> >> >>>> for<br>
>> >> >> >>>> gaming purposes only (like most of us i think), problem is, to<br>
>> >> >> >>>> keep<br>
>> >> >> >>>> my<br>
>> >> >> >>>> performances on windows high i drain too much ressources on my<br>
>> >> >> >>>> fedora<br>
>> >> >> >>>> host<br>
>> >> >> >>>> thus making it almost useless (also when leaving the vm i most<br>
>> >> >> >>>> of<br>
>> >> >> >>>> the<br>
>> >> >> >>>> time<br>
>> >> >> >>>> found myself unable to use fedora at all so i have to<br>
>> >> >> >>>> reboot...).<br>
>> >> >> >>>> So is it possible to improve performances to the max on the<br>
>> >> >> >>>> guest<br>
>> >> >> >>>> without almost killing the host ?<br>
>> >> >> >>>> Should i consider switching my gear for a bi-xeon? (to assign<br>
>> >> >> >>>> one<br>
>> >> >> >>>> fully<br>
>> >> >> >>>> to the host and one to the guest)<br>
>> >> >> >>>> I'm actually not sure about what happen here, does anyone ran<br>
>> >> >> >>>> into<br>
>> >> >> >>>> the<br>
>> >> >> >>>> same sort of issue?<br>
>> >> >> >>>> Have a good day<br>
>> >> >> >>>><br>
>> >> >> >>>> _______________________________________________<br>
>> >> >> >>>> vfio-users mailing list<br>
>> >> >> >>>> <a href="mailto:vfio-users@redhat.com" target="_blank">vfio-users@redhat.com</a><br>
>> >> >> >>>> <a href="https://www.redhat.com/mailman/listinfo/vfio-users" rel="noreferrer" target="_blank">https://www.redhat.com/mailman/listinfo/vfio-users</a><br>
>> >> >> >>>><br>
>> >> >> >>><br>
>> >> >> >><br>
>> >> >> ><br>
>> >> >> ><br>
>> >> >> > _______________________________________________<br>
>> >> >> > vfio-users mailing list<br>
>> >> >> > <a href="mailto:vfio-users@redhat.com" target="_blank">vfio-users@redhat.com</a><br>
>> >> >> > <a href="https://www.redhat.com/mailman/listinfo/vfio-users" rel="noreferrer" target="_blank">https://www.redhat.com/mailman/listinfo/vfio-users</a><br>
>> >> >> ><br>
>> >> ><br>
>> >> ><br>
>> ><br>
>> ><br>
><br>
><br>
</div></div></div></div></blockquote></div><br></div>
</div></div></blockquote></div><br></div>
<br>_______________________________________________<br>
vfio-users mailing list<br>
<a href="mailto:vfio-users@redhat.com" target="_blank">vfio-users@redhat.com</a><br>
<a href="https://www.redhat.com/mailman/listinfo/vfio-users" rel="noreferrer" target="_blank">https://www.redhat.com/mailman/listinfo/vfio-users</a><br>
<br></blockquote></div><br></div></div></div>
</blockquote></div><br></div>