Blink: 3D Display Multiplexing for Virtualized Applications Jacob - - PowerPoint PPT Presentation

blink 3d display multiplexing for virtualized applications
SMART_READER_LITE
LIVE PREVIEW

Blink: 3D Display Multiplexing for Virtualized Applications Jacob - - PowerPoint PPT Presentation

Outline Introduction History: The Tahoma Project Blink Evaluation Demo Blink: 3D Display Multiplexing for Virtualized Applications Jacob Gorm Hansen, University of Copenhagen January 20, 2006 Jacob Gorm Hansen, University of Copenhagen


slide-1
SLIDE 1

Outline Introduction History: The Tahoma Project Blink Evaluation Demo

Blink: 3D Display Multiplexing for Virtualized Applications

Jacob Gorm Hansen, University of Copenhagen January 20, 2006

Jacob Gorm Hansen, University of Copenhagen Blink: 3D Display Multiplexing for Virtualized Applications

slide-2
SLIDE 2

Outline Introduction History: The Tahoma Project Blink Evaluation Demo

Introduction Motivation History: The Tahoma Project Sprites and Tiles Lessons Learned Blink GL in, GL out Communication Protocol JIT Compiler for OpenGL Stored Procedures Safety Checks Evaluation Compiler Graphics Throughput Demo

Jacob Gorm Hansen, University of Copenhagen Blink: 3D Display Multiplexing for Virtualized Applications

slide-3
SLIDE 3

Outline Introduction History: The Tahoma Project Blink Evaluation Demo Motivation

Why VM’s need Graphic Acceleration

Virtual Machines are not only for data centers:

◮ VMWare now ships a free Firefox VM ◮ The Stanford Collective “Virtual Appliance” Application

Bundles

◮ The CMU Internet Suspend Resume project ◮ Some distro installers need graphics ◮ We should be able to do better than VNC

Jacob Gorm Hansen, University of Copenhagen Blink: 3D Display Multiplexing for Virtualized Applications

slide-4
SLIDE 4

Outline Introduction History: The Tahoma Project Blink Evaluation Demo Sprites and Tiles Lessons Learned

Project Background

◮ Blink started as part of the “Tahoma” Browser OS ◮ First developed at the University of Washington, early 2005 ◮ For Tiled 2D graphics ◮ Idea: Treat 4kB pages as 32x32 tiles, track updates with

MMU

◮ Backend draws tile-grids (Sprites) to the screen with OpenGL

Jacob Gorm Hansen, University of Copenhagen Blink: 3D Display Multiplexing for Virtualized Applications

slide-5
SLIDE 5

Outline Introduction History: The Tahoma Project Blink Evaluation Demo Sprites and Tiles Lessons Learned Jacob Gorm Hansen, University of Copenhagen Blink: 3D Display Multiplexing for Virtualized Applications

slide-6
SLIDE 6

Outline Introduction History: The Tahoma Project Blink Evaluation Demo Sprites and Tiles Lessons Learned Jacob Gorm Hansen, University of Copenhagen Blink: 3D Display Multiplexing for Virtualized Applications

slide-7
SLIDE 7

Outline Introduction History: The Tahoma Project Blink Evaluation Demo Sprites and Tiles Lessons Learned

Lessons Learned

◮ Modern GPU’s are extremely fast ◮ Tiles make update tracking easy, thus reduces bus traffic ◮ But most software expects a linear framebuffer ◮ And porting QT embedded to tiles was quite painful

Jacob Gorm Hansen, University of Copenhagen Blink: 3D Display Multiplexing for Virtualized Applications

slide-8
SLIDE 8

Outline Introduction History: The Tahoma Project Blink Evaluation Demo GL in, GL out Communication Protocol JIT Compiler for OpenGL Stored Procedures Safety Checks

A Natural Thought

So...

◮ If we are going to output OpenGL anyway... ◮ Why not just take OpenGL as input as well? ◮ Read serialized from Client

◮ Interpret it ◮ Check that it’s safe ◮ Execute it

◮ (Then we can always do the tiling in the client if we want)

Jacob Gorm Hansen, University of Copenhagen Blink: 3D Display Multiplexing for Virtualized Applications

slide-9
SLIDE 9

Outline Introduction History: The Tahoma Project Blink Evaluation Demo GL in, GL out Communication Protocol JIT Compiler for OpenGL Stored Procedures Safety Checks

Serialize OpenGL in Client

Turn: glBegin(n); into:

  • p->code=GL_Begin;
  • p->args[0]=n;

Jacob Gorm Hansen, University of Copenhagen Blink: 3D Display Multiplexing for Virtualized Applications

slide-10
SLIDE 10

Outline Introduction History: The Tahoma Project Blink Evaluation Demo GL in, GL out Communication Protocol JIT Compiler for OpenGL Stored Procedures Safety Checks

And Interpret it in the Server

switch(op->code) { case GL_Begin: glBegin(op->args.integers[0]); break; ... } (turns in to a rather large switch() statement)

Jacob Gorm Hansen, University of Copenhagen Blink: 3D Display Multiplexing for Virtualized Applications

slide-11
SLIDE 11

Outline Introduction History: The Tahoma Project Blink Evaluation Demo GL in, GL out Communication Protocol JIT Compiler for OpenGL Stored Procedures Safety Checks

Versioned Shared Objects

(1,17,sp) (2,5,tex)

Machine Page Frames VSO array

