from data centers to fog computing (part 1)...

54

Upload: others

Post on 22-May-2020

3 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: From Data Centers to Fog Computing (part 1) …people.rennes.inria.fr/.../uploads/2017/09/slides1.pdfAdvanced Cloud Infrastructures From Data Centers to Fog Computing (part 1) Guillaume

Advanced Cloud Infrastructures

From Data Centers to Fog Computing (part 1)Guillaume Pierre

Master 2 CCS & SIF, 2017

Advanced Cloud Infrastructures 1 / 35

Page 2: From Data Centers to Fog Computing (part 1) …people.rennes.inria.fr/.../uploads/2017/09/slides1.pdfAdvanced Cloud Infrastructures From Data Centers to Fog Computing (part 1) Guillaume

Advanced Cloud Infrastructures 2 / 35

Page 3: From Data Centers to Fog Computing (part 1) …people.rennes.inria.fr/.../uploads/2017/09/slides1.pdfAdvanced Cloud Infrastructures From Data Centers to Fog Computing (part 1) Guillaume

Advanced Cloud Infrastructures 3 / 35

Page 4: From Data Centers to Fog Computing (part 1) …people.rennes.inria.fr/.../uploads/2017/09/slides1.pdfAdvanced Cloud Infrastructures From Data Centers to Fog Computing (part 1) Guillaume

Table of Contents

1 Cloud Data Centers

2 Cloud-based applications are changing

3 Edge Computing

4 Fog Computing

5 Research question: what is the smallest, cheapest machine which canstill be used as a fog computing node?

6 Virtualizing a Raspberry Pi

Advanced Cloud Infrastructures Cloud Data Centers 4 / 35

Page 5: From Data Centers to Fog Computing (part 1) …people.rennes.inria.fr/.../uploads/2017/09/slides1.pdfAdvanced Cloud Infrastructures From Data Centers to Fog Computing (part 1) Guillaume

Traditional system architectures

MachineOS

Middleware

Application

Traditionalarchitecture

Advanced Cloud Infrastructures Cloud Data Centers 5 / 35

Page 6: From Data Centers to Fog Computing (part 1) …people.rennes.inria.fr/.../uploads/2017/09/slides1.pdfAdvanced Cloud Infrastructures From Data Centers to Fog Computing (part 1) Guillaume

Traditional system architectures

MachineOS

Middleware

Application

Traditionalarchitecture

Advanced Cloud Infrastructures Cloud Data Centers 5 / 35

Page 7: From Data Centers to Fog Computing (part 1) …people.rennes.inria.fr/.../uploads/2017/09/slides1.pdfAdvanced Cloud Infrastructures From Data Centers to Fog Computing (part 1) Guillaume

The varying capacity problem

Com

pute

cap

aci

ty

Time

Demand

Advanced Cloud Infrastructures Cloud Data Centers 6 / 35

Page 8: From Data Centers to Fog Computing (part 1) …people.rennes.inria.fr/.../uploads/2017/09/slides1.pdfAdvanced Cloud Infrastructures From Data Centers to Fog Computing (part 1) Guillaume

The varying capacity problem

Com

pute

cap

aci

ty

Time

DemandNecessary capacity

Advanced Cloud Infrastructures Cloud Data Centers 6 / 35

Page 9: From Data Centers to Fog Computing (part 1) …people.rennes.inria.fr/.../uploads/2017/09/slides1.pdfAdvanced Cloud Infrastructures From Data Centers to Fog Computing (part 1) Guillaume

The varying capacity problem

Compute

capacity

Time

DemandNecessary capacity

Advanced Cloud Infrastructures Cloud Data Centers 6 / 35

Page 10: From Data Centers to Fog Computing (part 1) …people.rennes.inria.fr/.../uploads/2017/09/slides1.pdfAdvanced Cloud Infrastructures From Data Centers to Fog Computing (part 1) Guillaume

The varying capacity problem

Compute

capacity

Time

DemandNecessary capacity

What if demand increases beyond the capacity?

Advanced Cloud Infrastructures Cloud Data Centers 6 / 35

