SlideShare a Scribd company logo
Docker + GCE + etcd
+
ray tracing
@syoyo
Sunday, April 27, 14
ray tracing
Sunday, April 27, 14
Problem
• A lot of computing
resource required
• Imagine 60fps
photorealistic ray
tracing for OculusVR
• ~ 10K nodes
• Efficient deploy,
operation for the
renderer(ray tracer)
Sunday, April 27, 14
Why docker
• Hoping...
• Fine resource control
• CPU limit, memory limit, etc
• Easy versioning management of the
renderer
• Application sandboxing
Sunday, April 27, 14
My contribution (1/2)
Sunday, April 27, 14
Why etcd?
• Hoping...
• scalable management of cluster
information
• node IP addr, redis addr, etc.
• up to 10K nodes possible(?)
Sunday, April 27, 14
Why GCE
• CPU-intensive instance available
• fastVM boot, minute-level charge
• CoreOS image avaiable
• 282.0.0(Docker 0.10)
Sunday, April 27, 14
Render A Render B Render C Render D
Render E
etcd
Architecture
Sunday, April 27, 14
Container
• Busybox(8MB)
• Our renderer(single
binary. 72MB)
• node.js(11 MB)
• ~ 90 MBBusybox
Renderer(Ray tracer)
node.js
(application frontend)
Sunday, April 27, 14
Dockerfile
FROM syoyo/aobench
MAINTAINER Syoyo Fujita(syoyo@lighttransport.com)
ADD libdl.so.2 /lib64/
ADD librt.so.1 /lib64/
ADD lte /bin/lte
ADD worker.js /home/default/worker.js
ADD node /bin/node
ADD node_modules /home/default/node_modules
Sunday, April 27, 14
Render A Render B Render C
etcd
etcd: 172.17.42.1:4001
webfrontend
redis
Sunday, April 27, 14
Get redis info
from etcd
http.get(etcdHost + '/v2/keys/redis-server', function(res) {
if (res.statusCode != 200) {
console.log('failed to get redis infor from etcd.');
process.exit(-1);
}
res.on('data', function(chunk) {
var j = JSON.parse(chunk);
var redisURL = url.parse(j['node']['value']);
var redisServerAddr = redisURL['hostname']
var redisPort = redisURL['port']
var redisClient = redis.createClient(redisPort,
redisServerAddr);
Sunday, April 27, 14
Task processing
function loop() {
redisClient.brpop('render-q', timeout, function(err,
reply) {
// kick the ray tracer
exec(...);
// resubmit event loop
setTimeout(loop, 100);
});
}
Sunday, April 27, 14
• http://lighttransportengine.com/shader/
Sunday, April 27, 14
Future work
• ~10K nodes
• Leverage PCI-ex accelerator(GPU, Xeon
Phi) in Docker container.
• Confirmed InfiniBand working.
• Automation using Docker API
Sunday, April 27, 14

More Related Content

PDF
Docker infiniband
PDF
64-bit ARM Unikernels on uKVM
PDF
OpenNebulaConf 2016 - Measuring and tuning VM performance by Boyan Krosnov, S...
PDF
Docker Meetup: Docker Networking 1.11, by Madhu Venugopal
PPTX
OSv: probably the best OS for cloud workloads you've never hear of
PDF
[En] IPVS for Docker Containers
PDF
XPDS14: Xen 4.5 Roadmap - Konrad Wilk, Oracle
PDF
Running Legacy Applications with Containers
Docker infiniband
64-bit ARM Unikernels on uKVM
OpenNebulaConf 2016 - Measuring and tuning VM performance by Boyan Krosnov, S...
Docker Meetup: Docker Networking 1.11, by Madhu Venugopal
OSv: probably the best OS for cloud workloads you've never hear of
[En] IPVS for Docker Containers
XPDS14: Xen 4.5 Roadmap - Konrad Wilk, Oracle
Running Legacy Applications with Containers

What's hot (20)

PDF
[OpenInfra Days Korea 2018] Day 1 - T4-7: "Ceph 스토리지, PaaS로 서비스 운영하기"
PDF
XPDS14 - Scaling Xen's Aggregate Storage Performance - Felipe Franciosi, Citrix
PDF
You Call that Micro, Mr. Docker? How OSv and Unikernels Help Micro-services S...
PDF
Docker Orchestration at Production Scale
PDF
Docker 1.11 @ Docker SF Meetup
PPTX
Optimizing VM images for OpenStack with KVM/QEMU
PDF
OSv presentation from Linux Foundation Collaboration Summit
PPTX
PDF
Virtualization inside kubernetes
PDF
An Updated Performance Comparison of Virtual Machines and Linux Containers
PDF
FreeBSD: The Next 10 Years (MeetBSD 2014)
PDF
Docker Networking – Running multi-host applications
PDF
[OpenInfra Days Korea 2018] Day 2 - E6 - OpenInfra monitoring with Prometheus
PDF
Unikernels: the rise of the library hypervisor in MirageOS
PDF
OpenNebula Conf 2014: CentOS, QA an OpenNebula - Christoph Galuschka
PDF
Application-Based Routing
PDF
Libvirt/KVM Driver Update (Kilo)
PDF
Develop QNAP NAS App by Docker
PPT
NeXTBSD aka FreeBSD X
PDF
Control Your Network ASICs, What Benefits switchdev Can Bring Us
[OpenInfra Days Korea 2018] Day 1 - T4-7: "Ceph 스토리지, PaaS로 서비스 운영하기"
XPDS14 - Scaling Xen's Aggregate Storage Performance - Felipe Franciosi, Citrix
You Call that Micro, Mr. Docker? How OSv and Unikernels Help Micro-services S...
Docker Orchestration at Production Scale
Docker 1.11 @ Docker SF Meetup
Optimizing VM images for OpenStack with KVM/QEMU
OSv presentation from Linux Foundation Collaboration Summit
Virtualization inside kubernetes
An Updated Performance Comparison of Virtual Machines and Linux Containers
FreeBSD: The Next 10 Years (MeetBSD 2014)
Docker Networking – Running multi-host applications
[OpenInfra Days Korea 2018] Day 2 - E6 - OpenInfra monitoring with Prometheus
Unikernels: the rise of the library hypervisor in MirageOS
OpenNebula Conf 2014: CentOS, QA an OpenNebula - Christoph Galuschka
Application-Based Routing
Libvirt/KVM Driver Update (Kilo)
Develop QNAP NAS App by Docker
NeXTBSD aka FreeBSD X
Control Your Network ASICs, What Benefits switchdev Can Bring Us
Ad

Similar to Docker + GCE + etcd + ray tracing (6)

PDF
Delivering Docker & K3s worloads to IoT Edge devices
PDF
Using Docker for GPU-accelerated Applications by Felix Abecassis and Jonathan...
PDF
Delivering Container-based Apps to IoT Edge devices
PDF
Foveated Ray Tracing for VR on Multiple GPUs
PPTX
Using Docker for GPU Accelerated Applications
PDF
[2018 GDC] Real-Time Ray-Tracing Techniques for Integration into Existing Ren...
Delivering Docker & K3s worloads to IoT Edge devices
Using Docker for GPU-accelerated Applications by Felix Abecassis and Jonathan...
Delivering Container-based Apps to IoT Edge devices
Foveated Ray Tracing for VR on Multiple GPUs
Using Docker for GPU Accelerated Applications
[2018 GDC] Real-Time Ray-Tracing Techniques for Integration into Existing Ren...
Ad

More from Syoyo Fujita (9)

PDF
KEY
DIY InfiniBand networking
ZIP
MicroServer + InfiniBand + ZFS
PDF
AObench with Emscripten
KEY
PDF
Rsltollvm
PDF
Vertex Culling illustration at SBR07
PDF
First Order
PDF
Muda Proposal
DIY InfiniBand networking
MicroServer + InfiniBand + ZFS
AObench with Emscripten
Rsltollvm
Vertex Culling illustration at SBR07
First Order
Muda Proposal

Recently uploaded (20)

PPT
INTRODUCTION -Data Warehousing and Mining-M.Tech- VTU.ppt
PPTX
Management Information system : MIS-e-Business Systems.pptx
PPTX
Information Storage and Retrieval Techniques Unit III
PPT
Total quality management ppt for engineering students
PDF
Unit I ESSENTIAL OF DIGITAL MARKETING.pdf
PPTX
Fundamentals of Mechanical Engineering.pptx
PDF
A SYSTEMATIC REVIEW OF APPLICATIONS IN FRAUD DETECTION
PDF
SMART SIGNAL TIMING FOR URBAN INTERSECTIONS USING REAL-TIME VEHICLE DETECTI...
PPTX
Nature of X-rays, X- Ray Equipment, Fluoroscopy
PDF
BIO-INSPIRED ARCHITECTURE FOR PARSIMONIOUS CONVERSATIONAL INTELLIGENCE : THE ...
PPTX
Fundamentals of safety and accident prevention -final (1).pptx
PDF
Design Guidelines and solutions for Plastics parts
PPTX
6ME3A-Unit-II-Sensors and Actuators_Handouts.pptx
PPTX
CURRICULAM DESIGN engineering FOR CSE 2025.pptx
PPTX
"Array and Linked List in Data Structures with Types, Operations, Implementat...
PPTX
Sorting and Hashing in Data Structures with Algorithms, Techniques, Implement...
PDF
distributed database system" (DDBS) is often used to refer to both the distri...
PPTX
introduction to high performance computing
PDF
Visual Aids for Exploratory Data Analysis.pdf
PDF
III.4.1.2_The_Space_Environment.p pdffdf
INTRODUCTION -Data Warehousing and Mining-M.Tech- VTU.ppt
Management Information system : MIS-e-Business Systems.pptx
Information Storage and Retrieval Techniques Unit III
Total quality management ppt for engineering students
Unit I ESSENTIAL OF DIGITAL MARKETING.pdf
Fundamentals of Mechanical Engineering.pptx
A SYSTEMATIC REVIEW OF APPLICATIONS IN FRAUD DETECTION
SMART SIGNAL TIMING FOR URBAN INTERSECTIONS USING REAL-TIME VEHICLE DETECTI...
Nature of X-rays, X- Ray Equipment, Fluoroscopy
BIO-INSPIRED ARCHITECTURE FOR PARSIMONIOUS CONVERSATIONAL INTELLIGENCE : THE ...
Fundamentals of safety and accident prevention -final (1).pptx
Design Guidelines and solutions for Plastics parts
6ME3A-Unit-II-Sensors and Actuators_Handouts.pptx
CURRICULAM DESIGN engineering FOR CSE 2025.pptx
"Array and Linked List in Data Structures with Types, Operations, Implementat...
Sorting and Hashing in Data Structures with Algorithms, Techniques, Implement...
distributed database system" (DDBS) is often used to refer to both the distri...
introduction to high performance computing
Visual Aids for Exploratory Data Analysis.pdf
III.4.1.2_The_Space_Environment.p pdffdf

Docker + GCE + etcd + ray tracing

  • 1. Docker + GCE + etcd + ray tracing @syoyo Sunday, April 27, 14
  • 3. Problem • A lot of computing resource required • Imagine 60fps photorealistic ray tracing for OculusVR • ~ 10K nodes • Efficient deploy, operation for the renderer(ray tracer) Sunday, April 27, 14
  • 4. Why docker • Hoping... • Fine resource control • CPU limit, memory limit, etc • Easy versioning management of the renderer • Application sandboxing Sunday, April 27, 14
  • 6. Why etcd? • Hoping... • scalable management of cluster information • node IP addr, redis addr, etc. • up to 10K nodes possible(?) Sunday, April 27, 14
  • 7. Why GCE • CPU-intensive instance available • fastVM boot, minute-level charge • CoreOS image avaiable • 282.0.0(Docker 0.10) Sunday, April 27, 14
  • 8. Render A Render B Render C Render D Render E etcd Architecture Sunday, April 27, 14
  • 9. Container • Busybox(8MB) • Our renderer(single binary. 72MB) • node.js(11 MB) • ~ 90 MBBusybox Renderer(Ray tracer) node.js (application frontend) Sunday, April 27, 14
  • 10. Dockerfile FROM syoyo/aobench MAINTAINER Syoyo Fujita(syoyo@lighttransport.com) ADD libdl.so.2 /lib64/ ADD librt.so.1 /lib64/ ADD lte /bin/lte ADD worker.js /home/default/worker.js ADD node /bin/node ADD node_modules /home/default/node_modules Sunday, April 27, 14
  • 11. Render A Render B Render C etcd etcd: 172.17.42.1:4001 webfrontend redis Sunday, April 27, 14
  • 12. Get redis info from etcd http.get(etcdHost + '/v2/keys/redis-server', function(res) { if (res.statusCode != 200) { console.log('failed to get redis infor from etcd.'); process.exit(-1); } res.on('data', function(chunk) { var j = JSON.parse(chunk); var redisURL = url.parse(j['node']['value']); var redisServerAddr = redisURL['hostname'] var redisPort = redisURL['port'] var redisClient = redis.createClient(redisPort, redisServerAddr); Sunday, April 27, 14
  • 13. Task processing function loop() { redisClient.brpop('render-q', timeout, function(err, reply) { // kick the ray tracer exec(...); // resubmit event loop setTimeout(loop, 100); }); } Sunday, April 27, 14
  • 15. Future work • ~10K nodes • Leverage PCI-ex accelerator(GPU, Xeon Phi) in Docker container. • Confirmed InfiniBand working. • Automation using Docker API Sunday, April 27, 14