<html>
  <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <p>Hello Yaniv.</p>
    <p>It also looks to me initially that for 1Gbps multi-queue would
      not be necessary, however the Virtual Machine is relatively busy
      where the CPU necessary to process it may (or not) be competing
      with the processes running on in the guest.</p>
    <p>The network is as following: 3 x 1 Gb interfaces  bonded together
      with layer2+3 has algorithm where the VMs connect to the outside
      world.<br>
      vNIC1 and vNIC2 in the VMs are the same VirtIO NIC types. These
      vNICs are connected to the same VLAN and they are both able to
      output 1Gbps throughput each at the same time in iperf tests as
      the bond below has 3Gb capacity.</p>
    <p>Please note something interesting I mentioned previously: All
      traffic currently goes in and out via vNIC1 which is showing
      packet loss (3% to 10%) on the tests conducted. NIC2 has zero
      traffic and if the same tests are conducted against it shows 0%
      packets loss.<br>
      At first impression if it was something related to the bond or
      even to the physical NICs on the Host it should show packet loss
      for ANY of the vNICs as the traffic flows through the same
      physical NIC and bond, but is not the case.</p>
    <p>This is the qemu-kvm command the Host is executing:<br>
      /usr/libexec/qemu-kvm -name
      guest=VM_NAME_REPLACED,debug-threads=on -S -object
secret,id=masterKey0,format=raw,file=/var/lib/libvirt/qemu/domain-6-VM_NAME_REPLACED/master-key.aes
      -machine pc-i440fx-rhel7.3.0,accel=kvm,usb=off -cpu SandyBridge -m
      4096 -realtime mlock=off -smp
      4,maxcpus=16,sockets=16,cores=1,threads=1 -numa
      node,nodeid=0,cpus=0-3,mem=4096 -uuid
      57ffc2ed-fec5-47d6-bfb1-60c728737bd2 -smbios
      type=1,manufacturer=oVirt,product=oVirt
Node,version=7-3.1611.el7.centos,serial=4C4C4544-0043-5610-804B-B1C04F4E3232,uuid=57ffc2ed-fec5-47d6-bfb1-60c728737bd2
      -no-user-config -nodefaults -chardev
socket,id=charmonitor,path=/var/lib/libvirt/qemu/domain-6-VM_NAME_REPLACED/monitor.sock,server,nowait
      -mon chardev=charmonitor,id=monitor,mode=control -rtc
      base=2017-03-17T01:12:39,driftfix=slew -global
      kvm-pit.lost_tick_policy=discard -no-hpet -no-shutdown -boot
      strict=on -device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2
      -device virtio-scsi-pci,id=scsi0,bus=pci.0,addr=0x7 -device
      virtio-serial-pci,id=virtio-serial0,max_ports=16,bus=pci.0,addr=0x5
      -drive if=none,id=drive-ide0-1-0,readonly=on -device
      ide-cd,bus=ide.1,unit=0,drive=drive-ide0-1-0,id=ide0-1-0 -drive
file=/rhev/data-center/2325e1a4-c702-469c-82eb-ff43baa06d44/8dcd90f4-c0f0-47db-be39-5b49685acc04/images/ebe10e75-799a-439e-bc52-551b894c34fa/1a73cd53-0e51-4e49-8631-38cf571f6bb9,format=qcow2,if=none,id=drive-scsi0-0-0-0,serial=ebe10e75-799a-439e-bc52-551b894c34fa,cache=none,werror=stop,rerror=stop,aio=native
      -device
scsi-hd,bus=scsi0.0,channel=0,scsi-id=0,lun=0,drive=drive-scsi0-0-0-0,id=scsi0-0-0-0,bootindex=1
      -drive
file=/rhev/data-center/2325e1a4-c702-469c-82eb-ff43baa06d44/8dcd90f4-c0f0-47db-be39-5b49685acc04/images/db401b27-006d-494c-a1ee-1d37810710c8/664cffe6-52f8-429d-8bb9-2f43fa7a468f,format=qcow2,if=none,id=drive-scsi0-0-0-1,serial=db401b27-006d-494c-a1ee-1d37810710c8,cache=none,werror=stop,rerror=stop,aio=native
      -device