Page 11: From Data Centers to Fog Computing (part 1) …people.rennes.inria.fr/.../uploads/2017/09/slides1.pdfAdvanced Cloud Infrastructures From Data Centers to Fog Computing (part 1) Guillaume

Cloud Computing

Di�cult to vary capacity!

Manual resourcemanagement

Resources available on demand

Resource management is fullyautomated

Pay only for what you use

VirtualizationMachine

OS

Middleware

Application

Machine + OSMachine + OSMachine + OS

Infrastructure as a Service

Traditionalarchitecture

Cloudarchitecture

Advanced Cloud Infrastructures Cloud Data Centers 7 / 35

Page 12: From Data Centers to Fog Computing (part 1) …people.rennes.inria.fr/.../uploads/2017/09/slides1.pdfAdvanced Cloud Infrastructures From Data Centers to Fog Computing (part 1) Guillaume

Cloud Computing

VirtualizationMachine

OS

Middleware

Application

Machine + OSMachine + OSMachine + OS

Infrastructure as a Service

Applications & Services

Traditionalarchitecture

Cloudarchitecture

PaaS MapReduce Spark ...Storm

Advanced Cloud Infrastructures Cloud Data Centers 7 / 35

Page 13: From Data Centers to Fog Computing (part 1) …people.rennes.inria.fr/.../uploads/2017/09/slides1.pdfAdvanced Cloud Infrastructures From Data Centers to Fog Computing (part 1) Guillaume

Table of Contents

1 Cloud Data Centers

2 Cloud-based applications are changing

3 Edge Computing

4 Fog Computing

5 Research question: what is the smallest, cheapest machine which canstill be used as a fog computing node?

6 Virtualizing a Raspberry Pi

Advanced Cloud Infrastructures Cloud-based applications are changing 8 / 35

Page 14: From Data Centers to Fog Computing (part 1) …people.rennes.inria.fr/.../uploads/2017/09/slides1.pdfAdvanced Cloud Infrastructures From Data Centers to Fog Computing (part 1) Guillaume

The new mobile computing landscape

Since 2016: mobile network tra�c > �xed tra�c

Advanced Cloud Infrastructures Cloud-based applications are changing 9 / 35

Page 15: From Data Centers to Fog Computing (part 1) …people.rennes.inria.fr/.../uploads/2017/09/slides1.pdfAdvanced Cloud Infrastructures From Data Centers to Fog Computing (part 1) Guillaume

New types of mobile applications

Interactive applications require ultra-low network latencies

E.g., augmented reality require end-to-end delays under 20ms

But latencies to the closest data center are 20-30ms using wirednetworks, up to 50-150ms on 4G mobile networks!!!

Advanced Cloud Infrastructures Cloud-based applications are changing 10 / 35

Page 16: From Data Centers to Fog Computing (part 1) …people.rennes.inria.fr/.../uploads/2017/09/slides1.pdfAdvanced Cloud Infrastructures From Data Centers to Fog Computing (part 1) Guillaume

The new IoT landscape

Fact: IoT-generated tra�c grows faster than the Internet backbonecapacity

Advanced Cloud Infrastructures Cloud-based applications are changing 11 / 35

Page 17: From Data Centers to Fog Computing (part 1) …people.rennes.inria.fr/.../uploads/2017/09/slides1.pdfAdvanced Cloud Infrastructures From Data Centers to Fog Computing (part 1) Guillaume

New types of mobile applications

Throughput-oriented applications require local computations

E.g., distributed videosurveillance is relevant only close to the cameras

Why waste long-distance network resources?

Advanced Cloud Infrastructures Cloud-based applications are changing 12 / 35

Page 18: From Data Centers to Fog Computing (part 1) …people.rennes.inria.fr/.../uploads/2017/09/slides1.pdfAdvanced Cloud Infrastructures From Data Centers to Fog Computing (part 1) Guillaume

Question

Who owns computing resources located

closest to the mobile end usersand the IoT devices?

Answer: Mobile network operators

