Download presentation
Presentation is loading. Please wait.
Published byHomer Parsons Modified over 8 years ago
1
Red Hat Summit 2009 | Arnon Gilboa 1 SPICE: An Open Remote Computing Solution Presenter: Arnon Gilboa Project Leader: Yaniv Kamay Red Hat Israel September 4, 2009
2
Red Hat Summit 2009 | Arnon Gilboa 2 Agenda Why Spice? Architecture Spice Optimizations Future Developments Q&A
3
Red Hat Summit 2009 | Arnon Gilboa 3 Why Spice? Open remote computing solution Client access to remote machine display & devices Emphasize on virtual machines environment No need for guest networking User experience similar to local machine High quality video & audio Offload intensive CPU & GPU tasks to client Suitable for both LAN & WAN usage
4
Red Hat Summit 2009 | Arnon Gilboa 4 How Spice? Transfer graphic commands/objects (currently 2D) Other solutions use frame buffer updates Fill, copy, stretch, path stroke, text, pointer shape etc. Generic & platform-independent Lossless images, lossy video & audio
5
Red Hat Summit 2009 | Arnon Gilboa 5 ARCHITECTUR E
6
Red Hat Summit 2009 | Arnon Gilboa 6 Spice Architecture Devices (QXL, VDIPort) Guest QEMU/KVM Spice Server (libspice) Spice Client Client Host Spice Agent Drivers (QXL, VDIPort)
7
Red Hat Summit 2009 | Arnon Gilboa 7 Spice Protocol Guest QEMU/KVM Spice Server (libspice) Spice Client Client Devices Host Spice Agent Drivers Guest QEMU/KVM Spice Server (libspice) Spice Client Client Host
8
Red Hat Summit 2009 | Arnon Gilboa 8 Spice Protocol Client-server communication Set of messages for interaction with remote devices Graphic commands, keyboard & mouse events, audio streams etc. Secure authentication – ticketing (OTP) with expiration Connection establishment and control (e.g., migration) Flow control using window-acks
9
Red Hat Summit 2009 | Arnon Gilboa 9 Client-Server Communication: Channels Client & server communicate via channels TCP connections Each Channel dedicated to a specific type of data Channel can be secured using SSL or unsecured In the client, each channel has a dedicated thread Different QoS can be given per channel
10
Red Hat Summit 2009 | Arnon Gilboa 10 Channels Main - control and configuration and agent communication Display - handles graphic commands, images and video streams Inputs - keyboard and mouse inputs Cursor - pointer device position, visibility and cursor shape Playback - audio received from the server to be played by the client Record - audio capture on the client side
11
Red Hat Summit 2009 | Arnon Gilboa 11 Spice Server Guest QEMU/KVM Spice Server (libspice) Spice Client Client Devices Host Spice Agent Drivers Guest QEMU/KVM Spice Server (libspice) Spice Client Client Devices Host
12
Red Hat Summit 2009 | Arnon Gilboa 12 Spice Server – a pluggable library Virtual Device Interface (VDI) Defines a set of interfaces Publishes virtual devices (e.g., display, keyboard, mouse) Enables interaction with devices libspice – the server, a VDI-pluggable library Interacts with VDI host application (e.g., QEMU) Communicates with client using Spice protocol
13
Red Hat Summit 2009 | Arnon Gilboa 13 Spice Server – Interfaces QEMU PlaybackChannel Playback Interface RecordChannel Record Interface MainChannel Agent Interface InputsChannel kbd, mouse & tablet Interfaces Dispatcher Worker Thread DisplayChannel CursorChannel QXL Interface Spice Server
14
Red Hat Summit 2009 | Arnon Gilboa 14 Spice Server – Graphic Commands Processing (1) Graphic Commands Tree Contains the set of commands, whose execution will reproduce the display content Used to optimize commands transmission to the client by dropping commands hidden by others Command Pipe Commands to be sent to the client, for updating its display
15
Red Hat Summit 2009 | Arnon Gilboa 15 Spice Server – Graphic Commands Processing (2) Command Ring (IN) Expected Display Graphic Command Tree Command Pipe (OUT)
16
Red Hat Summit 2009 | Arnon Gilboa 16 Spice Server – Graphic Commands Processing (3) Attempt to pass the rendering job to the client, leveraging its hardware acceleration abilities Rendering on the host side by software or GPU is done as a last resort Release a command only when Completely covered by other commands and there are no dependencies on it Running out of resources, the command is rendered to the frame buffer When the guest needs to read from the frame buffer Command rendered to frame buffer & deleted from tree
17
Red Hat Summit 2009 | Arnon Gilboa 17 Spice Client Guest QEMU/KVM Spice Server (libspice) Spice Client Client Devices Host Spice Agent Drivers Guest QEMU/KVM Spice Server (libspice) Spice Client Client Host
18
Red Hat Summit 2009 | Arnon Gilboa 18 Spice Client End-user interface Cross-platform Linux & Windows Generic classes & interfaces Parallel implementation of platform-specific areas Does not require any codecs
19
Red Hat Summit 2009 | Arnon Gilboa 19 SPICE FRIENDS & FAMILY
20
Red Hat Summit 2009 | Arnon Gilboa 20 QXL Device & Driver Guest QEMU/KVM Spice Server (libspice) Spice Client Client QXL Device(s) Host Graphic Engine QXL Drivers
21
Red Hat Summit 2009 | Arnon Gilboa 21 QXL Device & Driver Transparent remote display Specific QEMU PCI display device Paravirtual device for enhanced performance Transfer generic graphic commands to server Pixmap hashing & cache hint Cursor support Windows driver & beta X11 driver already implemented Support standard VGA mode as well No drivers required Boot stage display
22
Red Hat Summit 2009 | Arnon Gilboa 22 VDIPort Device & Driver Guest QEMU/KVM Spice Server (libspice) Spice Client Client VDIPort Device Host Spice Agent VDIPort Driver
23
Red Hat Summit 2009 | Arnon Gilboa 23 VDIPort Device VDI port - QEMU PCI device used for communication with guest agent Agent communicates with both client & server using agent-dedicated protocol Windows guest driver already implemented
24
Red Hat Summit 2009 | Arnon Gilboa 24 Optional component Enhances user experience Performs guest-oriented tasks Injects mouse position and state Display settings configuration Spice Agent
25
Red Hat Summit 2009 | Arnon Gilboa 25 SPICE OPTIMIZATIONS
26
Red Hat Summit 2009 | Arnon Gilboa 26 Image Caching Client image caching: pixmaps, palettes and cursors Eliminates sending redundant instances of an image Image arrives from driver with unique id & cache hint Pixmap cache is shared among all the displays Synchronized between the server and client Server manages cache
27
Red Hat Summit 2009 | Arnon Gilboa 27 Image Compression Lossless - commands dependency, prevents artifacts Image-based Quic - based on SFALIC LZ - LZSS adjusted to images Global LZ (GLZ) LZ with a history-based global dictionary Takes advantage of repeating patterns among images Auto - Heuristic compression choice per image Synthetic images - LZ/GLZ Photos - Quic
28
Red Hat Summit 2009 | Arnon Gilboa 28 Video Compression Server heuristically identifies video streams Using the commands tree Areas constantly updated for a period of time Send them as video stream coded using M-JPEG Saves a lot of traffic, improving Spice performance, especially in WAN Reduces client & server CPU consumption Does not require any codecs
29
Red Hat Summit 2009 | Arnon Gilboa 29 Hardware Acceleration Basic client rendering - using Cairo Cross-platform, device-independent 2D library Client HW acceleration GDI in Windows OpenGL in Linux (experimental) Rendering by the client GPU instead of CPU High performance rendering Better client CPU utilization Server HW acceleration uses OpenGL Sharing code with the Linux client
30
Red Hat Summit 2009 | Arnon Gilboa 30 Mouse modes Client mode Client mouse used as the effective pointing device Guest agent used for cursor position injection Cursor shape & visibility - updated in a dedicated channel Smooth cursor motion and responsiveness Appropriate for WAN Server mode Server controls mouse position Always synchronized
31
Red Hat Summit 2009 | Arnon Gilboa 31 Other Features Multiple Monitors - tested on 4, no real limit Automatic configuration of guest displays 2-way Audio and Lip-sync Audio playback and recording Playback compressed using CELT Lip-sync using video frames time-stamping Hardware Cursor Separated from display, reduces network traffic Enables prioritizing for better responsiveness Live Migration - seamless to a connected client
32
Red Hat Summit 2009 | Arnon Gilboa 32 FUTURE DEVELOPMENT S
33
Red Hat Summit 2009 | Arnon Gilboa 33 Future Features Off-screen surfaces Direct Draw Video acceleration (DXVA) 3D acceleration Aero (new drivers model) Network tunneling Client network printer redirection Generic Resource sharing
34
Red Hat Summit 2009 | Arnon Gilboa 34 Future Features - cont. Client GUI, preferences and window management USB device redirection Clipboard sharing CD-ROM redirection
35
Red Hat Summit 2009 | Arnon Gilboa 35 QUESTIONS?
36
Red Hat Summit 2009 | Arnon Gilboa 36 Additional Information http://www.spice-space.orghttp://www.spice-space.org (soon to come...) Spice documentation effort User manual Spice remote computing protocol definition Spice VD Interfaces documentation spice-space-list Contact: agilboa@redhat.com
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.