• No results found

Virtual Machine Synchronization for High Availability Clusters

N/A
N/A
Protected

Academic year: 2021

Share "Virtual Machine Synchronization for High Availability Clusters"

Copied!
17
0
0

Loading.... (view fulltext now)

Full text

(1)

2007/4/17

Virtual Machine Synchronization

for High Availability Clusters

Yoshiaki Tamura, Koji Sato,

Seiji Kihara, Satoshi Moriai

(2)

Consolidating servers using VM

„

Internet services are growing

„

Costs for running servers aren’t small

„

Consolidating servers using VM is popular

„

However…

High availability is needed !

More services may fail in a

(3)

Our goal

A new high availability clustering

independent of applications or OS

Keep running

transparently

High Availability Clustering

(4)

What needs to be done?

„

Virtual Machine Synchronization

Primary node and Secondary node must be identical

„

Detection of failure

„

Failover mechanism

Extension of current techniques

(5)

How to synchronize VMs?

„

Need to make the

overhead of sync smaller

Make sync time shorter

Sync VMs less often

Primary

VM

Secondary

VM

2. Resume Primary

after sync

1.

Pause Primary,

and sync with

secondary

t

sync

t

interval

„

Sync VMs before sending or receiving Events

Events: Storage, network, timer, console

Only transfer updated data

(6)

„

Types of events in a server environment

Timer, network, storage are majority

Network and File I/O performance may degrade

„

Comparison of performance between no-sync and sync on

every event (Netperf,IOzone)

Network 76% down

File I/O: O_sync write 90% down,Bufferd write + fsync 69%

down

Sync VMs on every event

16.54

53.95

Buffered + fsync

0.58

22.81

Sync on event

5.67

93.39

No-sync

O_SYNC

File I/O [MB/s]

Network

[Mbps]

„

Sync protocol needs to be improved

(7)

Types of events to sync

Network

Timer

Storage

Console

(8)

Sync on events from VM to storage

Primary VM

Primary VMM

Storage

Secondary VMM

Secondary VM

V

i

V

i

V

i-1

S

j

S

j+1

5. Resume Read / Write

3. Update

Secondary

6. Reply

V

i+1

Resume point:

Just before

operating storage

4. Sync completed

2. Sync VM and event

V

i

: VM’s state

S

j

: Storage’s state

„

Secondary may redo the same operation as Primary

Secondary will receive the same reply as Primary

(9)

Sync on events from network to VM

1. Start transfer

Primary VM

Primary VMM

Client

Secondary VMM

Secondary VM

V

i

V

i

V

i-1

N

j

N

j+1

5. Resume

transfer

3. Update

Secondary

6. Reply

V

i+1

Resume point:

Just before

receiving the data

4. Sync completed

2. Sync VM and event

V

i

: VM’s state

N

j

: Client’s state

„

Secondary may resend the same data Primary has sent…

(10)

Prototype

Hardware

Xen

Dom0

DomU

Back-end Front-end

Event Channel

SAN

Hardware

Xen

DomU

Dom0

Front-end Back-end Event Channel

Network

Transfer

updates

Sync DomU

Apply

updates

1. Trap target events and

pause Primary DomU

2. Transfer dirtied pages

and VCPU context

of Primary DomU

3. Overwrite Secondary

DomU with updates

(11)

Implementation

„

xen/common/event_channel.c

Hooks at evtchn_send()

Device -> Domain

Calls domain_pause_by_systemcontroller(rd)

Notifies the user land process to start transfer via VIRQ

evtch_set_pending

Domain -> Device

Sets the port number of the user land process’s event channel

Calls domain_pause_for_debugger()

User land process sends event to the device after transfer

„

tools/libxc/xc_linux_save.c

Waits for a signal from the user process

Sends dirtied pages and vcpu context to Secondary

Continuously wait and stop until receiving the signal to finalize

„

tools/libxc/xc_linux_restore.c

Receives dirtied pages and vcpu context, and updates the domain

Continuously receives data and updates the domain

(12)

Evaluation

„

Evaluation items

Performance of the Primary VM (Network and File I/O)

Number of events to sync

Average time to transfer dirtied page

„

Test machines

Hardware spec

• CPU: Intel Xeon 3GHz X 2

• Memory: 4GB

• Network: Gigabit Ethernet

• SAN: FC Disk

VM spec

(13)

0 5 10 15 20 25 30 35

Network

Th rou ghp ut [ M b ps ] 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1

O_SYNC write

Th rou ghp ut [ M B yt e/ s]

Performance of Primary VM

39% Up

57% Up

84% Up

„

Performance improved by applying proposed protocol

Degradation of buffered write + fsync compared to no-sync

Sync on every event

Proposed protocol

0 5 10 15 20 25 30 35

Buffered write + fsync

(14)

Num of events, Average time to transfer

„

Number of events to sync reduced 49% - 96%

„

Average time to transfer dirtied pages multiplied by 2 -18

Optimize transfer function,compress pages ?

Number of events to sync

Average time to transfer dirtied pages

0 0.2 0.4 0.6 0.8 1 1.2

Network O_SYNC write Buffered write + fsync

Nu m b er s o f e ve n ts t o s yn c (r el at iv e to s yn c o n e ve ry e ve n ts) 0 2 4 6 8 10 12 14 16 18 20

Network O_SYNC write Buffered write + fsync

A ver ag e ti m e t o t ra n sf er d ir ti ed p a g es (r el at iv e to s yn c o n e ve ry e ve n ts)

(15)

Related Work

„

Hypervisor-based fault tolerance

T. C. Bressoud et al. ACM TOCS ’96

Protocols to implement a fault tolerant system

using VMM

„

SecondSite

B. Cully et al. HotDep ’06

Continuously checkpoints a domain to a

persistent storage

„

ExtraVirt

D. Lucchetti et al. SOSP ’05

(16)

Conclusion

„

VM synchronization for high availability clusters

Applications and OS can continue without modifications

Proposed protocol makes overhead smaller

„

Implemented the prototype using Xen

„

Showed the effectiveness of the protocol

Performance improved 39% - 84%

(17)

Future work

„

Function for Xen to stop domains

instantly and resume on Secondary

Currently using pause to stop domains

„

Improve the performance of Primary VM

Optimize transfer function

„

Functions to implement for practical use

References

Related documents

[r]

Kathleen Russell, “Proposals regarding a school of Nursing in the University of Toronto October, 1928,” Series 427C, Record Group 1.1 Projects, Box 12, Folder 92,

If  an  Appraisee  has  management  responsibilities  then  during  the  review  period  and  prior  to  the  Appraisal,  the  Appraiser  and 

every student is the key to being and effective teacher, but I saw this first hand at YouthBuild because it was like they really didn’t trust us or what we had to say until we

1 Workforce Central v6 -New Product Offering Workforce Integration Manager 8800131-000 2 Workforce Central v6 -New Product Offering Workforce Absence Manager V6 8800129-000 3

Following prior research that suggests stocks with common overlap in IO exhibit excess comovement (e.g. Anton and Polk 2014), we further test the trading mechanism through which IO

(2013) A systematic review of studies examining the relationship between reported racism and health and wellbeing for children and young people. The Impact

Consistent with this transcriptional response, analysis of the sterol content of tomatidine-treated cells showed not only inhibition of Erg6 (C-24 sterol methyltransferase) activity