Advanced Cloud Infrastructures Cloud-based applications are changing 13 / 35

Page 19: From Data Centers to Fog Computing (part 1) …people.rennes.inria.fr/.../uploads/2017/09/slides1.pdfAdvanced Cloud Infrastructures From Data Centers to Fog Computing (part 1) Guillaume

Question

Who owns computing resources located

closest to the mobile end usersand the IoT devices?

Answer: Mobile network operators

Advanced Cloud Infrastructures Cloud-based applications are changing 13 / 35

Page 20: From Data Centers to Fog Computing (part 1) …people.rennes.inria.fr/.../uploads/2017/09/slides1.pdfAdvanced Cloud Infrastructures From Data Centers to Fog Computing (part 1) Guillaume

Table of Contents

1 Cloud Data Centers

2 Cloud-based applications are changing

3 Edge Computing

4 Fog Computing

5 Research question: what is the smallest, cheapest machine which canstill be used as a fog computing node?

6 Virtualizing a Raspberry Pi

Advanced Cloud Infrastructures Edge Computing 14 / 35

Page 21: From Data Centers to Fog Computing (part 1) …people.rennes.inria.fr/.../uploads/2017/09/slides1.pdfAdvanced Cloud Infrastructures From Data Centers to Fog Computing (part 1) Guillaume

Mobile network operator's revenues

Where does mobile network operator's revenues come from?I 1990's: Voice (not any more)I 2000's: Text/SMS (not any more)I 2010's: Data (not for very long. . . )I What's next?

Services!

Let's steal part of the cloud computing business. . .

I No cloud data center can be closer to the users than us!

Advanced Cloud Infrastructures Edge Computing 15 / 35

Page 22: From Data Centers to Fog Computing (part 1) …people.rennes.inria.fr/.../uploads/2017/09/slides1.pdfAdvanced Cloud Infrastructures From Data Centers to Fog Computing (part 1) Guillaume

Mobile network operator's revenues

Where does mobile network operator's revenues come from?I 1990's: Voice (not any more)I 2000's: Text/SMS (not any more)I 2010's: Data (not for very long. . . )I What's next? Services!

Let's steal part of the cloud computing business. . .

I No cloud data center can be closer to the users than us!

Advanced Cloud Infrastructures Edge Computing 15 / 35

Page 23: From Data Centers to Fog Computing (part 1) …people.rennes.inria.fr/.../uploads/2017/09/slides1.pdfAdvanced Cloud Infrastructures From Data Centers to Fog Computing (part 1) Guillaume

Edge computing

Before:

After:

Advanced Cloud Infrastructures Edge Computing 16 / 35

Page 24: From Data Centers to Fog Computing (part 1) …people.rennes.inria.fr/.../uploads/2017/09/slides1.pdfAdvanced Cloud Infrastructures From Data Centers to Fog Computing (part 1) Guillaume

Standardization e�orts

European Telecommunications Standards Institute:Mobile Multi-Access Edge Computing

I Fujitsu, Hewlett-Packard, Huawei, Intel, Juniper, Motorola,NEC,Nokia, Orange, Samsung, Sony, Vodafone, . . .

I Focus: integration within mobile phone networks

Open Edge Computing InitiativeI Focus: opennessI Intel, Huawei, Vodafone, Carnegie-Mellon university, . . .

Open Fog ConsortiumI ARM, Cisco, Dell, Intel, Microsoft, . . .

Fog/Edge/Massively Distributed Clouds WG at OpenStack

Advanced Cloud Infrastructures Edge Computing 17 / 35

Page 25: From Data Centers to Fog Computing (part 1) …people.rennes.inria.fr/.../uploads/2017/09/slides1.pdfAdvanced Cloud Infrastructures From Data Centers to Fog Computing (part 1) Guillaume

Standardization e�orts

European Telecommunications Standards Institute:Mobile Multi-Access Edge Computing

I Fujitsu, Hewlett-Packard, Huawei, Intel, Juniper, Motorola,NEC,Nokia, Orange, Samsung, Sony, Vodafone, . . .

