vesper - sysadmin.miniconf.org€¦ · copyright (c) 2009 hitachi ltd., systems development lab....

28
Copyright (c) 2009 Hitachi LTD., Systems Development Lab. All right reserved VESPER (Virtual Embraced Space ProbER) Sungho Kim <[email protected]> Satoru Moriya <[email protected]> Satoshi Oshima <[email protected]> Hitachi, Ltd., Systems Development Laboratory Linux Technology Center

Upload: others

Post on 27-Jun-2020

0 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: VESPER - sysadmin.miniconf.org€¦ · Copyright (c) 2009 Hitachi LTD., Systems Development Lab. All right 7 reserved Cluster Model in Heartbeat Host Guest1 Guest2 Heartbeat Heartbeat

Copyright (c) 2009 Hitachi LTD., Systems Development Lab. All right reserved

VESPER(Virtual Embraced Space ProbER)

Sungho Kim <[email protected]>Satoru Moriya <[email protected]>Satoshi Oshima <[email protected]>

Hitachi, Ltd., Systems Development LaboratoryLinux Technology Center

Page 2: VESPER - sysadmin.miniconf.org€¦ · Copyright (c) 2009 Hitachi LTD., Systems Development Lab. All right 7 reserved Cluster Model in Heartbeat Host Guest1 Guest2 Heartbeat Heartbeat

2Copyright (c) 2009 Hitachi LTD., Systems Development Lab. All right

reserved

Agenda

1. Background2. Concept & Structure3. Demo4. Evaluation5. Conclusion

Page 3: VESPER - sysadmin.miniconf.org€¦ · Copyright (c) 2009 Hitachi LTD., Systems Development Lab. All right 7 reserved Cluster Model in Heartbeat Host Guest1 Guest2 Heartbeat Heartbeat

3Copyright (c) 2009 Hitachi LTD., Systems Development Lab. All right

reserved

1.Background

Page 4: VESPER - sysadmin.miniconf.org€¦ · Copyright (c) 2009 Hitachi LTD., Systems Development Lab. All right 7 reserved Cluster Model in Heartbeat Host Guest1 Guest2 Heartbeat Heartbeat

4Copyright (c) 2009 Hitachi LTD., Systems Development Lab. All right reserved

Trends on Server Systems

Server systems are required for

• High availability & serviceability– Mission-critical enterprise server– Cloud computing Solution: HA cluster

• Better resource utilization– Hardware(CPU, memory) performance higher– Investment cost lower Solution: Virtualization

Clustering Virtual Machines

Page 5: VESPER - sysadmin.miniconf.org€¦ · Copyright (c) 2009 Hitachi LTD., Systems Development Lab. All right 7 reserved Cluster Model in Heartbeat Host Guest1 Guest2 Heartbeat Heartbeat

5Copyright (c) 2009 Hitachi LTD., Systems Development Lab. All right reserved

Clustering VMs

We consider clustering VMs from 2 viewpoints

• Cluster model– How to set up cluster with VMs

• Monitoring Vms– How to health-check VMs– Likely to be dependent to the model

Solution: Linux-HA (Heartbeat)– Well-known cluster manager– Manage VMs

Page 6: VESPER - sysadmin.miniconf.org€¦ · Copyright (c) 2009 Hitachi LTD., Systems Development Lab. All right 7 reserved Cluster Model in Heartbeat Host Guest1 Guest2 Heartbeat Heartbeat

6Copyright (c) 2009 Hitachi LTD., Systems Development Lab. All right reserved

Brief Introduction to Heartbeat

• What is Heartbeat ?– A cluster management tool– Fail-over, load-balancing support

• What is the main feature in model?– Cluster resource manager which deploys

resources onto proper cluster node if needed

• What is the cluster resource ?– Every components needed to provide services to

users – IP address, any server process like Web, DNS,

and other servers, etc.

(*) http://www.linux-ha.org/

Page 7: VESPER - sysadmin.miniconf.org€¦ · Copyright (c) 2009 Hitachi LTD., Systems Development Lab. All right 7 reserved Cluster Model in Heartbeat Host Guest1 Guest2 Heartbeat Heartbeat

7Copyright (c) 2009 Hitachi LTD., Systems Development Lab. All right reserved

