an efficient process live migration mechanism for load balanced distributed virtual environments...

48
An Efficient Process Live Migration Mechanism for Load Balanced Distributed Virtual Environments Balazs Gerofi, Hajime Fujita, Yutaka Ishikawa Yutaka Ishikawa Laboratory The University Of Tokyo IEEE Cluster2010

Upload: rolf-morton

Post on 18-Dec-2015

212 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: An Efficient Process Live Migration Mechanism for Load Balanced Distributed Virtual Environments Balazs Gerofi, Hajime Fujita, Yutaka Ishikawa Yutaka Ishikawa

An Efficient Process Live Migration Mechanism forLoad Balanced Distributed Virtual Environments

Balazs Gerofi, Hajime Fujita, Yutaka IshikawaYutaka Ishikawa Laboratory

The University Of Tokyo

IEEE Cluster2010

Page 2: An Efficient Process Live Migration Mechanism for Load Balanced Distributed Virtual Environments Balazs Gerofi, Hajime Fujita, Yutaka Ishikawa Yutaka Ishikawa

Outline

• Motivation• Cluster Server Architecture • DVE Software Components• Process Live Migration • Multiple Socket Migration Optimizations• Dynamic Load Balancing• Evaluation• Conclusion

IEEE Cluster2010

Page 3: An Efficient Process Live Migration Mechanism for Load Balanced Distributed Virtual Environments Balazs Gerofi, Hajime Fujita, Yutaka Ishikawa Yutaka Ishikawa

Motivation• In Distributed Virtual Environments (DVE):

– Massively Multi-player Online Games (MMPOG)– Networked Virtual Environments (NVE) – Distributed Simulations such as the High-Level Architecture (HLA)

• 10,000 ~ 100,000 of clients may be involved• Cluster of servers is used for providing services on large scale

– Zoning (i.e., partitioning the virtual space among servers)• Main limitations of application level load-balancing:

– Client migrations are heavy, server state needs to be transferred, client(s) reconnect, etc..

– Physical machine limited to neighboring zones• Is operating system level load-balancing feasible?

– Server processes are highly interactive– Maintain a massive amount of network connections (clients)– Maintain connections with other in-cluster components– How to migrate such processes?

IEEE Cluster2010

Page 4: An Efficient Process Live Migration Mechanism for Load Balanced Distributed Virtual Environments Balazs Gerofi, Hajime Fujita, Yutaka Ishikawa Yutaka Ishikawa

Outline

• Motivation• Cluster Server Architecture • DVE Software Components• Process Live Migration • Multiple Socket Migration Optimizations• Dynamic Load Balancing• Evaluation• Conclusion

IEEE Cluster2010

Page 5: An Efficient Process Live Migration Mechanism for Load Balanced Distributed Virtual Environments Balazs Gerofi, Hajime Fujita, Yutaka Ishikawa Yutaka Ishikawa

Cluster Server Architecture

IEEE Cluster2010

• Each DVE server is equipped with a public and a private interfaces, same IP address is assigned to the public interfaces

• Router broadcasts incoming packets to all DVE server nodes– Migrating zone server processes does not require any work on the router!

• Zone server processes are distinguished based on separate port numbers (as opposed to separate IP addresses)

Page 6: An Efficient Process Live Migration Mechanism for Load Balanced Distributed Virtual Environments Balazs Gerofi, Hajime Fujita, Yutaka Ishikawa Yutaka Ishikawa

Outline

• Motivation• Cluster Server Architecture • DVE Software Components• Process Live Migration • Multiple Socket Migration Optimizations• Dynamic Load Balancing• Evaluation• Conclusion

IEEE Cluster2010

Page 7: An Efficient Process Live Migration Mechanism for Load Balanced Distributed Virtual Environments Balazs Gerofi, Hajime Fujita, Yutaka Ishikawa Yutaka Ishikawa

Server Node Software Components

IEEE Cluster2010

• mig_mod: migration module with live migration and socket support (extension of Berkeley C/R module)• cap_trans_mod: packet capturing and address translation kernel module (detailes in paper)• transd: translation daemon• migd: migration daemon• cond: load monitor and load balancer• zone_serv: zone server processes

Linux kernel

mig_mod

cap_trans_mod

zone_serv1 zone_servn

migd

transd

cond …

Page 8: An Efficient Process Live Migration Mechanism for Load Balanced Distributed Virtual Environments Balazs Gerofi, Hajime Fujita, Yutaka Ishikawa Yutaka Ishikawa