I Focus: integration within mobile phone networks

Open Edge Computing InitiativeI Focus: opennessI Intel, Huawei, Vodafone, Carnegie-Mellon university, . . .

Open Fog ConsortiumI ARM, Cisco, Dell, Intel, Microsoft, . . .

Fog/Edge/Massively Distributed Clouds WG at OpenStack

Advanced Cloud Infrastructures Edge Computing 17 / 35

Page 26: From Data Centers to Fog Computing (part 1) …people.rennes.inria.fr/.../uploads/2017/09/slides1.pdfAdvanced Cloud Infrastructures From Data Centers to Fog Computing (part 1) Guillaume

Standardization e�orts

European Telecommunications Standards Institute:Mobile Multi-Access Edge Computing

I Fujitsu, Hewlett-Packard, Huawei, Intel, Juniper, Motorola,NEC,Nokia, Orange, Samsung, Sony, Vodafone, . . .

I Focus: integration within mobile phone networks

Open Edge Computing InitiativeI Focus: opennessI Intel, Huawei, Vodafone, Carnegie-Mellon university, . . .

Open Fog ConsortiumI ARM, Cisco, Dell, Intel, Microsoft, . . .

Fog/Edge/Massively Distributed Clouds WG at OpenStack

Advanced Cloud Infrastructures Edge Computing 17 / 35

Page 27: From Data Centers to Fog Computing (part 1) …people.rennes.inria.fr/.../uploads/2017/09/slides1.pdfAdvanced Cloud Infrastructures From Data Centers to Fog Computing (part 1) Guillaume

Standardization e�orts

European Telecommunications Standards Institute:Mobile Multi-Access Edge Computing

I Fujitsu, Hewlett-Packard, Huawei, Intel, Juniper, Motorola,NEC,Nokia, Orange, Samsung, Sony, Vodafone, . . .

I Focus: integration within mobile phone networks

Open Edge Computing InitiativeI Focus: opennessI Intel, Huawei, Vodafone, Carnegie-Mellon university, . . .

Open Fog ConsortiumI ARM, Cisco, Dell, Intel, Microsoft, . . .

Fog/Edge/Massively Distributed Clouds WG at OpenStack

Advanced Cloud Infrastructures Edge Computing 17 / 35

Page 28: From Data Centers to Fog Computing (part 1) …people.rennes.inria.fr/.../uploads/2017/09/slides1.pdfAdvanced Cloud Infrastructures From Data Centers to Fog Computing (part 1) Guillaume

Table of Contents

1 Cloud Data Centers

2 Cloud-based applications are changing

3 Edge Computing

4 Fog Computing

5 Research question: what is the smallest, cheapest machine which canstill be used as a fog computing node?

6 Virtualizing a Raspberry Pi

Advanced Cloud Infrastructures Fog Computing 18 / 35

Page 29: From Data Centers to Fog Computing (part 1) …people.rennes.inria.fr/.../uploads/2017/09/slides1.pdfAdvanced Cloud Infrastructures From Data Centers to Fog Computing (part 1) Guillaume

What is fog computing?

Fog computing = cloud

+ edge

+ end-user devicesas a single execution platform

Low latency

Localized tra�cI Less global tra�cI Better reliabilityI PrivacyI . . .

Advanced Cloud Infrastructures Fog Computing 19 / 35

Page 30: From Data Centers to Fog Computing (part 1) …people.rennes.inria.fr/.../uploads/2017/09/slides1.pdfAdvanced Cloud Infrastructures From Data Centers to Fog Computing (part 1) Guillaume

Fog 6= Cloud

We need cloud servers close to the users, but the users are everywhere(and they are mobile)

I Let's place one cloud server within short range of any end-user device⇒ Fog computing resources will need to be distributed in thousands of

locations

Fog nodes will be connected with commodity networksI Forget your multi-Gbps data center networks!

Fog nodes must be small, cheap, easy to deploy and to replace

Advanced Cloud Infrastructures Fog Computing 20 / 35