scsi-hd,bus=scsi0.0,channel=0,scsi-id=0,lun=1,drive=drive-scsi0-0-0-1,id=scsi0-0-0-1
      -netdev tap,fd=33,id=hostnet0,vhost=on,vhostfd=36 -device
virtio-net-pci,netdev=hostnet0,id=net0,mac=00:1a:4a:16:01:60,bus=pci.0,addr=0x3
      -netdev tap,fd=37,id=hostnet1,vhost=on,vhostfd=38 -device
virtio-net-pci,netdev=hostnet1,id=net1,mac=00:1a:4a:16:01:61,bus=pci.0,addr=0x4
      -chardev
socket,id=charchannel0,path=/var/lib/libvirt/qemu/channels/57ffc2ed-fec5-47d6-bfb1-60c728737bd2.com.redhat.rhevm.vdsm,server,nowait
      -device
virtserialport,bus=virtio-serial0.0,nr=1,chardev=charchannel0,id=channel0,name=com.redhat.rhevm.vdsm
      -chardev
socket,id=charchannel1,path=/var/lib/libvirt/qemu/channels/57ffc2ed-fec5-47d6-bfb1-60c728737bd2.org.qemu.guest_agent.0,server,nowait
      -device
virtserialport,bus=virtio-serial0.0,nr=2,chardev=charchannel1,id=channel1,name=org.qemu.guest_agent.0
      -chardev spicevmc,id=charchannel2,name=vdagent -device
virtserialport,bus=virtio-serial0.0,nr=3,chardev=charchannel2,id=channel2,name=com.redhat.spice.0
      -vnc 192.168.100.19:2,password -k pt-br -spice
tls-port=5903,addr=192.168.100.19,x509-dir=/etc/pki/vdsm/libvirt-spice,tls-channel=default,tls-channel=main,tls-channel=display,tls-channel=inputs,tls-channel=cursor,tls-channel=playback,tls-channel=record,tls-channel=smartcard,tls-channel=usbredir,seamless-migration=on
      -k pt-br -device
qxl-vga,id=video0,ram_size=67108864,vram_size=33554432,vram64_size_mb=0,vgamem_mb=16,bus=pci.0,addr=0x2
      -incoming defer -device
      virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x6 -object
      rng-random,id=objrng0,filename=/dev/urandom -device
      virtio-rng-pci,rng=objrng0,id=rng0,bus=pci.0,addr=0x8 -msg
      timestamp=on<br>
    </p>
    <p>Load in the VM is relatively high (20 to 30) and CPU usage is
      between 50% to 60% with eventual peaks of 100% in one of the
      vCPUs. There is a lot of processes running in the VM similar to
      Web Servers which is using this amount of CPU.</p>
    <p>Only guess I could have so far is that traffic on NIC1 is being
      handeled by one of the vCPUs which eventually get 100% due to some
      of the processes while traffic on NIC2 is handled by another vCPU
      which is not that busy and explains the 0% packet loss. BUT,
      should VirtIO vNIC use CPU from within the Guest ?<br>
      Does it make any sense ?</p>
    <p>Thanks</p>
    <p>Fernando<br>
    </p>
    <br>
    <div class="moz-cite-prefix">On 18/03/2017 12:53, Yaniv Kaul wrote:<br>
    </div>
    <blockquote