Outline

• Motivation• Cluster Server Architecture • DVE Software Components• Process Live Migration • Multiple Socket Migration Optimizations• Dynamic Load Balancing• Evaluation• Conclusion

IEEE Cluster2010

Page 9: An Efficient Process Live Migration Mechanism for Load Balanced Distributed Virtual Environments Balazs Gerofi, Hajime Fujita, Yutaka Ishikawa Yutaka Ishikawa

source host destination host

Process Image

Process Live Migration

network

IEEE Cluster2010

network sockets

Page 10: An Efficient Process Live Migration Mechanism for Load Balanced Distributed Virtual Environments Balazs Gerofi, Hajime Fujita, Yutaka Ishikawa Yutaka Ishikawa

source host destination host

Process Image Process Image

Process Live Migration

network

IEEE Cluster2010

network sockets

Transfer the whole process image in the background without stopping the execution

Page 11: An Efficient Process Live Migration Mechanism for Load Balanced Distributed Virtual Environments Balazs Gerofi, Hajime Fujita, Yutaka Ishikawa Yutaka Ishikawa

source host destination host

Process Image Process Image

Process Live Migration- dirty memory page

network

IEEE Cluster2010

network sockets

Track dirty pages for a certain period, process is still being executed

Page 12: An Efficient Process Live Migration Mechanism for Load Balanced Distributed Virtual Environments Balazs Gerofi, Hajime Fujita, Yutaka Ishikawa Yutaka Ishikawa

source host destination host

Process Live Migration- dirty memory page

network

IEEE Cluster2010

network sockets

Stop process (freeze phase), transfer dirty memory, export network connections and transfer data to destination

Process Image

Page 13: An Efficient Process Live Migration Mechanism for Load Balanced Distributed Virtual Environments Balazs Gerofi, Hajime Fujita, Yutaka Ishikawa Yutaka Ishikawa

source host destination host

Process Live Migration

network

IEEE Cluster2010

network sockets

Apply changes and resume execution

Process Image

Note: main goal is short process freeze time!

Page 14: An Efficient Process Live Migration Mechanism for Load Balanced Distributed Virtual Environments Balazs Gerofi, Hajime Fujita, Yutaka Ishikawa Yutaka Ishikawa

Outline

• Motivation• Cluster Server Architecture • DVE Software Components• Process Live Migration • Multiple Socket Migration Optimizations• Dynamic Load Balancing• Evaluation• Conclusion

IEEE Cluster2010

Page 15: An Efficient Process Live Migration Mechanism for Load Balanced Distributed Virtual Environments Balazs Gerofi, Hajime Fujita, Yutaka Ishikawa Yutaka Ishikawa

source host destination host

Process Image Process Image

Iterative socket migration (during process freeze phase)

- dirty memory page

network

IEEE Cluster2010

network sockets

Incoming packet loss prevention!

Page 16: An Efficient Process Live Migration Mechanism for Load Balanced Distributed Virtual Environments Balazs Gerofi, Hajime Fujita, Yutaka Ishikawa Yutaka Ishikawa

source host destination host

Process Image Process Image

Iterative socket migration (during process freeze phase)

- dirty memory page

network

IEEE Cluster2010

network sockets

Extract remote IP and port number, set up a filter at the destination node to capture incoming packets and disable socket

Page 17: An Efficient Process Live Migration Mechanism for Load Balanced Distributed Virtual Environments Balazs Gerofi, Hajime Fujita, Yutaka Ishikawa Yutaka Ishikawa

source host destination host

Process Image Process Image

Iterative socket migration (during process freeze phase)

- dirty memory page

network

IEEE Cluster2010

network sockets

Migrate socket data to destination node

Page 18: An Efficient Process Live Migration Mechanism for Load Balanced Distributed Virtual Environments Balazs Gerofi, Hajime Fujita, Yutaka Ishikawa Yutaka Ishikawa

source host destination host

Process Image Process Image

Iterative socket migration (during process freeze phase)

- dirty memory page

network

IEEE Cluster2010

network sockets

Inject any packets that were captured on the destination node and attach socket to the process

Page 19: An Efficient Process Live Migration Mechanism for Load Balanced Distributed Virtual Environments Balazs Gerofi, Hajime Fujita, Yutaka Ishikawa Yutaka Ishikawa

source host destination host

Process Image Process Image

Iterative socket migration (during process freeze phase)

- dirty memory page

network

IEEE Cluster2010

network sockets