Page 31: From Data Centers to Fog Computing (part 1) …people.rennes.inria.fr/.../uploads/2017/09/slides1.pdfAdvanced Cloud Infrastructures From Data Centers to Fog Computing (part 1) Guillaume

Fog 6= Cloud

We need cloud servers close to the users, but the users are everywhere(and they are mobile)

I Let's place one cloud server within short range of any end-user device⇒ Fog computing resources will need to be distributed in thousands of

locations

Fog nodes will be connected with commodity networksI Forget your multi-Gbps data center networks!

Fog nodes must be small, cheap, easy to deploy and to replace

Advanced Cloud Infrastructures Fog Computing 20 / 35

Page 32: From Data Centers to Fog Computing (part 1) …people.rennes.inria.fr/.../uploads/2017/09/slides1.pdfAdvanced Cloud Infrastructures From Data Centers to Fog Computing (part 1) Guillaume

Fog 6= Cloud

We need cloud servers close to the users, but the users are everywhere(and they are mobile)

I Let's place one cloud server within short range of any end-user device⇒ Fog computing resources will need to be distributed in thousands of

locations

Fog nodes will be connected with commodity networksI Forget your multi-Gbps data center networks!

Fog nodes must be small, cheap, easy to deploy and to replace

Advanced Cloud Infrastructures Fog Computing 20 / 35

Page 33: From Data Centers to Fog Computing (part 1) …people.rennes.inria.fr/.../uploads/2017/09/slides1.pdfAdvanced Cloud Infrastructures From Data Centers to Fog Computing (part 1) Guillaume

Fog 6= Cloud

Typical Cloud platform

Few data centers

Lots of resources per datacenter

High-performance networks

Cloud resource location is(mostly) irrelevant

Typical Fog platform

Huge number ofpoints-of-presence

Few resources per PoP

Commodity networks

Fog resource location isextremely important

Advanced Cloud Infrastructures Fog Computing 21 / 35

Page 34: From Data Centers to Fog Computing (part 1) …people.rennes.inria.fr/.../uploads/2017/09/slides1.pdfAdvanced Cloud Infrastructures From Data Centers to Fog Computing (part 1) Guillaume

Fog 6= Cloud

Typical Cloud platform

Few data centers

Lots of resources per datacenter

High-performance networks

Cloud resource location is(mostly) irrelevant

Typical Fog platform

Huge number ofpoints-of-presence

Few resources per PoP

Commodity networks

Fog resource location isextremely important

Advanced Cloud Infrastructures Fog Computing 21 / 35

Page 35: From Data Centers to Fog Computing (part 1) …people.rennes.inria.fr/.../uploads/2017/09/slides1.pdfAdvanced Cloud Infrastructures From Data Centers to Fog Computing (part 1) Guillaume

Table of Contents

1 Cloud Data Centers

2 Cloud-based applications are changing

3 Edge Computing

4 Fog Computing

5 Research question: what is the smallest, cheapest machine which canstill be used as a fog computing node?

6 Virtualizing a Raspberry Pi

Advanced Cloud InfrastructuresResearch question: what is the smallest, cheapest machine

which can still be used as a fog computing node? 22 / 35

Page 36: From Data Centers to Fog Computing (part 1) …people.rennes.inria.fr/.../uploads/2017/09/slides1.pdfAdvanced Cloud Infrastructures From Data Centers to Fog Computing (part 1) Guillaume

Raspberry PIs are more powerful than you may think

RPi3 Pine A64+ HP 820 G2

CPU (s) 46.5 4.1 2.8

Memory (MB/s) 933 1098 5658

Network (Mb/s) 94.2 922 935

Storage (MB/s) 2.53 2.42 23.9

Power when idle (W) 2 2 15

Power under load (W) 4.4 4.1 24.5

Price ∼ 92 e ∼ 74 e ∼ 1600 e

We chose RPi3 as our base platform for the time being

Mostly because of easy purchase options and community support. . .

Advanced Cloud InfrastructuresResearch question: what is the smallest, cheapest machine

which can still be used as a fog computing node? 23 / 35

