+ All Categories
Home > Documents > Fog Computing Platforms - APNOMSDistributed Analytics in Fog Computing Platforms Using TensorFlow...

Fog Computing Platforms - APNOMSDistributed Analytics in Fog Computing Platforms Using TensorFlow...

Date post: 25-May-2020
Category:
Upload: others
View: 14 times
Download: 0 times
Share this document with a friend
33
Distributed Analytics in Fog Computing Platforms Using TensorFlow and Kubernetes Pei-Hsuan Tasi, Hua-Jun Hong, An-Chieh Cheng, and Cheng- Hsin Hsu Department of Computer Science, National Tsing Hua University, Taiwan
Transcript
Page 1: Fog Computing Platforms - APNOMSDistributed Analytics in Fog Computing Platforms Using TensorFlow and Kubernetes Pei-Hsuan Tasi, Hua-Jun Hong, An-Chieh Cheng, and Cheng-Hsin Hsu Department

Distributed Analytics in Fog Computing Platforms Using TensorFlow and Kubernetes

Pei-Hsuan Tasi, Hua-Jun Hong, An-Chieh Cheng, and Cheng-Hsin Hsu

Department of Computer Science, National Tsing Hua University, Taiwan

Page 2: Fog Computing Platforms - APNOMSDistributed Analytics in Fog Computing Platforms Using TensorFlow and Kubernetes Pei-Hsuan Tasi, Hua-Jun Hong, An-Chieh Cheng, and Cheng-Hsin Hsu Department

What is Fog?

2

▸ “Fog is a cloud close to the ground”

▸ Bonomi et al. (2012) [1]

▸ Designed for Internet of Things (IoT)

▸ Location awareness

▸ Realtimeness

▸ Mobility support

▸ …

[1] F. Bonomi, R. Milito, J. Zhu, and S. Addepalli,“Fog computing and its role in the internet of things,”in Proc. of ACM Workshop on Mobile Cloud Computing (MCC), 2012.

Page 3: Fog Computing Platforms - APNOMSDistributed Analytics in Fog Computing Platforms Using TensorFlow and Kubernetes Pei-Hsuan Tasi, Hua-Jun Hong, An-Chieh Cheng, and Cheng-Hsin Hsu Department

IoT Market is Soared!▸ Internet of Things (IoT) grows rapidly

▸ Devices: 20.4 billion in 2020 [1]

▸ Market: $1.9 trillion in 2013 to $7.1 trillion in 2020 [2]

▸ Produce incredible amount of data

▸ Overload the data centers and congest the networks seriously

3[1] http://www.gartner.com/newsroom/id/3598917

[2] http://www.ironpaper.com/webintel/articles/internet-of-things-market-statistics/

Page 4: Fog Computing Platforms - APNOMSDistributed Analytics in Fog Computing Platforms Using TensorFlow and Kubernetes Pei-Hsuan Tasi, Hua-Jun Hong, An-Chieh Cheng, and Cheng-Hsin Hsu Department

Limitations of Current (Cloud) Solution

4

Analyze and Compute

Data

in Data center

Huge Amount of

Overload Networks

and Data Center

Page 5: Fog Computing Platforms - APNOMSDistributed Analytics in Fog Computing Platforms Using TensorFlow and Kubernetes Pei-Hsuan Tasi, Hua-Jun Hong, An-Chieh Cheng, and Cheng-Hsin Hsu Department

Fog Computing Ecosystem

5

Publish

Fog

Devices

Server

Application

Developers

Fog Service

Provider

Fog Users

Requests

Res

ult

s

Page 6: Fog Computing Platforms - APNOMSDistributed Analytics in Fog Computing Platforms Using TensorFlow and Kubernetes Pei-Hsuan Tasi, Hua-Jun Hong, An-Chieh Cheng, and Cheng-Hsin Hsu Department

Benefits of Fog Computing

▸ Reduce latency

▸ Reduce network traffic

▸ Reduce the load of data centers

▸ Reduce privacy issues

6

Page 7: Fog Computing Platforms - APNOMSDistributed Analytics in Fog Computing Platforms Using TensorFlow and Kubernetes Pei-Hsuan Tasi, Hua-Jun Hong, An-Chieh Cheng, and Cheng-Hsin Hsu Department