cite="mid:CAJgorsaK0pKUvkzecg+oGYwHCrw+essr8jiGk3cGPrzO9PGrqw@mail.gmail.com"
      type="cite">
      <div dir="ltr"><br>
        <div class="gmail_extra"><br>
          <div class="gmail_quote">On Fri, Mar 17, 2017 at 6:11 PM,
            FERNANDO FREDIANI <span dir="ltr">&lt;<a
                moz-do-not-send="true"
                href="mailto:fernando.frediani@upx.com" target="_blank">fernando.frediani@upx.com</a>&gt;</span>
            wrote:<br>
            <blockquote class="gmail_quote" style="margin:0 0 0
              .8ex;border-left:1px #ccc solid;padding-left:1ex">
              <div dir="ltr">
                <div>
                  <div>
                    <div>
                      <div>
                        <div>
                          <div>
                            <div>
                              <div>Hello all.<br>
                                <br>
                              </div>
                              I have a peculiar problem here which
                              perhaps others may have had or know about
                              and can advise.<br>
                              <br>
                            </div>
                            I have Virtual Machine with 2 VirtIO NICs.
                            This VM serves around 1Gbps of traffic with
                            thousands of clients connecting to it. When
                            I do a packet loss test to the IP pinned to
                            NIC1 it varies from 3% to 10% of packet
                            loss. When I run the same test on NIC2 the
                            packet loss is consistently 0%.<br>
                            <br>
                          </div>
                          From what I gather I may have something to do
                          with possible lack of Multi Queu VirtIO where
                          NIC1 is managed by a single CPU which might be
                          hitting 100% and causing this packet loss.<br>
                          <br>
                        </div>
                        Looking at this reference (<a
                          moz-do-not-send="true"
                          href="https://fedoraproject.org/wiki/Features/MQ_virtio_net"
                          target="_blank">https://fedoraproject.org/<wbr>wiki/Features/MQ_virtio_net</a>)
                        I see one way to test it is start the VM with 4
                        queues (for example), but checking on the
                        qemu-kvm process I don't see option present. Any
                        way I can force it from the Engine ?<br>
                      </div>
                    </div>
                  </div>
                </div>
              </div>
            </blockquote>
            <div><br>
            </div>
            <div>I don't see a need for multi-queue for 1Gbps.</div>
            <div>Can you share the host statistics, the network
              configuration, the qemu-kvm command line, etc.?</div>
            <div>What is the difference between NIC1 and NIC2, in the
              way they are connected to the outside world?</div>
            <div> </div>
            <blockquote class="gmail_quote" style="margin:0 0 0
              .8ex;border-left:1px #ccc solid;padding-left:1ex">
              <div dir="ltr">
                <div>
                  <div>
                    <div>
                      <div><br>
                      </div>
                      This other reference (<a moz-do-not-send="true"
                        href="https://www.linux-kvm.org/page/Multiqueue#Enable_MQ_feature"
                        target="_blank">https://www.linux-kvm.org/<wbr>page/Multiqueue#Enable_MQ_<wbr>feature</a>)
                      points to the same direction about starting the VM
                      with queues=N<br>
                      <br>
                    </div>
                    <div>Also trying to increase the TX ring buffer
                      within the guest with ethtool -g eth0 is not
                      possible.<br>
                    </div>
                    <div><br>
                    </div>
                    Oh, by the way, the Load on the VM is significantly
                    high despite the CPU usage isn't above 50% - 60% in
                    average.<br>
                  </div>
                </div>
              </div>
            </blockquote>
            <div><br>
            </div>
            <div>Load = latest 'top' results? Vs. CPU usage? Can mean a
              lot of processes waiting for CPU and doing very little -
              typical for web servers, for example. What is occupying
              the CPU?</div>
            <div>Y.</div>
            <div> </div>
            <blockquote class="gmail_quote" style="margin:0 0 0
              .8ex;border-left:1px #ccc solid;padding-left:1ex">
              <div dir="ltr">
                <div>
                  <div><br>
                  </div>
                  Thanks<span class="HOEnZb"><font color="#888888"><br>
                    </font></span></div>
                <span class="HOEnZb"><font color="#888888">Fernando<br>
                    <div>
                      <div>
                        <div>
                          <div><br>
                            <br>
                          </div>
                        </div>
                      </div>
                    </div>
                  </font></span></div>
              <br>
              ______________________________<wbr>_________________<br>
              Users mailing list<br>
              <a moz-do-not-send="true" href="mailto:Users@ovirt.org">Users@ovirt.org</a><br>
              <a moz-do-not-send="true"
                href="http://lists.ovirt.org/mailman/listinfo/users"
                rel="noreferrer" target="_blank">http://lists.ovirt.org/<wbr>mailman/listinfo/users</a><br>
              <br>
            </blockquote>
          </div>
          <br>
        </div>
      </div>
    </blockquote>
    <br>
  </body>
</html>