Page 20: An Efficient Process Live Migration Mechanism for Load Balanced Distributed Virtual Environments Balazs Gerofi, Hajime Fujita, Yutaka Ishikawa Yutaka Ishikawa

source host destination host

Process Image Process Image

Iterative socket migration (during process freeze phase)

- dirty memory page

network

IEEE Cluster2010

network sockets

Page 21: An Efficient Process Live Migration Mechanism for Load Balanced Distributed Virtual Environments Balazs Gerofi, Hajime Fujita, Yutaka Ishikawa Yutaka Ishikawa

source host destination host

Process Image Process Image

Iterative socket migration (during process freeze phase)

- dirty memory page

network

IEEE Cluster2010

network sockets

Note: requires several synchronization steps with short writes following each other!

Page 22: An Efficient Process Live Migration Mechanism for Load Balanced Distributed Virtual Environments Balazs Gerofi, Hajime Fujita, Yutaka Ishikawa Yutaka Ishikawa

source host destination host

Process Image Process Image

Collective socket migration (during process freeze phase)

- dirty memory page

network

IEEE Cluster2010

network sockets

Page 23: An Efficient Process Live Migration Mechanism for Load Balanced Distributed Virtual Environments Balazs Gerofi, Hajime Fujita, Yutaka Ishikawa Yutaka Ishikawa

source host destination host

Process Image Process Image

Collective socket migration (during process freeze phase)

- dirty memory page

network

IEEE Cluster2010

network sockets

Extract remote IP and port number for all sockets, set up filters to capture incoming packets and disable sockets

Page 24: An Efficient Process Live Migration Mechanism for Load Balanced Distributed Virtual Environments Balazs Gerofi, Hajime Fujita, Yutaka Ishikawa Yutaka Ishikawa

source host destination host

Process Image Process Image

Collective socket migration (during process freeze phase)

- dirty memory page

network

IEEE Cluster2010

network sockets

Extract socket data into one unified buffer and transfer everything in one go

Page 25: An Efficient Process Live Migration Mechanism for Load Balanced Distributed Virtual Environments Balazs Gerofi, Hajime Fujita, Yutaka Ishikawa Yutaka Ishikawa

source host destination host

Process Image Process Image

Collective socket migration (during process freeze phase)

- dirty memory page

network

IEEE Cluster2010

network sockets

Attach sockets, inject packets.

Note: the amount of socket data transferred canbe still large!

Page 26: An Efficient Process Live Migration Mechanism for Load Balanced Distributed Virtual Environments Balazs Gerofi, Hajime Fujita, Yutaka Ishikawa Yutaka Ishikawa

source host destination host

Process Image Process Image

Incremental collective socket migration (during dirty-log phase)

- dirty memory page

network

IEEE Cluster2010

network sockets

Page 27: An Efficient Process Live Migration Mechanism for Load Balanced Distributed Virtual Environments Balazs Gerofi, Hajime Fujita, Yutaka Ishikawa Yutaka Ishikawa

source host destination host

Process Image Process Image

Incremental collective socket migration (during dirty-log phase)

- dirty memory page

network

IEEE Cluster2010

network sockets

All socket data are transferred asynchronously and tracking structures are allocated for each connection

network sockets

Page 28: An Efficient Process Live Migration Mechanism for Load Balanced Distributed Virtual Environments Balazs Gerofi, Hajime Fujita, Yutaka Ishikawa Yutaka Ishikawa

source host destination host

Process Image Process Image

Incremental collective socket migration (during dirty-log phase)

- dirty memory page

network

IEEE Cluster2010

network sockets

Some pages are dirtied and some sockets’ state change are detected

network sockets

Page 29: An Efficient Process Live Migration Mechanism for Load Balanced Distributed Virtual Environments Balazs Gerofi, Hajime Fujita, Yutaka Ishikawa Yutaka Ishikawa

source host destination host

Process Image Process Image

Incremental collective socket migration (during dirty-log phase)

- dirty memory page

network

IEEE Cluster2010

network sockets

Dirty pages transferred and modified sockets’ state are updated, tracking loop timeout is decreased

network sockets

Page 30: An Efficient Process Live Migration Mechanism for Load Balanced Distributed Virtual Environments Balazs Gerofi, Hajime Fujita, Yutaka Ishikawa Yutaka Ishikawa

source host destination host

Process Image Process Image

Incremental collective socket migration (during dirty-log phase)

- dirty memory page

network

IEEE Cluster2010

network sockets