Challenges

▸ Limited resources of the fog devices

• How to run complex analytics?

▸ Mobility-required IoT applications

• How to transparently and dynamically deploy applications?

▸ Many fog devices and IoT applications

• How to efficiently manage them?

7

Page 8: Fog Computing Platforms - APNOMSDistributed Analytics in Fog Computing Platforms Using TensorFlow and Kubernetes Pei-Hsuan Tasi, Hua-Jun Hong, An-Chieh Cheng, and Cheng-Hsin Hsu Department

Shooter Tracking Usage Scenario

8

Huge Volume !Recognize it!

Track the shooter!Dynamic Deployment! Keep Tracking!

It is a gun shot!

Page 9: Fog Computing Platforms - APNOMSDistributed Analytics in Fog Computing Platforms Using TensorFlow and Kubernetes Pei-Hsuan Tasi, Hua-Jun Hong, An-Chieh Cheng, and Cheng-Hsin Hsu Department

▸ Dynamic deployment

▸ Efficient management

▸ Real-time analytics

Our Goals

9

Page 10: Fog Computing Platforms - APNOMSDistributed Analytics in Fog Computing Platforms Using TensorFlow and Kubernetes Pei-Hsuan Tasi, Hua-Jun Hong, An-Chieh Cheng, and Cheng-Hsin Hsu Department

▸ Enhance open source projects

• Docker -> Dynamic deployment

• Kubernetes -> Management

• TensorFlow -> Real-time analytics

Implement the Fog Computing Platform

10

Page 11: Fog Computing Platforms - APNOMSDistributed Analytics in Fog Computing Platforms Using TensorFlow and Kubernetes Pei-Hsuan Tasi, Hua-Jun Hong, An-Chieh Cheng, and Cheng-Hsin Hsu Department

▸ Container

• LXC, Docker, …

▸ Virtualize analytics applications

• Dynamic deployment

• Easy migration

• Efficient management

▸ Virtualization overhead

• We implement a online regression mechanism to derive

system models

Docker: Dynamic Deployment

11

Page 12: Fog Computing Platforms - APNOMSDistributed Analytics in Fog Computing Platforms Using TensorFlow and Kubernetes Pei-Hsuan Tasi, Hua-Jun Hong, An-Chieh Cheng, and Cheng-Hsin Hsu Department

▸ Traditional Virtual Machine

• Better isolation

▸ Container: light-weight VM

• Smaller storage space, less computing power, and shorter

startup time

Traditional VM v.s Container

12

VirtualMachine

Container

Size GB MB

Startup Minute Second

Page 13: Fog Computing Platforms - APNOMSDistributed Analytics in Fog Computing Platforms Using TensorFlow and Kubernetes Pei-Hsuan Tasi, Hua-Jun Hong, An-Chieh Cheng, and Cheng-Hsin Hsu Department

Kubernetes: Management

▸ Monitoring

• Resource usage (CPU, Memory)

• Containers status

• Locations

• Sensors

▸ Deployment

• Deployment algorithm

13

Page 14: Fog Computing Platforms - APNOMSDistributed Analytics in Fog Computing Platforms Using TensorFlow and Kubernetes Pei-Hsuan Tasi, Hua-Jun Hong, An-Chieh Cheng, and Cheng-Hsin Hsu Department

TensorFlow: Real Time Analytics

▸ An open-source programming model for Machine Intelligence

▸ Data flow graphs

▸ Distributed computing supported

• We add queues to speedup distributed computing

14

Cuts

Page 15: Fog Computing Platforms - APNOMSDistributed Analytics in Fog Computing Platforms Using TensorFlow and Kubernetes Pei-Hsuan Tasi, Hua-Jun Hong, An-Chieh Cheng, and Cheng-Hsin Hsu Department

Testbed

▸ Server

• I5 CPU PC with Kubernetes

▸ Fog Devices

• 5 Raspberry Pi 3 (1.2 GHz 4-core CPUs)

• Kubernetes and Docker (TensorFlow is

installed in Docker containers)

15

