<html>
  <head>
    <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">Two things you can improve, IMO<br>
      * disable NO_HZ<br>
      * use isolcpus to dedicate your pinned CPUs to guest only - this
      will also ensure they are not used for guest  IO.<br>
      <br>
      <br>
      B.<br>
      <br>
      <br>
      On 29/02/2016 08:45, Rokas Kupstys wrote:<br>
    </div>
    <blockquote cite="mid:56D40536.4070205@zoho.com" type="cite">
      <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
      Yesterday i figured out my latency problem. All things listed
      everywhere on internet failed. Last thing i tried was pinning one
      vcpu to two physical cores and it brought latency down. Now i have
      FX-8350 CPU which has shared FPU for each two cores so maybe thats
      why. With just this pinning latency now is most of the time just
      above 1000μs. However under load latency increases. I threw out
      iothreads and emulator pinning and it did not affect much.
      Superior latency could be achieved using isolcpus=2-7, however
      leaving just two cores to host is unacceptable. With that setting
      latency was around 500μs without load. Good part is that
      Battlefield3 no longer lags, although i observed increased loading
      times on textures compared to bare metal. Not so good part is that
      there still is minor sound skipping/cracking since latency is
      spiking up under load. That is very disappointing. I also tried
      performance with two VM cores pinned to 4 host cores - bf3 lagged
      enough to be unplayable. 3 vm cores pinned to 6 host cores was
      already playable but sound was still cracking. I noticed little
      difference between that and 4 vm cores pinned to 8 host cores. Be
      nice if sound could be cleaned up. If anyone have any ideas im all
      ears. Libvirt xml i use now:<br>
      <br>
      <blockquote type="cite">  <vcpu
        placement='static'>4</vcpu><br>
          <cputune><br>
            <vcpupin vcpu='0' cpuset='0-1'/><br>
            <vcpupin vcpu='1' cpuset='2-3'/><br>
            <vcpupin vcpu='2' cpuset='4-5'/><br>
            <vcpupin vcpu='3' cpuset='6-7'/><br>
          </cputune><br>
          <features><br>
            <acpi/><br>
            <apic/><br>
            <pae/><br>
            <hap/><br>
            <viridian/><br>
            <hyperv><br>
              <relaxed state='on'/><br>
              <vapic state='on'/><br>
              <spinlocks state='on' retries='8191'/><br>
            </hyperv><br>
            <kvm><br>
              <hidden state='on'/><br>
            </kvm><br>
            <pvspinlock state='on'/><br>
          </features><br>
          <cpu mode='host-passthrough'><br>
            <topology sockets='1' cores='4' threads='1'/><br>
          </cpu><br>
          <clock offset='utc'><br>
            <timer name='rtc' tickpolicy='catchup'/><br>
            <timer name='pit' tickpolicy='delay'/><br>
            <timer name='hpet' present='no'/><br>
            <timer name='hypervclock' present='yes'/><br>
          </clock><br>
        <br>
      </blockquote>
      Kernel configs<br>
      <blockquote type="cite"> CONFIG_NO_HZ_FULL=y<br>
        CONFIG_RCU_NOCB_CPU_ALL=y<br>
        CONFIG_HZ_1000=y<br>
        CONFIG_HZ=1000</blockquote>
      I am not convinced 1000 hz tickrate is needed. Default one (300)
      seems to perform equally as well from looking at latency charts.
      Did not get chance to test it with bf3 yet however.<br>
      <br>
      <br>
      <div class="moz-cite-prefix">On 2016.01.12 11:12, thibaut noah
        wrote:<br>
      </div>
      <br>
    </blockquote>
    <br>
    [cut]<br>
    <br>
  </body>
</html>