Cluster Model in Heartbeat

Host Guest1 Guest2

Heartbeat Heartbeat

httpd

VMM

Host Guest1 Guest2

Heartbeat

httpd

VMM

Conventional Cluster New Concept

•Cluster managers run on guests & monitor httpd as a resource•It is difficult to identify which guest running on which physical machine from the manager

•Cluster manager runs on host & monitors guests as a resource •It is clear that which guests running on which machine from the manager

resourceResource

In Heartbeat, VMs are treated as resources because of simple manageability

Resource

Page 8: VESPER - sysadmin.miniconf.org€¦ · Copyright (c) 2009 Hitachi LTD., Systems Development Lab. All right 7 reserved Cluster Model in Heartbeat Host Guest1 Guest2 Heartbeat Heartbeat

8Copyright (c) 2009 Hitachi LTD., Systems Development Lab. All right reserved

Monitoring in Heartbeat

• Polling– Send health-check msg periodically

• Failure detection depends on polling cycle

VMM

Host Guest

Heartbeat

Periodical check; Are you OK?

Failure

Heartbeat monitors VMs with the conventional way

Page 9: VESPER - sysadmin.miniconf.org€¦ · Copyright (c) 2009 Hitachi LTD., Systems Development Lab. All right 7 reserved Cluster Model in Heartbeat Host Guest1 Guest2 Heartbeat Heartbeat

9Copyright (c) 2009 Hitachi LTD., Systems Development Lab. All right reserved

Consideration on the Monitoring VMs

Heartbeat way of monitoring efficient enough ?

--The same shortcomings exist • Response latency

– Periodic polling way of message passing– Deadtime allowance to ensure failure

• No method to find out why fail over– Service-bound failure? – System-wide(memory pressure ,etc.) failure?

Other health-check source to improve on the latency and failure analysis?

Page 10: VESPER - sysadmin.miniconf.org€¦ · Copyright (c) 2009 Hitachi LTD., Systems Development Lab. All right 7 reserved Cluster Model in Heartbeat Host Guest1 Guest2 Heartbeat Heartbeat

10Copyright (c) 2009 Hitachi LTD., Systems Development Lab. All right reserved

Probing Virtual Machines

Probing VMs can provide

• Response latency improvement– Event(trigger of fail-over) driven way– Immediate detection on failure

• Failure analysis facility – Memory pressure ? – Network congestion ?– etc.

VMM

Host Guest

ClusterManager Failure

Immediate report

Page 11: VESPER - sysadmin.miniconf.org€¦ · Copyright (c) 2009 Hitachi LTD., Systems Development Lab. All right 7 reserved Cluster Model in Heartbeat Host Guest1 Guest2 Heartbeat Heartbeat

11Copyright (c) 2009 Hitachi LTD., Systems Development Lab. All right reserved

VESPER

What features of probing technology needed for probing VMs in HA ?

• Probe anywhere we want• Insert probe dynamically• Insert/delete probe from host• Access probed data from host

VESPER (Virtual Embraced Space ProbER);The framework to handle Kprobes on the virtual environment

Kprobes

Page 12: VESPER - sysadmin.miniconf.org€¦ · Copyright (c) 2009 Hitachi LTD., Systems Development Lab. All right 7 reserved Cluster Model in Heartbeat Host Guest1 Guest2 Heartbeat Heartbeat

12Copyright (c) 2009 Hitachi LTD., Systems Development Lab. All right

reserved

Concept & Structure2.

Page 13: VESPER - sysadmin.miniconf.org€¦ · Copyright (c) 2009 Hitachi LTD., Systems Development Lab. All right 7 reserved Cluster Model in Heartbeat Host Guest1 Guest2 Heartbeat Heartbeat

13Copyright (c) 2009 Hitachi LTD., Systems Development Lab. All right reserved

Concept of VESPER

Host Guest

Probing Module

ClusterManager

VMM

VESPER

• Controllability of probing modules– Load probing modules from host to guest

• Accessibility to the probed data – Transfer probed data from guest to host via Virtual FS (relayfs-like)

VESPER is a framework to probe VMs

Load

Transfer