Page 37: From Data Centers to Fog Computing (part 1) …people.rennes.inria.fr/.../uploads/2017/09/slides1.pdfAdvanced Cloud Infrastructures From Data Centers to Fog Computing (part 1) Guillaume

What about a real application?

Input: live video stream

Processing: face recognition algorithm running inside Apache Flink

The RPIs are �only� 3-5 times slower than my laptop

But they are 17 times cheaper

If my applications scale horizontally I can use as many RPIs asnecessary

Advanced Cloud InfrastructuresResearch question: what is the smallest, cheapest machine

which can still be used as a fog computing node? 24 / 35

Page 38: From Data Centers to Fog Computing (part 1) …people.rennes.inria.fr/.../uploads/2017/09/slides1.pdfAdvanced Cloud Infrastructures From Data Centers to Fog Computing (part 1) Guillaume

What about a real application?

Input: live video stream

Processing: face recognition algorithm running inside Apache Flink

The RPIs are �only� 3-5 times slower than my laptop

But they are 17 times cheaper

If my applications scale horizontally I can use as many RPIs asnecessary

Advanced Cloud InfrastructuresResearch question: what is the smallest, cheapest machine

which can still be used as a fog computing node? 24 / 35

Page 39: From Data Centers to Fog Computing (part 1) …people.rennes.inria.fr/.../uploads/2017/09/slides1.pdfAdvanced Cloud Infrastructures From Data Centers to Fog Computing (part 1) Guillaume

Table of Contents

1 Cloud Data Centers

2 Cloud-based applications are changing

3 Edge Computing

4 Fog Computing

5 Research question: what is the smallest, cheapest machine which canstill be used as a fog computing node?

6 Virtualizing a Raspberry Pi

Advanced Cloud Infrastructures Virtualizing a Raspberry Pi 25 / 35

Page 40: From Data Centers to Fog Computing (part 1) …people.rennes.inria.fr/.../uploads/2017/09/slides1.pdfAdvanced Cloud Infrastructures From Data Centers to Fog Computing (part 1) Guillaume

Virtualization

Operating system

App 1 App 2 ...App 3

"The hardware machine"

Assembler layer

Digital logic layer (memory, compute circuits)

Micro-architecture

Peripherals (disk, screen,network, keyboard...)

Bus

Traditional machinearchitecture:

Applications

Operating system

Hardware

Advanced Cloud Infrastructures Virtualizing a Raspberry Pi 26 / 35

Page 41: From Data Centers to Fog Computing (part 1) …people.rennes.inria.fr/.../uploads/2017/09/slides1.pdfAdvanced Cloud Infrastructures From Data Centers to Fog Computing (part 1) Guillaume

Virtualization

Operating system

Assembler layer

"The hardware machine"

Assembler layer

Digital logic layer (memory, compute circuits)

Micro-architecture

Peripherals (disk, screen,network, keyboard...)

Bus

Let's create a �special appli-cation� which behaves exactlythe same as the assemblerlayer. . .

Advanced Cloud Infrastructures Virtualizing a Raspberry Pi 26 / 35

Page 42: From Data Centers to Fog Computing (part 1) …people.rennes.inria.fr/.../uploads/2017/09/slides1.pdfAdvanced Cloud Infrastructures From Data Centers to Fog Computing (part 1) Guillaume

Virtualization

Host operating system

Hypervisor(assembler layer)

Virtual machine

Assembler layer

Digital logic layer (memory, compute circuits)

Micro-architecture

Peripherals (disk, screen,network, keyboard...)

Bus

Guest operating system

App 1 App 2 ...

"The hardware machine"

We can execute any operatingsystem on top of it. . .

. . . and any applicationover the guest operatingsystem

⇒ We have a virtual ma-chine

Advanced Cloud Infrastructures Virtualizing a Raspberry Pi 26 / 35

Page 43: From Data Centers to Fog Computing (part 1) …people.rennes.inria.fr/.../uploads/2017/09/slides1.pdfAdvanced Cloud Infrastructures From Data Centers to Fog Computing (part 1) Guillaume