Dashboard

Switch

Server

Fog Devices

Page 16: Fog Computing Platforms - APNOMSDistributed Analytics in Fog Computing Platforms Using TensorFlow and Kubernetes Pei-Hsuan Tasi, Hua-Jun Hong, An-Chieh Cheng, and Cheng-Hsin Hsu Department

Application: Air Pollution Monitor

▸ Air pollution sensors installed on

Raspberry Pi

▸ Moving average

16

Page 17: Fog Computing Platforms - APNOMSDistributed Analytics in Fog Computing Platforms Using TensorFlow and Kubernetes Pei-Hsuan Tasi, Hua-Jun Hong, An-Chieh Cheng, and Cheng-Hsin Hsu Department

Application: Object Recognizer

▸ A pre-trained model (YOLO)

▸ Implemented using neural networks

17

Page 18: Fog Computing Platforms - APNOMSDistributed Analytics in Fog Computing Platforms Using TensorFlow and Kubernetes Pei-Hsuan Tasi, Hua-Jun Hong, An-Chieh Cheng, and Cheng-Hsin Hsu Department

Distributed Analytics Result in Better Performance for Complex Analytics▸ Air pollution monitor: too simple to benefit from distributed

analytics

▸ Object recognizer:

• One more device gives 35.5% and 54.1% improvements

18We only consider the object recognizer in the following results

Object recognizerAir pollution monitor

Page 19: Fog Computing Platforms - APNOMSDistributed Analytics in Fog Computing Platforms Using TensorFlow and Kubernetes Pei-Hsuan Tasi, Hua-Jun Hong, An-Chieh Cheng, and Cheng-Hsin Hsu Department

Cut on Equal Complexity Point Results in Better Performance

▸ Setup: run object recognizer on two fog devices (different cut

points)

▸ Cut point 4&5 result in the most no. processed images

▸ Two fog devices consume the same CPU resources on cut

point 4&5

19

Equal Complexity Point

CutDevice 1 Device 2

Page 20: Fog Computing Platforms - APNOMSDistributed Analytics in Fog Computing Platforms Using TensorFlow and Kubernetes Pei-Hsuan Tasi, Hua-Jun Hong, An-Chieh Cheng, and Cheng-Hsin Hsu Department

Cut Points Affect Network Overhead

▸ Put more computations on device 1 can reduce network

overhead

20

CutDevice 1 Device 2

Page 21: Fog Computing Platforms - APNOMSDistributed Analytics in Fog Computing Platforms Using TensorFlow and Kubernetes Pei-Hsuan Tasi, Hua-Jun Hong, An-Chieh Cheng, and Cheng-Hsin Hsu Department

Low Virtualization Overhead

▸ Setup: with and without Docker

▸ Overhead from Docker

• Less than 5%

21

No.

Page 22: Fog Computing Platforms - APNOMSDistributed Analytics in Fog Computing Platforms Using TensorFlow and Kubernetes Pei-Hsuan Tasi, Hua-Jun Hong, An-Chieh Cheng, and Cheng-Hsin Hsu Department

Low Communication Overhead

▸ Setup: without Docker and distributed speedup

▸ Overhead from distributed computing using TensorFlow

• 10%

22

10%

Page 23: Fog Computing Platforms - APNOMSDistributed Analytics in Fog Computing Platforms Using TensorFlow and Kubernetes Pei-Hsuan Tasi, Hua-Jun Hong, An-Chieh Cheng, and Cheng-Hsin Hsu Department

Summary

▸ Distributed Analytics is helpful for complex analytic

applications

▸ Different cut points are suitable for different environments

• i.e., while network resource is the bottleneck, we tend to put

the cut point closer to device 2

▸ The overhead caused by Docker and TensorFlow are small

• Docker virtualization overhead: < 5%

• TensorFlow communication overhead: < 10%

23

Page 24: Fog Computing Platforms - APNOMSDistributed Analytics in Fog Computing Platforms Using TensorFlow and Kubernetes Pei-Hsuan Tasi, Hua-Jun Hong, An-Chieh Cheng, and Cheng-Hsin Hsu Department

Conclusion