When number of dirty pages or tracking timeout goes below a pre-defined limit, enter process freeze phase

network sockets

Page 31: An Efficient Process Live Migration Mechanism for Load Balanced Distributed Virtual Environments Balazs Gerofi, Hajime Fujita, Yutaka Ishikawa Yutaka Ishikawa

source host destination host

Process Image Process Image

Incremental collective socket migration (during dirty-log phase)

- dirty memory page

network

IEEE Cluster2010

network sockets

Transfer dirty pages and set up packet capture filter

network sockets

Page 32: An Efficient Process Live Migration Mechanism for Load Balanced Distributed Virtual Environments Balazs Gerofi, Hajime Fujita, Yutaka Ishikawa Yutaka Ishikawa

source host destination host

Process Image Process Image

Incremental collective socket migration (during dirty-log phase)

- dirty memory page

network

IEEE Cluster2010

network sockets

Update sockets that have changed in the last iteration and disable sockets on the source machine

network sockets

Note: transferred socket data in freeze phase is much less than the overall socket representation!

Page 33: An Efficient Process Live Migration Mechanism for Load Balanced Distributed Virtual Environments Balazs Gerofi, Hajime Fujita, Yutaka Ishikawa Yutaka Ishikawa

source host destination host

Process Image Process Image

Incremental collective socket migration (during dirty-log phase)

- dirty memory page

network

IEEE Cluster2010

Inject packets and re-enable sockets on the destination machine

network sockets

Page 34: An Efficient Process Live Migration Mechanism for Load Balanced Distributed Virtual Environments Balazs Gerofi, Hajime Fujita, Yutaka Ishikawa Yutaka Ishikawa

Outline

• Motivation• Cluster Server Architecture • DVE Software Components• Process Live Migration • Multiple Socket Migration Optimizations• Dynamic Load Balancing• Evaluation• Conclusion

IEEE Cluster2010

Page 35: An Efficient Process Live Migration Mechanism for Load Balanced Distributed Virtual Environments Balazs Gerofi, Hajime Fujita, Yutaka Ishikawa Yutaka Ishikawa

Dynamic Load Balancing• Decentralized middleware• Load balancing is sender initiated performing a hand-shake with

the receiver• Transfer policy:

– Threshold driven (if load exceeds a certain value)• Location policy:

– Based on knowledge of load on the rest of the nodes, preferring a node that is on the opposite side of the cluster load average

• Selection policy:– Prefers a process that consumes as much CPU power as much the

difference between the given node’s load and the cluster load average• Information policy:

– Periodic policy, nodes broadcast their load

IEEE Cluster2010

Page 36: An Efficient Process Live Migration Mechanism for Load Balanced Distributed Virtual Environments Balazs Gerofi, Hajime Fujita, Yutaka Ishikawa Yutaka Ishikawa

Outline

• Motivation• Cluster Server Architecture • DVE Software Components• Process Live Migration • Multiple Socket Migration Optimizations• Dynamic Load Balancing• Evaluation• Conclusion

IEEE Cluster2010

Page 37: An Efficient Process Live Migration Mechanism for Load Balanced Distributed Virtual Environments Balazs Gerofi, Hajime Fujita, Yutaka Ishikawa Yutaka Ishikawa

Evaluation: experimental framework

• Dedicated single IP address cluster• 5 DVE server nodes + a MySQL server• 2.4GHz Dual-Core AMD Opteron• 2 GB RAM• Gigabit Ethernet for both in-cluster and public

network

IEEE Cluster2010

Page 38: An Efficient Process Live Migration Mechanism for Load Balanced Distributed Virtual Environments Balazs Gerofi, Hajime Fujita, Yutaka Ishikawa Yutaka Ishikawa

Evaluation: OpenArena server• OpenArena is an open-source multi-player online game

based on the Quake III engine [1]• Uses UDP for client-server communication• ~20 messages (updates) per second• Live migrated when 24 clients were participating in a

session

IEEE Cluster2010

[1] http://openarena.ws/smfnews.php

• Based on tcpdump’s result on the client machines ~25ms service downtime due to migration

Page 39: An Efficient Process Live Migration Mechanism for Load Balanced Distributed Virtual Environments Balazs Gerofi, Hajime Fujita, Yutaka Ishikawa Yutaka Ishikawa

Evaluation: DVE simulation• DVE simulation with communication characteristics resembling

real-world MMOPGs using TCP connections• Client state update: 20 msgs / sec, 256~512 bytes message size [2]• DVE server processes maintain MySQL to local DB server• CPU consumption grows proportionally with number of clients in a