Virtualization

Host operating system

Hypervisor

Virtual machine 1

Assembler layer

Digital logic layer(memory, compute circuits)

Micro-architecture

Peripherals (disk, screen,network, keyboard...)

Bus

Guest operating system

App 1 App 2 ...

"The hardware machine"

Hypervisor

Virtual machine 2

Guest operating system

App 1 App 2 ...

8 cores, 16 GB RAM

2 cores, 6 GB RAM 4 cores, 8 GB RAM

We can run multiple virtualmachines on the same physicalmachine:

Each virtual machineruns in full isolation fromthe other VMs

Each virtual machineowns a subset of thehardware resources of thephysical machine

Advanced Cloud Infrastructures Virtualizing a Raspberry Pi 26 / 35

Page 44: From Data Centers to Fog Computing (part 1) …people.rennes.inria.fr/.../uploads/2017/09/slides1.pdfAdvanced Cloud Infrastructures From Data Centers to Fog Computing (part 1) Guillaume

Advanced Cloud Infrastructures Virtualizing a Raspberry Pi 27 / 35

Page 45: From Data Centers to Fog Computing (part 1) …people.rennes.inria.fr/.../uploads/2017/09/slides1.pdfAdvanced Cloud Infrastructures From Data Centers to Fog Computing (part 1) Guillaume

Why is virtualization interesting for cloud providers?

Isolation: I can create multiple VMs on the same machine and giveeach VM to a di�erent user (they will not see nor interferewith each other)

Customization: Each user can customize their VMs according to their ownrequirements.

Consolidation: Few applications can really exploit a large server machine toits maximum capacity. With virtualization I can split thiscapacity in smaller units and thereby increase my resourceutilization.

Management: Virtualization simpli�es resource management: I canmeasure how many resources each user is using, migrate VMsfrom one host to another, etc.

Advanced Cloud Infrastructures Virtualizing a Raspberry Pi 28 / 35

Page 46: From Data Centers to Fog Computing (part 1) …people.rennes.inria.fr/.../uploads/2017/09/slides1.pdfAdvanced Cloud Infrastructures From Data Centers to Fog Computing (part 1) Guillaume

Virtualization technologies

Virtualization technologies are now totally mainstream:

Commercial: VMware, Microsoft App-V, . . .

Open-Source: KVM, VirtualBox, Xen, . . .

Paravirtualization vs. full virtualization:

Paravirtualization works on any hardware platform but it requiresspecial support in the guest OS. Slow!

Full virtualization exploits special features of modern CPUs, does notrequire special support in the guest OS. Faster!

Virtual machines are waaaaaayyyyyy too heavyweight for a RPI

Each guest OS needs lots of memory

Each OS needs to execute lots of background stu�

Impossible to run 100+ VMs on a single machine. . .

Advanced Cloud Infrastructures Virtualizing a Raspberry Pi 29 / 35

Page 47: From Data Centers to Fog Computing (part 1) …people.rennes.inria.fr/.../uploads/2017/09/slides1.pdfAdvanced Cloud Infrastructures From Data Centers to Fog Computing (part 1) Guillaume

Virtualization technologies

Virtualization technologies are now totally mainstream:

Commercial: VMware, Microsoft App-V, . . .

Open-Source: KVM, VirtualBox, Xen, . . .

Paravirtualization vs. full virtualization:

Paravirtualization works on any hardware platform but it requiresspecial support in the guest OS. Slow!

Full virtualization exploits special features of modern CPUs, does notrequire special support in the guest OS. Faster!

Virtual machines are waaaaaayyyyyy too heavyweight for a RPI

Each guest OS needs lots of memory

Each OS needs to execute lots of background stu�

Impossible to run 100+ VMs on a single machine. . .

Advanced Cloud Infrastructures Virtualizing a Raspberry Pi 29 / 35

Page 48: From Data Centers to Fog Computing (part 1) …people.rennes.inria.fr/.../uploads/2017/09/slides1.pdfAdvanced Cloud Infrastructures From Data Centers to Fog Computing (part 1) Guillaume

