(redhat) linux important stuff (12)
Post on 07-Apr-2018
229 Views
Preview:
TRANSCRIPT
-
8/6/2019 (Redhat) Linux Important Stuff (12)
1/36
Red Hat Summit 2009 | Arnon Gilboa 1
SPICE: An Open RemoteComputing Solution
Presenter: Arnon Gilboa
Project Leader: Yaniv Kamay
Red Hat Israel
September 4, 2009
-
8/6/2019 (Redhat) Linux Important Stuff (12)
2/36
Red Hat Summit 2009 | Arnon Gilboa 2
Agenda
Why Spice?Architecture
Spice Optimizations
Future DevelopmentsQ&A
-
8/6/2019 (Redhat) Linux Important Stuff (12)
3/36
Red Hat Summit 2009 | Arnon Gilboa 3
Why Spice?
Open remote computing solutionClient 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
-
8/6/2019 (Redhat) Linux Important Stuff (12)
4/36
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
-
8/6/2019 (Redhat) Linux Important Stuff (12)
5/36
Red Hat Summit 2009 | Arnon Gilboa 5
ARCHITECTURE
-
8/6/2019 (Redhat) Linux Important Stuff (12)
6/36
Red Hat Summit 2009 | Arnon Gilboa 6
Spice Architecture
Spice
Protocol
Devices(QXL, VDIPort)
Guest
QEMU/KVM
Spice Server(libspice) Spice Client
Client
Host
Spice Agent
Drivers(QXL, VDIPort)
-
8/6/2019 (Redhat) Linux Important Stuff (12)
7/36
Red Hat Summit 2009 | Arnon Gilboa 7
Spice Protocol
Spice
Protocol
Guest
QEMU/KVM
Spice Server(libspice) Spice Client
Client
Host
-
8/6/2019 (Redhat) Linux Important Stuff (12)
8/36
Red Hat Summit 2009 | Arnon Gilboa 8
Spice Protocol
Client-server communicationSet of messages for interaction with remote devices
Graphic commands, keyboard & mouse events, audiostreams etc.
Secure authentication ticketing (OTP) with expirationConnection establishment and control (e.g., migration)
Flow control using window-acks
-
8/6/2019 (Redhat) Linux Important Stuff (12)
9/36
Red Hat Summit 2009 | Arnon Gilboa 9
Client-Server Communication: Channels
Client & server communicate via channelsTCP 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
-
8/6/2019 (Redhat) Linux Important Stuff (12)
10/36
Red Hat Summit 2009 | Arnon Gilboa 10
Channels
Main - control and configuration and agentcommunication
Display - handles graphic commands, images andvideo streams
Inputs - keyboard and mouse inputsCursor - pointer device position, visibility and cursorshape
Playback - audio received from the server to be playedby the client
Record - audio capture on the client side
-
8/6/2019 (Redhat) Linux Important Stuff (12)
11/36
Red Hat Summit 2009 | Arnon Gilboa 11
Spice Server
Spice
Protocol
Guest
QEMU/KVM
Spice Server(libspice) Spice Client
Client
Devices
Host
-
8/6/2019 (Redhat) Linux Important Stuff (12)
12/36
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
-
8/6/2019 (Redhat) Linux Important Stuff (12)
13/36
Red Hat Summit 2009 | Arnon Gilboa 13
Spice Server Interfaces
QEMUPlayback ChannelPlaybackInterface
Record ChannelRecordInterface
Main ChannelAgentInterface
Inputs Channelkbd, mouse
& tabletInterfaces
Dispatcher
Worker Thread
Display Channel
Cursor Channel
QXLInterface
Spice Server
-
8/6/2019 (Redhat) Linux Important Stuff (12)
14/36
Red Hat Summit 2009 | Arnon Gilboa 14
Spice Server Graphic Commands Processing (1)
Graphic Commands Tree
Contains the set of commands, whose execution willreproduce 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 itsdisplay
-
8/6/2019 (Redhat) Linux Important Stuff (12)
15/36
Red Hat Summit 2009 | Arnon Gilboa 15
Spice Server Graphic Commands Processing (2)
Command Ring (IN)
Expected Display
Graphic Command
Tree
Command Pipe (OUT)
-
8/6/2019 (Redhat) Linux Important Stuff (12)
16/36
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 doneas a last resort
Release a command only whenCompletely covered by other commands and there areno dependencies on it
Running out of resources, the command is rendered to
the frame bufferWhen the guest needs to read from the frame buffer
Command rendered to frame buffer & deleted from tree
-
8/6/2019 (Redhat) Linux Important Stuff (12)
17/36
Red Hat Summit 2009 | Arnon Gilboa 17
Spice Client
Spice
Protocol
Guest
QEMU/KVM
Spice Server(libspice) Spice Client
Client
Host
-
8/6/2019 (Redhat) Linux Important Stuff (12)
18/36
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
-
8/6/2019 (Redhat) Linux Important Stuff (12)
19/36
Red Hat Summit 2009 | Arnon Gilboa 19
SPICE FRIENDS &FAMILY
-
8/6/2019 (Redhat) Linux Important Stuff (12)
20/36
Red Hat Summit 2009 | Arnon Gilboa 20
QXL Device & Driver
Spice
Protocol
Guest
QEMU/KVM
Spice Server(libspice) Spice Client
Client
QXL Device(s)
Host
Graphic Engine
QXL Drivers
-
8/6/2019 (Redhat) Linux Important Stuff (12)
21/36
Red Hat Summit 2009 | Arnon Gilboa 21
QXL Device & Driver
Transparent remote displaySpecific QEMU PCI display deviceParavirtual device for enhanced performance
Transfer generic graphic commands to serverPixmap hashing & cache hintCursor support
Windows driver & beta X11 driver already implemented
Support standard VGA mode as well
No drivers requiredBoot stage display
-
8/6/2019 (Redhat) Linux Important Stuff (12)
22/36
Red Hat Summit 2009 | Arnon Gilboa 22
VDIPort Device & Driver
Spice
Protocol
Guest
QEMU/KVM
Spice Server(libspice) Spice Client
Client
VDIPort Device
Host
Spice Agent
VDIPort Driver
-
8/6/2019 (Redhat) Linux Important Stuff (12)
23/36
Red Hat Summit 2009 | Arnon Gilboa 23
VDIPort Device
VDI port - QEMU PCI device used for communication withguest agent
Agent communicates with both client & server using agent-dedicated protocol
Windows guest driver already implemented
-
8/6/2019 (Redhat) Linux Important Stuff (12)
24/36
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
-
8/6/2019 (Redhat) Linux Important Stuff (12)
25/36
Red Hat Summit 2009 | Arnon Gilboa 25
SPICE
OPTIMIZATIONS
-
8/6/2019 (Redhat) Linux Important Stuff (12)
26/36
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
-
8/6/2019 (Redhat) Linux Important Stuff (12)
27/36
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 imageSynthetic images - LZ/GLZ
Photos - Quic
-
8/6/2019 (Redhat) Linux Important Stuff (12)
28/36
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
-
8/6/2019 (Redhat) Linux Important Stuff (12)
29/36
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 utilizationServer HW acceleration uses OpenGL
Sharing code with the Linux client
-
8/6/2019 (Redhat) Linux Important Stuff (12)
30/36
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 responsivenessAppropriate for WAN
Server mode
Server controls mouse positionAlways synchronized
-
8/6/2019 (Redhat) Linux Important Stuff (12)
31/36
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 trafficEnables prioritizing for better responsiveness
Live Migration - seamless to a connected client
-
8/6/2019 (Redhat) Linux Important Stuff (12)
32/36
Red Hat Summit 2009 | Arnon Gilboa 32
FUTURE
DEVELOPMENTS
-
8/6/2019 (Redhat) Linux Important Stuff (12)
33/36
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
-
8/6/2019 (Redhat) Linux Important Stuff (12)
34/36
Red Hat Summit 2009 | Arnon Gilboa 34
Future Features - cont.
Client GUI, preferences and window management
USB device redirection
Clipboard sharing
CD-ROM redirection
-
8/6/2019 (Redhat) Linux Important Stuff (12)
35/36
Red Hat Summit 2009 | Arnon Gilboa 35
QUESTIONS?
-
8/6/2019 (Redhat) Linux Important Stuff (12)
36/36
Red Hat Summit 2009 | Arnon Gilboa 36
Additional Information
http://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
http://www.spice-space.org/http://www.spice-space.org/mailto:agilboa@redhat.commailto:agilboa@redhat.comhttp://www.spice-space.org/
top related