Jacob Gorm Hansen, University of Copenhagen Blink: 3D Display Multiplexing for Virtualized Applications

slide-12
SLIDE 12

Outline Introduction History: The Tahoma Project Blink Evaluation Demo GL in, GL out Communication Protocol JIT Compiler for OpenGL Stored Procedures Safety Checks

Blink GL multiplexer GPU

Versioned Shared Objects GL Command Streams Vertex and Fragment Shaders Textures, Vertex Buffers

Client Client Client

Jacob Gorm Hansen, University of Copenhagen Blink: 3D Display Multiplexing for Virtualized Applications

slide-13
SLIDE 13

Outline Introduction History: The Tahoma Project Blink Evaluation Demo GL in, GL out Communication Protocol JIT Compiler for OpenGL Stored Procedures Safety Checks

A Couple of Improvements

◮ Turn the Interpreter into a JIT Compiler ◮ Add virtual registers, arithmetic, conditionals ◮ Call client code as Stored Procedure callbacks ◮ Results: Native speed asynchronous execution

Jacob Gorm Hansen, University of Copenhagen Blink: 3D Display Multiplexing for Virtualized Applications

slide-14
SLIDE 14

Outline Introduction History: The Tahoma Project Blink Evaluation Demo GL in, GL out Communication Protocol JIT Compiler for OpenGL Stored Procedures Safety Checks

List of Callbacks

Callback Name Executed init() At first display update() On client VM request reshape() On window move or resize redraw() For each display input() On user input

Jacob Gorm Hansen, University of Copenhagen Blink: 3D Display Multiplexing for Virtualized Applications

slide-15
SLIDE 15

Outline Introduction History: The Tahoma Project Blink Evaluation Demo GL in, GL out Communication Protocol JIT Compiler for OpenGL Stored Procedures Safety Checks

Static Verification

Safety:

◮ We need to check certain properties during compilation... ◮ Not all callbacks are allowed to draw to screen ◮ Client should not exceed its scissor rectangle, or disable scissor

Performance:

◮ Advance knowledge of client actions can also be used for

  • ptimizing display

◮ E.g. if client does not enable Z-buffer, there is no need to

clear it first

◮ If client does not use transparency, we do not have to draw

windows behind it

Jacob Gorm Hansen, University of Copenhagen Blink: 3D Display Multiplexing for Virtualized Applications

slide-16
SLIDE 16

Outline Introduction History: The Tahoma Project Blink Evaluation Demo Compiler Graphics Throughput

Evaluation

Test Machine:

◮ 2GHz single-threaded Intel Pentium4 CPU ◮ 1024MB SDRAM ◮ 2+ years old ◮ ATI Radeon 9600SE 4xAGP graphics card with 128MB DDR

RAM ($70).

Jacob Gorm Hansen, University of Copenhagen Blink: 3D Display Multiplexing for Virtualized Applications

slide-17
SLIDE 17

Outline Introduction History: The Tahoma Project Blink Evaluation Demo Compiler Graphics Throughput

JIT Performance

Type of input #Instr. Compile Execute OpenGL-mix 8,034 102 (41) cpi 41 cpi Arith-mix 8,192 99 (55) cpi 50 cpi

Jacob Gorm Hansen, University of Copenhagen Blink: 3D Display Multiplexing for Virtualized Applications

slide-18
SLIDE 18

Outline Introduction History: The Tahoma Project Blink Evaluation Demo Compiler Graphics Throughput

Quality of JIT’ed Code

Scenario Execute OpenGL-mix Native 552 cpi OpenGL-mix Blink 554 cpi OpenGL-mix Blink + JIT 656 cpi

Jacob Gorm Hansen, University of Copenhagen Blink: 3D Display Multiplexing for Virtualized Applications

slide-19
SLIDE 19

Outline Introduction History: The Tahoma Project Blink Evaluation Demo Compiler Graphics Throughput Jacob Gorm Hansen, University of Copenhagen Blink: 3D Display Multiplexing for Virtualized Applications

slide-20
SLIDE 20

Outline Introduction History: The Tahoma Project Blink Evaluation Demo Compiler Graphics Throughput

MPlayer VM’s

0.02 0.03 0.04 0.05 0.06 0.07 0.08 0.09 0.1 0.11 2 4 6 8 10 12 Update rate (s) Number of MPlayer VMs Update and Redraw intervals Rate for redraw() Rate for update()

Jacob Gorm Hansen, University of Copenhagen Blink: 3D Display Multiplexing for Virtualized Applications

slide-21
SLIDE 21

Outline Introduction History: The Tahoma Project Blink Evaluation Demo Compiler Graphics Throughput

Gears VM’s

0.015 0.02 0.025 0.03 0.035 0.04 0.045 0.05 0.055 5 10 15 20 25 30 35 Update rate (s) Number of GLGears VMs Screen redraw rate GearsBSP GearsSwitch

Jacob Gorm Hansen, University of Copenhagen Blink: 3D Display Multiplexing for Virtualized Applications

slide-22
SLIDE 22

Outline Introduction History: The Tahoma Project Blink Evaluation Demo

Demo

Xen

Linux ATI fglrx driver module OpenGL shared libraries BlinkGL multiplexer Linux BlinkGL driver module BlinkGL Client + BlinkGL library Linux BlinkGL driver module BlinkGL Client + BlinkGL library

Jacob Gorm Hansen, University of Copenhagen Blink: 3D Display Multiplexing for Virtualized Applications