given zone, 10,000 clients involved• Virtual space consists of 10x10 zones, each DVE server node is

assigned to 20 zones initially

IEEE Cluster2010

[2] Traffic characteristics of a massively multi-player online role playing game, NetGames’05

• 15 minutes simulation during which clients are instructed to move to the up-left and bottom-right corner of the virtual space

• Files are assumed to be available on each node

Page 40: An Efficient Process Live Migration Mechanism for Load Balanced Distributed Virtual Environments Balazs Gerofi, Hajime Fujita, Yutaka Ishikawa Yutaka Ishikawa

Live migration process downtime

IEEE Cluster2010

16 32 64 128 256 512 10240

20406080

100120140160180200

Iterative Collective Incremental collective

Number of TCP connections

Proc

ess

dow

ntim

e (m

s)

Page 41: An Efficient Process Live Migration Mechanism for Load Balanced Distributed Virtual Environments Balazs Gerofi, Hajime Fujita, Yutaka Ishikawa Yutaka Ishikawa

Socket data transferred during process freeze phase

IEEE Cluster2010

16 32 64 128 256 512 10240

500

1000

1500

2000

2500

3000

3500

4000

Iterative / Collective Incremental collective

Number of TCP connections

Sock

et d

ata

tran

sfer

red

(byt

es)

Page 42: An Efficient Process Live Migration Mechanism for Load Balanced Distributed Virtual Environments Balazs Gerofi, Hajime Fujita, Yutaka Ishikawa Yutaka Ishikawa

Load distribution during simulation without load balancing

IEEE Cluster2010

• node1, node2 and node5 becomes overloaded when clients move to zones maintained by these nodes

Page 43: An Efficient Process Live Migration Mechanism for Load Balanced Distributed Virtual Environments Balazs Gerofi, Hajime Fujita, Yutaka Ishikawa Yutaka Ishikawa

Load distribution during simulation with load balancing

IEEE Cluster2010

• Load stays balanced throughout the simulation

Page 44: An Efficient Process Live Migration Mechanism for Load Balanced Distributed Virtual Environments Balazs Gerofi, Hajime Fujita, Yutaka Ishikawa Yutaka Ishikawa

Number of zone server processes on each node during the simulation

IEEE Cluster2010

• Lighter processes are migrated over to node3 and node4 in order to balance the overall load of the system

Page 45: An Efficient Process Live Migration Mechanism for Load Balanced Distributed Virtual Environments Balazs Gerofi, Hajime Fujita, Yutaka Ishikawa Yutaka Ishikawa

Outline

• Motivation• Cluster Server Architecture • DVE Software Components• Process Live Migration • Multiple Socket Migration Optimizations• Dynamic Load Balancing• Evaluation• Conclusion

IEEE Cluster2010

Page 46: An Efficient Process Live Migration Mechanism for Load Balanced Distributed Virtual Environments Balazs Gerofi, Hajime Fujita, Yutaka Ishikawa Yutaka Ishikawa

Conclusion• Process live migration– Optimizations for migrating a massive amount network

connections– No modifications to the TCP protocol or to the client side

network stack• Dynamic load balancing engine exploiting process live

migration• DVE simulation for demonstrating load balancer and live

migration• Other possible scenarios:– Fault tolerance (IEEE NCA2010)– Power management

IEEE Cluster2010

Page 47: An Efficient Process Live Migration Mechanism for Load Balanced Distributed Virtual Environments Balazs Gerofi, Hajime Fujita, Yutaka Ishikawa Yutaka Ishikawa

Thank you for your attention!Questions?

IEEE Cluster2010

Page 48: An Efficient Process Live Migration Mechanism for Load Balanced Distributed Virtual Environments Balazs Gerofi, Hajime Fujita, Yutaka Ishikawa Yutaka Ishikawa

Related Work• Connection Migration:

– NEC’s distributed Web Server arch: each session has its own virtual IP address

– SockMi, Tcpcp: TCP migration with IP layer forwarding, don’t decouple the process from the source machine

– TCP Migrate option: extension to the TCP protocol• Process migration and incremental checkpointing:

– V-System, Amoeba, Mach, Sprite, MOSIX – limited connection migration support

– BLCR: no support for connection and incremental checkp.– Zap’s VNAT: support required on client side as well

• Load balancing DVEs:– Several studies addressing application level solutions– MOSIX: home-node approach leaves residual dependencies

IEEE Cluster2010