Containers

Operating system

App 1 App 2 ...App 3

"The hardware machine"

Assembler layer

Digital logic layer (memory, compute circuits)

Micro-architecture

Peripherals (disk, screen,network, keyboard...)

Bus

Traditional machinearchitecture:

Applications

Operating system

Hardware

Advanced Cloud Infrastructures Virtualizing a Raspberry Pi 30 / 35

Page 49: From Data Centers to Fog Computing (part 1) …people.rennes.inria.fr/.../uploads/2017/09/slides1.pdfAdvanced Cloud Infrastructures From Data Centers to Fog Computing (part 1) Guillaume

Containers

Operating system

App 1 App 2 ...App 3

"The hardware machine"

Assembler layer

Digital logic layer (memory, compute circuits)

Micro-architecture

Peripherals (disk, screen,network, keyboard...)

Bus

Container 1 Container 2

Let's create groups of processes whichbelong together:

Process groups are totally isolatedfrom each other

Each process group belongs to asingle user

Each process group has its ownhardware resource limits (CPU,RAM, . . . )

Each process group has its ownnetwork access policy

Etc.

⇒ We have containers

Advanced Cloud Infrastructures Virtualizing a Raspberry Pi 30 / 35

Page 50: From Data Centers to Fog Computing (part 1) …people.rennes.inria.fr/.../uploads/2017/09/slides1.pdfAdvanced Cloud Infrastructures From Data Centers to Fog Computing (part 1) Guillaume

Container technologies

Containers are an operating system featureI No need for special CPU supportI Fully supported in Linux, Windows, . . .I We usually add an extra software layer to simplify management: Docker

Containers are less customizable than VMsI Container owners cannot choose their OSI But was that really necessary in the �rst place? Not always.

Containers are much more lightweight than VMsI No need to run lots of (mostly identical) operating systems next to

each otherI Containers often start in less than 1 secondI We can easily run hundreds of containers on a mid-sized machine

Advanced Cloud Infrastructures Virtualizing a Raspberry Pi 31 / 35

Page 51: From Data Centers to Fog Computing (part 1) …people.rennes.inria.fr/.../uploads/2017/09/slides1.pdfAdvanced Cloud Infrastructures From Data Centers to Fog Computing (part 1) Guillaume

LXC containers

Performance

Performance is extremely closeto bare-metal

Agility

Starting 150 containers w/ ApacheI Total time: 36 s

(240ms/container)I Consumes about 2% of CPUI Memory usage: ∼ 10MB/container

Stopping 150 containers:I Total time: 9 seconds

http://www.slideshare.net/BodenRussell/realizing-linux-containerslxc

Advanced Cloud Infrastructures Virtualizing a Raspberry Pi 32 / 35

Page 52: From Data Centers to Fog Computing (part 1) …people.rennes.inria.fr/.../uploads/2017/09/slides1.pdfAdvanced Cloud Infrastructures From Data Centers to Fog Computing (part 1) Guillaume

Docker is a shipping container system for code

https://impythonist.wordpress.com/2015/06/21/

docker-the-future-of-virtualization-for-your-django-web-development/

Advanced Cloud Infrastructures Virtualizing a Raspberry Pi 33 / 35

Page 53: From Data Centers to Fog Computing (part 1) …people.rennes.inria.fr/.../uploads/2017/09/slides1.pdfAdvanced Cloud Infrastructures From Data Centers to Fog Computing (part 1) Guillaume

https://blog.docker.com/2015/10/raspberry-pi-dockercon-challenge-winner/

Advanced Cloud Infrastructures Virtualizing a Raspberry Pi 34 / 35

Page 54: From Data Centers to Fog Computing (part 1) …people.rennes.inria.fr/.../uploads/2017/09/slides1.pdfAdvanced Cloud Infrastructures From Data Centers to Fog Computing (part 1) Guillaume

Teaser

Next week we'll see thatbuilding a real fog platformis not as easy as it looks . . .

Advanced Cloud Infrastructures Virtualizing a Raspberry Pi 35 / 35