▸ Implement a fog computing platform running distributed analytics applications

• Dynamic Deployment -> Docker

• Efficient Management -> Kubernetes

• Distributed Analytics -> TensorFlow

▸ Implement real analytics applications

• Air pollution monitor and object recognizer

▸ Experiments

• Better performance of distributed analytics

• Low overhead caused by Docker and TensorFlow

• Tradeoff of different cut points

24

Page 25: Fog Computing Platforms - APNOMSDistributed Analytics in Fog Computing Platforms Using TensorFlow and Kubernetes Pei-Hsuan Tasi, Hua-Jun Hong, An-Chieh Cheng, and Cheng-Hsin Hsu Department

Future Work

▸ Future Work

• Deployment problems

• Available resource prediction

• Seamless migration

• …

25

Page 26: Fog Computing Platforms - APNOMSDistributed Analytics in Fog Computing Platforms Using TensorFlow and Kubernetes Pei-Hsuan Tasi, Hua-Jun Hong, An-Chieh Cheng, and Cheng-Hsin Hsu Department

Q&A

Page 27: Fog Computing Platforms - APNOMSDistributed Analytics in Fog Computing Platforms Using TensorFlow and Kubernetes Pei-Hsuan Tasi, Hua-Jun Hong, An-Chieh Cheng, and Cheng-Hsin Hsu Department

▸ OpenStack

• Used to manage virtual machines in data centers

▸ SaltStack

• Remote execution tool and configuration

management system

▸ Kubernetes

• Automating deployment, scaling, and management of

containerized applications

Management

27

Page 28: Fog Computing Platforms - APNOMSDistributed Analytics in Fog Computing Platforms Using TensorFlow and Kubernetes Pei-Hsuan Tasi, Hua-Jun Hong, An-Chieh Cheng, and Cheng-Hsin Hsu Department

▸ Each hosts several containers, can be assembled into pod

▸ A service is a group of pods that are running on the cluster

Kubernetes Architecture

28

Minion 1 Minion 2

Page 29: Fog Computing Platforms - APNOMSDistributed Analytics in Fog Computing Platforms Using TensorFlow and Kubernetes Pei-Hsuan Tasi, Hua-Jun Hong, An-Chieh Cheng, and Cheng-Hsin Hsu Department

Container

▸ Docker

• Container virtualization

• Need less storage space and less computing power

▸ Kubernetes

• Automated container deployment, scaling, and management

29

Page 30: Fog Computing Platforms - APNOMSDistributed Analytics in Fog Computing Platforms Using TensorFlow and Kubernetes Pei-Hsuan Tasi, Hua-Jun Hong, An-Chieh Cheng, and Cheng-Hsin Hsu Department

‣ Lightweight

• Quick start

• Easy to replace the configuration of the applications

▸ Each host can handle multiple containers

• Share the same OS kernel, and use the namespaces to

distinguish one from another

Container-based Applications

30

Page 31: Fog Computing Platforms - APNOMSDistributed Analytics in Fog Computing Platforms Using TensorFlow and Kubernetes Pei-Hsuan Tasi, Hua-Jun Hong, An-Chieh Cheng, and Cheng-Hsin Hsu Department

31

Location A Location B

Resource Usage: 5%

Resource Usage: 29%

Resource Usage: 79% Resource Usage: 11%

Resource Usage: 36%

Resource Usage: 44%

Page 32: Fog Computing Platforms - APNOMSDistributed Analytics in Fog Computing Platforms Using TensorFlow and Kubernetes Pei-Hsuan Tasi, Hua-Jun Hong, An-Chieh Cheng, and Cheng-Hsin Hsu Department

Applications

▸ IoT edge analytics

• TensorFlow

• 3 applications

- Air pollution

- Object detection

- Sound classification

32

Page 33: Fog Computing Platforms - APNOMSDistributed Analytics in Fog Computing Platforms Using TensorFlow and Kubernetes Pei-Hsuan Tasi, Hua-Jun Hong, An-Chieh Cheng, and Cheng-Hsin Hsu Department

Sample Analytics Applications

▸ Air pollution monitor

▸ Object recognizer

▸ Sound classifier

33


Recommended