Page 14: VESPER - sysadmin.miniconf.org€¦ · Copyright (c) 2009 Hitachi LTD., Systems Development Lab. All right 7 reserved Cluster Model in Heartbeat Host Guest1 Guest2 Heartbeat Heartbeat

14Copyright (c) 2009 Hitachi LTD., Systems Development Lab. All right reserved

Design Decision

• Split driver model – Comm way of implementing drivers in

virtualization technology – Backend/frontend driver

• Don't use guest user space when loading modules– Insert probes even though user space is

corrupt

• SystemTap– Easy to build probing modules

*) http://sourceware.org/systemtap

Page 15: VESPER - sysadmin.miniconf.org€¦ · Copyright (c) 2009 Hitachi LTD., Systems Development Lab. All right 7 reserved Cluster Model in Heartbeat Host Guest1 Guest2 Heartbeat Heartbeat

15Copyright (c) 2009 Hitachi LTD., Systems Development Lab. All right reserved

Basic Structure

User Space

Host Guest

VESPER-UI

ClusterManager

UserSpace

Probing Module

Probe Loader

Probe Listener

Kernel Space

VMM

Load Probing Module

Share RecordedData

Probe Listener

Probe Loader

SystemTap

Backend Frontend

Page 16: VESPER - sysadmin.miniconf.org€¦ · Copyright (c) 2009 Hitachi LTD., Systems Development Lab. All right 7 reserved Cluster Model in Heartbeat Host Guest1 Guest2 Heartbeat Heartbeat

16Copyright (c) 2009 Hitachi LTD., Systems Development Lab. All right

reserved

3.Demo

Page 17: VESPER - sysadmin.miniconf.org€¦ · Copyright (c) 2009 Hitachi LTD., Systems Development Lab. All right 7 reserved Cluster Model in Heartbeat Host Guest1 Guest2 Heartbeat Heartbeat

17Copyright (c) 2009 Hitachi LTD., Systems Development Lab. All right reserved

Build Probing Module

• SystemTap– Introduce VESPER options

• -D VSP_MODULE -D VSP_EM_MOD

– Demo• Probing “send_signal” for monitoring httpd service

(1) Building Module

> stap -vvv -p4 -k -m probe_httpd -D VSP_MODULE -D \ VSP_EM_MOD httpd.stp

(2)Loading the module to guest

> ./vsp_to guest_id insmod probe_httpd.ko

(3)start/stop httpd service

> /sbin/service httpd start/stop

(4)Check msg on relayfs with /sys/kernel/debug/vesper/...

>cat /sys/kernel/debug/vesper/...

Page 18: VESPER - sysadmin.miniconf.org€¦ · Copyright (c) 2009 Hitachi LTD., Systems Development Lab. All right 7 reserved Cluster Model in Heartbeat Host Guest1 Guest2 Heartbeat Heartbeat

18Copyright (c) 2009 Hitachi LTD., Systems Development Lab. All right

reserved

4.Evaluation

Page 19: VESPER - sysadmin.miniconf.org€¦ · Copyright (c) 2009 Hitachi LTD., Systems Development Lab. All right 7 reserved Cluster Model in Heartbeat Host Guest1 Guest2 Heartbeat Heartbeat

19Copyright (c) 2009 Hitachi LTD., Systems Development Lab. All right reserved

Testbed – Web Service

Cluster system to evaluate

Guest1Host

Xen

Kernel Space

User Space

Heartbeat

vesper

