Bug 854528 - spice: fix vga mode performance
spice: fix vga mode performance
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: qemu-kvm (Show other bugs)
6.3
Unspecified Unspecified
unspecified Severity unspecified
: rc
: ---
Assigned To: Gerd Hoffmann
Virtualization Bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-09-05 05:30 EDT by Gerd Hoffmann
Modified: 2013-02-21 02:39 EST (History)
10 users (show)

See Also:
Fixed In Version: qemu-kvm-0.12.1.2-2.322.el6
Doc Type: Bug Fix
Doc Text:
Cause: spice used page dirty tracking only to figure which screen areas need updating (with qxl in vga mode). Consequence: update areas are basically tracked with scanline granularity, resulting in bulky screen updates being sent even in case only a small portion of the screen has been updated. Fix: Keep a copy of the most recent screen content send to the spice client, use it to figure which screen areas need updating instead if just sending the whole scanline. Result: Required bandwith goes down, interactive performance goes up. Especially noticable with win8 guests which have no qxl drivers (yet) and thus run in vga mode all the time.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-02-21 02:39:38 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Gerd Hoffmann 2012-09-05 05:30:35 EDT
Description of problem:
The performance of spice is pretty bad in vga mode (i.e. without qxl driver loaded in the guest).  With no qxl driver being available for win8 for the time being, thus vga mode being used for everyday work and not only for install+boot we should better fix that ...
Comment 6 mazhang 2012-09-10 01:46:32 EDT
Hi Gerd,

Try to reproduce this bug in:
kernle
2.6.32-303.el6.x86_64
qemu-kvm
qemu-kvm-0.12.1.2-2.312.el6.x86_64
spice
0.10.1

steps:
1 boot win8 guest
2 enter "Startup Settings" screen and click "Restart"
3 Windows 8 then reveals its brand new Startup Settings screen. Press F3 key to Enable low-resolution video.

Results:
the mouse pointer on the desktop move smooth

plus: Could not fould win8 in winPcap supported platform.
Comment 7 Gerd Hoffmann 2012-09-10 03:24:42 EDT
> Results:
> the mouse pointer on the desktop move smooth

Maybe it isn't noticable when running qemu-kvm and spice client on the same machine.  I have a ethernet connection (100 mbit) between them where it is noticable.
Comment 8 mazhang 2012-09-11 05:22:08 EDT
(In reply to comment #7)
> > Results:
> > the mouse pointer on the desktop move smooth
> 
> Maybe it isn't noticable when running qemu-kvm and spice client on the same
> machine.  I have a ethernet connection (100 mbit) between them where it is
> noticable.

yes, it was affected with network environment, It isn't noticable on my host, but reproduced on another mechine.

btw, How do you run wireshark on win8 platform, I try run it, but install winPcap failed. could you give me a detail steps? thanks.
Comment 9 Gerd Hoffmann 2012-09-11 07:16:13 EDT
I run wireshark on the linux machine where the spice client runs on.
Then:

 (1) start capture on the ethernet interface,
 (2) go to menu -> statistics -> io graph.
 (3) filter by spice port @ host, I'm using this for my setup:
     ip.host == "xeni" && tcp.port == 5906

Gives a nice real-time graph of the network load created by spice.
Then start using the win8 guest & watch the graph.
Comment 11 Gerd Hoffmann 2012-09-21 04:27:43 EDT
patches posted.
Comment 14 Qunfang Zhang 2012-10-15 08:46:47 EDT
Reproduced this issue with the same steps in Comment 10 on qemu-kvm-0.12.1.2-2.316.el6.

Steps:
1. Boot a guest with spice+vga on host A.

 /usr/libexec/qemu-kvm -M rhel6.4.0 -cpu Conroe -m 2048 -smp 2,sockets=2,cores=1,threads=1 -enable-kvm -name win7 -uuid feebc8fd-f8b0-4e75-abc3-e63fcdb67170 -smbios type=1,manufacturer='Red Hat',product='RHEV Hypervisor',version=el6,serial=koTUXQrb,uuid=feebc8fd-f8b0-4e75-abc3-e63fcdb67170 -k en-us -rtc base=utc,clock=host,driftfix=slew -no-kvm-pit-reinjection -device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 -device usb-tablet,id=input0 -drive file=/home/win7-64-virtio.qcow2,format=qcow2,if=none,cache=none,werror=stop,rerror=stop,id=test -device ide-drive,bus=ide.0,unit=1,drive=test,id=ide0 -drive if=none,media=cdrom,id=drive-ide0-1-0,readonly=on,format=raw -device ide-drive,bus=ide.1,unit=0,drive=drive-ide0-1-0,id=ide0-1-0 -netdev tap,id=hostnet0,vhost=on -device virtio-net-pci,netdev=hostnet0,id=net0,mac=00:23:AE:7A:6E:10,bus=pci.0,addr=0x5  -monitor stdio -qmp tcp:0:6666,server,nowait -boot c -bios /usr/share/seabios/bios-pm.bin -chardev socket,path=/tmp/isa-serial,server,nowait,id=isa1 -device isa-serial,chardev=isa1,id=isa-serial1 -drive if=none,id=drive-fdc0-0-0,readonly=on,format=raw -global isa-fdc.driveA=drive-fdc0-0-0 -spice port=5930,disable-ticketing -vga std

2. Open guest desktop on host B
#spicec -h $host_A_IP -p 5930

3.install and run wireshark on host B, start capture on the ethernet interface
#yum install wireshark && wireshark-gnome
#wireshark

4.go to menu -> statistics -> io graph.
filter by spice port @ host
     ip.host == "ip.host_A" && tcp.port == 5930

5.move the mouse pointer on desktop

Result:
1. Mouse pointer on the desktop moves are snappier.
2. Produce spikes in the graph by moving around the mouse pointer
and bandwidth is nearly 5000.

Verified on qemu-kvm-0.12.1.2-2.323.el6 with the same steps.

Result: 

1. Mouse pointer moves are smooth.
2. Wireshark graph shows the bandwidth lower than 1000,curve were running smoothly.

So, this bug is verified pass.
Comment 17 errata-xmlrpc 2013-02-21 02:39:38 EST
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2013-0527.html

Note You need to log in before you can comment on or make changes to this bug.