VGRIS: Virtualized GPU Resource Isolation and Scheduling in Cloud Gaming Miao Yu 1, Chao Zhang 2,...
-
Upload
gilbert-palmer -
Category
Documents
-
view
217 -
download
0
Transcript of VGRIS: Virtualized GPU Resource Isolation and Scheduling in Cloud Gaming Miao Yu 1, Chao Zhang 2,...
![Page 1: VGRIS: Virtualized GPU Resource Isolation and Scheduling in Cloud Gaming Miao Yu 1, Chao Zhang 2, Zhengwei Qi 2, Jianguo Yao 2, Yin Wang 3 and Haibing.](https://reader036.fdocuments.us/reader036/viewer/2022081513/56649cff5503460f949d0d6f/html5/thumbnails/1.jpg)
VGRIS: Virtualized GPU Resource Isolation and
Scheduling in Cloud GamingMiao Yu1, Chao Zhang2, Zhengwei Qi2,
Jianguo Yao2, Yin Wang3 and Haibing Guan2
1Carnegie Mellon University2Shanghai Jiao Tong University
3HP Labs
![Page 2: VGRIS: Virtualized GPU Resource Isolation and Scheduling in Cloud Gaming Miao Yu 1, Chao Zhang 2, Zhengwei Qi 2, Jianguo Yao 2, Yin Wang 3 and Haibing.](https://reader036.fdocuments.us/reader036/viewer/2022081513/56649cff5503460f949d0d6f/html5/thumbnails/2.jpg)
2/21
Background
What is Cloud Gaming Platform
Goal: Distribute Game Experience to Multiple Clients
Advantage:Cheap Client
Hardware
Easier to Maintain &
Distribute Games
![Page 3: VGRIS: Virtualized GPU Resource Isolation and Scheduling in Cloud Gaming Miao Yu 1, Chao Zhang 2, Zhengwei Qi 2, Jianguo Yao 2, Yin Wang 3 and Haibing.](https://reader036.fdocuments.us/reader036/viewer/2022081513/56649cff5503460f949d0d6f/html5/thumbnails/3.jpg)
3/21
Background
GPU Virtualization
Goal: Improve GPU Resource Usage [SIGOPS OSR’09]
Advantage:Less GPUs are
needed
Lower Server
Hardware Cost
![Page 4: VGRIS: Virtualized GPU Resource Isolation and Scheduling in Cloud Gaming Miao Yu 1, Chao Zhang 2, Zhengwei Qi 2, Jianguo Yao 2, Yin Wang 3 and Haibing.](https://reader036.fdocuments.us/reader036/viewer/2022081513/56649cff5503460f949d0d6f/html5/thumbnails/4.jpg)
4/21
When Considering About the Fact
Game FPS GPU Usage CPU Usage
DiRT 3 67.14 56.14% 39.61%
Portal 2 212.70 94.77% 85.42%
Shogun 2 64.76 84.33% 29.48%
Call Of Duty 7 68.97 73.48% 69.09%
NBA 2012 104.57 69.50% 86.45%
It should be OK to run several of them at the SAME time, at 30 ~ 60 FPS.
For Human, 30 ~ 60 FPS is smooth, >60 FPS makes the same.
(Refresh Rate)max for Most LCD Displays = 60 FPS
![Page 5: VGRIS: Virtualized GPU Resource Isolation and Scheduling in Cloud Gaming Miao Yu 1, Chao Zhang 2, Zhengwei Qi 2, Jianguo Yao 2, Yin Wang 3 and Haibing.](https://reader036.fdocuments.us/reader036/viewer/2022081513/56649cff5503460f949d0d6f/html5/thumbnails/5.jpg)
5/21
Problems
However…When run them concurrently on the same GPU
Not well studied ––– How to Schedule
![Page 6: VGRIS: Virtualized GPU Resource Isolation and Scheduling in Cloud Gaming Miao Yu 1, Chao Zhang 2, Zhengwei Qi 2, Jianguo Yao 2, Yin Wang 3 and Haibing.](https://reader036.fdocuments.us/reader036/viewer/2022081513/56649cff5503460f949d0d6f/html5/thumbnails/6.jpg)
6/21
Contribution
VGRIS – A Scheduling Framework
For GPU ParaVirtualization
Only Change 3D API Library (OpenGL, Direct3D)
Three Scheduling Algorithms
Service-Level Agreement (SLA) Aware Scheduling
Ensure SLA
Proportional Resource Sharing
Improve GPU Utilization
Hybrid – performance and fairness trade-offs
Eliminate Inappropriate GPU Resource Slice
By using VGRIS, Cloud Gaming Services can enjoy GPU-PV and cut GPU Amounts
SIGNIFICANTLY
![Page 7: VGRIS: Virtualized GPU Resource Isolation and Scheduling in Cloud Gaming Miao Yu 1, Chao Zhang 2, Zhengwei Qi 2, Jianguo Yao 2, Yin Wang 3 and Haibing.](https://reader036.fdocuments.us/reader036/viewer/2022081513/56649cff5503460f949d0d6f/html5/thumbnails/7.jpg)
7/21
Our Result – SLA Aware Scheduling
SLA-Aware: Solved the Unfair FPS Problem
Average FPS for GT2: 65.05% After Scheduling
![Page 8: VGRIS: Virtualized GPU Resource Isolation and Scheduling in Cloud Gaming Miao Yu 1, Chao Zhang 2, Zhengwei Qi 2, Jianguo Yao 2, Yin Wang 3 and Haibing.](https://reader036.fdocuments.us/reader036/viewer/2022081513/56649cff5503460f949d0d6f/html5/thumbnails/8.jpg)
8/21
Our Result – SLA Aware Scheduling
Significantly Smooth and Decrease the Latency
Max. Latency: 388.82ms 131.27ms
![Page 9: VGRIS: Virtualized GPU Resource Isolation and Scheduling in Cloud Gaming Miao Yu 1, Chao Zhang 2, Zhengwei Qi 2, Jianguo Yao 2, Yin Wang 3 and Haibing.](https://reader036.fdocuments.us/reader036/viewer/2022081513/56649cff5503460f949d0d6f/html5/thumbnails/9.jpg)
9/21
Our Result – Hybrid Scheduling
Improve GPU Usage Further
No Upper FPS Bar for the Games
![Page 10: VGRIS: Virtualized GPU Resource Isolation and Scheduling in Cloud Gaming Miao Yu 1, Chao Zhang 2, Zhengwei Qi 2, Jianguo Yao 2, Yin Wang 3 and Haibing.](https://reader036.fdocuments.us/reader036/viewer/2022081513/56649cff5503460f949d0d6f/html5/thumbnails/10.jpg)
10/21
VGRIS Architecture
Host
Host GPU API
GPU HostOps Dispatch
VM 1Game App.
Guest OS
3D API
3D API
...
GPU HostOps Dispatch
VM NGame App.
Guest OS
3D API
3D API
Scheduling ControllerCm
d. Cmd.
Result Result
AgentScheduler
Monitor
AgentScheduler
Monitor
![Page 11: VGRIS: Virtualized GPU Resource Isolation and Scheduling in Cloud Gaming Miao Yu 1, Chao Zhang 2, Zhengwei Qi 2, Jianguo Yao 2, Yin Wang 3 and Haibing.](https://reader036.fdocuments.us/reader036/viewer/2022081513/56649cff5503460f949d0d6f/html5/thumbnails/11.jpg)
11/21
SLA-Aware Scheduling
Goal: Ensure FPSVM = 30
Where to Delay?
May Introduce Side-Effect LatencyF r a m e L a t e n c y F r a m e L a t e n c y
T i m eFrame N Frame N+1
C o m p u t i n g O b j e c t s
& D r a w i n g S h a p e s D e l a y
S w a p B u f f e r /
P r e s e n t
Actual Latency
![Page 12: VGRIS: Virtualized GPU Resource Isolation and Scheduling in Cloud Gaming Miao Yu 1, Chao Zhang 2, Zhengwei Qi 2, Jianguo Yao 2, Yin Wang 3 and Haibing.](https://reader036.fdocuments.us/reader036/viewer/2022081513/56649cff5503460f949d0d6f/html5/thumbnails/12.jpg)
12/21
SLA-Aware Scheduling
Goal: Ensure FPSVM = 30
Avoid Side-Effect Latency
SwapBuffer(); // Tell GPU to display the buffered content.}
While(1){
DrawShapes(&VGA_Buffer);Sleep(remain_time);
Challenge: Predict SwapBuffer Cost
![Page 13: VGRIS: Virtualized GPU Resource Isolation and Scheduling in Cloud Gaming Miao Yu 1, Chao Zhang 2, Zhengwei Qi 2, Jianguo Yao 2, Yin Wang 3 and Haibing.](https://reader036.fdocuments.us/reader036/viewer/2022081513/56649cff5503460f949d0d6f/html5/thumbnails/13.jpg)
13/21
SLA-Aware Scheduling
Prediction
GPU (and API Lib): Asynchronous (Only blocked
when the command queue is full!)
Approach:Flush
Calculate
Average Cost
![Page 14: VGRIS: Virtualized GPU Resource Isolation and Scheduling in Cloud Gaming Miao Yu 1, Chao Zhang 2, Zhengwei Qi 2, Jianguo Yao 2, Yin Wang 3 and Haibing.](https://reader036.fdocuments.us/reader036/viewer/2022081513/56649cff5503460f949d0d6f/html5/thumbnails/14.jpg)
14/21
Proportional Resource Scheduling
Goal: Solve GPU Resource Under-utilization Problem
Same with TimeGraph [UsenixATC’11]
But we do not need any source code information
Better compatibility
![Page 15: VGRIS: Virtualized GPU Resource Isolation and Scheduling in Cloud Gaming Miao Yu 1, Chao Zhang 2, Zhengwei Qi 2, Jianguo Yao 2, Yin Wang 3 and Haibing.](https://reader036.fdocuments.us/reader036/viewer/2022081513/56649cff5503460f949d0d6f/html5/thumbnails/15.jpg)
15/21
Hybrid Scheduling
Goal: Avoid Inappropriate Weights in Proportional Resource Scheduling
This problem can cause starvation.
Approach:
Automatically choose either of the SLA-Aware or
Proportional Resource Scheduling according to
current situation.
![Page 16: VGRIS: Virtualized GPU Resource Isolation and Scheduling in Cloud Gaming Miao Yu 1, Chao Zhang 2, Zhengwei Qi 2, Jianguo Yao 2, Yin Wang 3 and Haibing.](https://reader036.fdocuments.us/reader036/viewer/2022081513/56649cff5503460f949d0d6f/html5/thumbnails/16.jpg)
16/21
Hybrid Scheduling
Algorithm:
While each second do If (CurrentAlgo = PropShare) and (FPS < FPSthres for Time
sec).
then– CurrentAlgo SLAAware
Else if (CurrentAlgo = SLAAware) and (GPUTotalUsage < GPUthres for Time sec).
then– CurrentAlgo PropShare– CalcShareForAllVMs()
![Page 17: VGRIS: Virtualized GPU Resource Isolation and Scheduling in Cloud Gaming Miao Yu 1, Chao Zhang 2, Zhengwei Qi 2, Jianguo Yao 2, Yin Wang 3 and Haibing.](https://reader036.fdocuments.us/reader036/viewer/2022081513/56649cff5503460f949d0d6f/html5/thumbnails/17.jpg)
17/21
Evaluations
Prediction
No Contention: ≤ 0.4ms error margin
Contention with Real Games: only 1.95% of the
frames fails in prediction. Max. error: 91.32ms
![Page 18: VGRIS: Virtualized GPU Resource Isolation and Scheduling in Cloud Gaming Miao Yu 1, Chao Zhang 2, Zhengwei Qi 2, Jianguo Yao 2, Yin Wang 3 and Haibing.](https://reader036.fdocuments.us/reader036/viewer/2022081513/56649cff5503460f949d0d6f/html5/thumbnails/18.jpg)
18/21
Evaluations
Overhead
VGRIS GPU Performance Overhead: ≤ 5.53%
![Page 19: VGRIS: Virtualized GPU Resource Isolation and Scheduling in Cloud Gaming Miao Yu 1, Chao Zhang 2, Zhengwei Qi 2, Jianguo Yao 2, Yin Wang 3 and Haibing.](https://reader036.fdocuments.us/reader036/viewer/2022081513/56649cff5503460f949d0d6f/html5/thumbnails/19.jpg)
19/21
Future Work
QoS for GPU Computing
CUDA and OpenAL
Support Multi-GPUs and Cluster
On-Top Load Balancing
GPU Memory Resource Management
![Page 20: VGRIS: Virtualized GPU Resource Isolation and Scheduling in Cloud Gaming Miao Yu 1, Chao Zhang 2, Zhengwei Qi 2, Jianguo Yao 2, Yin Wang 3 and Haibing.](https://reader036.fdocuments.us/reader036/viewer/2022081513/56649cff5503460f949d0d6f/html5/thumbnails/20.jpg)
20/21
Thank you
![Page 21: VGRIS: Virtualized GPU Resource Isolation and Scheduling in Cloud Gaming Miao Yu 1, Chao Zhang 2, Zhengwei Qi 2, Jianguo Yao 2, Yin Wang 3 and Haibing.](https://reader036.fdocuments.us/reader036/viewer/2022081513/56649cff5503460f949d0d6f/html5/thumbnails/21.jpg)
21/21
Demo: http://bit.ly/12cmNpz
Contact Info (Miao Yu)
Email: [email protected]
Website:
http://www.contrib.andrew.cmu.edu/~miaoy1/