Active(PhysicalServer #1)

Guest2

service service

Not Used

Standby(Physicalserver #2)

CPU:CoreDuoxen-3.1.0-0.rc7.1.fc7linux-2.6.21-fc7xen

probe

Xen

Guest1

service

Guest2

service

Host

Kernel Space

User Space

Heartbeat

vesper

Page 20: VESPER - sysadmin.miniconf.org€¦ · Copyright (c) 2009 Hitachi LTD., Systems Development Lab. All right 7 reserved Cluster Model in Heartbeat Host Guest1 Guest2 Heartbeat Heartbeat

20Copyright (c) 2009 Hitachi LTD., Systems Development Lab. All right reserved

Use Case I

Something wrong happened in Httpd, then SIGTERM

• Guest1: Heartbeat monitors service with 10sec period

• Guest2: VEPSER probes "send_signal" – Monitor signal sending– Record signal number– Record sender process

Page 21: VESPER - sysadmin.miniconf.org€¦ · Copyright (c) 2009 Hitachi LTD., Systems Development Lab. All right 7 reserved Cluster Model in Heartbeat Host Guest1 Guest2 Heartbeat Heartbeat

21Copyright (c) 2009 Hitachi LTD., Systems Development Lab. All right reserved

Fail-over Latency Improvement I

Time delay of failure notification

Heartbeat VESPER0

1000

2000

3000

4000

5000

6000

time

[mse

c]

Reduce 50%

Average on 100tries

• Response latency improved 50 %

• VESPER can find out who sent signal and which signal sent

Page 22: VESPER - sysadmin.miniconf.org€¦ · Copyright (c) 2009 Hitachi LTD., Systems Development Lab. All right 7 reserved Cluster Model in Heartbeat Host Guest1 Guest2 Heartbeat Heartbeat

22Copyright (c) 2009 Hitachi LTD., Systems Development Lab. All right reserved

Use Case II

Guests used up the memory

• Guest1: Heartbeat monitors service with 10sec period

• Guest2: VEPSER probes "out_of_mem" – Monitor calling OOM-killer

Page 23: VESPER - sysadmin.miniconf.org€¦ · Copyright (c) 2009 Hitachi LTD., Systems Development Lab. All right 7 reserved Cluster Model in Heartbeat Host Guest1 Guest2 Heartbeat Heartbeat

23Copyright (c) 2009 Hitachi LTD., Systems Development Lab. All right reserved

Fail-over Latency Improvement II

Time delay of failure notification

Heartbeat VESPER0

1000

2000

3000

4000

5000

6000

tim

e[m

sec]

Heartbeat could not find "out_of_memory"

occurrence

In different situations, Heartbeat might find out failure of service. However, VESPER can surely show the better performance in any case.

Page 24: VESPER - sysadmin.miniconf.org€¦ · Copyright (c) 2009 Hitachi LTD., Systems Development Lab. All right 7 reserved Cluster Model in Heartbeat Host Guest1 Guest2 Heartbeat Heartbeat

24Copyright (c) 2009 Hitachi LTD., Systems Development Lab. All right

reserved

Conclusion5.

Page 25: VESPER - sysadmin.miniconf.org€¦ · Copyright (c) 2009 Hitachi LTD., Systems Development Lab. All right 7 reserved Cluster Model in Heartbeat Host Guest1 Guest2 Heartbeat Heartbeat

25Copyright (c) 2009 Hitachi LTD., Systems Development Lab. All right reserved

Conclusion

• VESPER is the framework to gather guest information effectively in virtualized env.– Use probing modules (SystemTap) to gather

guest information– Load probing modules from host to guest– Share the record buffer between host and guest– Provide evaluation criteria to cluster manager– Improve fail over latency– Improve failure analysis

Page 26: VESPER - sysadmin.miniconf.org€¦ · Copyright (c) 2009 Hitachi LTD., Systems Development Lab. All right 7 reserved Cluster Model in Heartbeat Host Guest1 Guest2 Heartbeat Heartbeat

26Copyright (c) 2009 Hitachi LTD., Systems Development Lab. All right reserved

Legal Statement

• Linux is a registered trademark of Linus Torvalds• Other company, product, and service names may be trademarks or service marks of others

Page 27: VESPER - sysadmin.miniconf.org€¦ · Copyright (c) 2009 Hitachi LTD., Systems Development Lab. All right 7 reserved Cluster Model in Heartbeat Host Guest1 Guest2 Heartbeat Heartbeat

27Copyright (c) 2009 Hitachi LTD., Systems Development Lab. All right reserved

Questions?

Page 28: VESPER - sysadmin.miniconf.org€¦ · Copyright (c) 2009 Hitachi LTD., Systems Development Lab. All right 7 reserved Cluster Model in Heartbeat Host Guest1 Guest2 Heartbeat Heartbeat

Copyright (c) 2009 Hitachi LTD., Systems Development Lab. All right reserved

Thank you!

For more information:

http://vesper.sourceforge.net/