[Spice-devel] Spice-gtk and cpu consumption

Marc-André Lureau mlureau at redhat.com
Fri Jan 6 07:59:50 PST 2012


----- Mensaje original -----
> - On my laptop, with decent processor ( sempron / graphics card is
> dri2 / drm capable) :
>  - I can see video very well with spice-gtk
>  - if I move a windows as firefox , it's it' really smoothly
> - cpu consumption :  spice-gtk ~ 30%  , X ~ 10%
> - On a thin client as wyse Z90 ( AMD G-T52R 1.5GHz Processor with AMD
> Radeon™ HD 6310 Graphics  )  ( dri2/ drm )
> http://www.wyse.com/products/hardware/thinclients/Z90/index.asp
> - if i move a windows as firefox is very bad , lag is important
> - If i see a video , it's very bad ( lag / bug jump ..)
> - cpu comsumption : spice-gtk ~ 75% , X ~ 25
>  ( cpu load is < 1 )
> My question is :
> So it's seems spice-gtk is very hungry,
> how can optimize it ?

So far, spice-gtk has not been optimized to run on thin-client. This was not our primary goal, but we are certainly interested to improve in that direction. There is a couple of things you can do to improve performance already. Are you using spicy? In fullscreen? Do you have scaling enabled? you should turn it off. Is your client resolution matching guest resolution? You can enable the X11 shm backend in spice-gtk --with-x11 and gtk2 that should speed things a little. Did you compile with ucontext coroutine? All your libraries, in particular pixman, are compiled with host optimization?..

Otoh, spicec is much lighter and a bit faster in some area (it's not using Gtk/Cairo and prefer X11 shm). It would be interesting if you could run the same tests with spicec and tell us the differences (cpu and video performance etc..)

Btw, what video are you playing in the guest, at which resolution / framerate etc..

> - is it only libjpeg-turbo that do the big stuff so nothing to do ?

For video, yes. But the update of video region is quite slow right now, we may use video overlays in the future to speed up yuv->rgb, scaling, and updating large surfaces.

> - do you know which piece of code is so hungry ?

Afaik, cpu time is all related to drawing, and blitting. X11 shm backend should improve things (but you will lose some features you may not need on thinclients)


More information about the Spice-devel mailing list