93

Department of Computer Science and Technology: The ......Simultaneous SPEC WEB99 Instances on Linux (L) and Xen(X) OLS2006 19 Scalability • Scaling many domains – One domain per

  • Upload
    others

  • View
    3

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Department of Computer Science and Technology: The ......Simultaneous SPEC WEB99 Instances on Linux (L) and Xen(X) OLS2006 19 Scalability • Scaling many domains – One domain per

������������ �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������� ������������ ������������ ������������ ������������

�����������������������������

������������

Page 2: Department of Computer Science and Technology: The ......Simultaneous SPEC WEB99 Instances on Linux (L) and Xen(X) OLS2006 19 Scalability • Scaling many domains – One domain per

�������

��������������� �� ���

����������������

������������������� �

��������������������

������������

����

��������

Page 3: Department of Computer Science and Technology: The ......Simultaneous SPEC WEB99 Instances on Linux (L) and Xen(X) OLS2006 19 Scalability • Scaling many domains – One domain per

����������� �������

��������������� �����!"����� ���"�!��

�#������������������������������������

�$���������������������

� %���� ����������� �������"��������&'"��(�)

��������������������������������

�$���������������*� ��������� +,-

�&���. ����������� ���

��������������������������������������������

��������/+,-���� ��*�������������+,-

Page 4: Department of Computer Science and Technology: The ......Simultaneous SPEC WEB99 Instances on Linux (L) and Xen(X) OLS2006 19 Scalability • Scaling many domains – One domain per

����������� ��������

Consolidate under-utilized servers

Avoid downtime with VM Relocation

Dynamically re-balance workloadto guarantee application SLAs

�Enforce security policy�

Page 5: Department of Computer Science and Technology: The ......Simultaneous SPEC WEB99 Instances on Linux (L) and Xen(X) OLS2006 19 Scalability • Scaling many domains – One domain per

����������� �������������

�����������������������0����

�%���������/�����0�1���/�1 �����%�������

� �&2�������3�4�2������������

� �����"����.���������+������������

� ��������.�� ����������������

�&������������������������������

� ����������0���������������

����������������

Page 6: Department of Computer Science and Technology: The ......Simultaneous SPEC WEB99 Instances on Linux (L) and Xen(X) OLS2006 19 Scalability • Scaling many domains – One domain per

����������� ��������

����������������������������������

� )���������������������������������������������������

��� ��������������������������������

� 5��������� ������� ��������������2

� 6����������*���������������*/� ���������*

� %����������������������������*��

�(������7�����������������8

� ������������������������������������

� (��*����������������������

Page 7: Department of Computer Science and Technology: The ......Simultaneous SPEC WEB99 Instances on Linux (L) and Xen(X) OLS2006 19 Scalability • Scaling many domains – One domain per

��� ��� ����������

�+,-"�+,-9-:"���-:�����������&�����������

�4���������������

�������������������� ����

���&�����������

�$�����'&)�"�����*������ ����

�#������� �/������������ ���������

��;/����������� �<$��7

� ������������������0�����

� ������������������ ������ �����������

Page 8: Department of Computer Science and Technology: The ......Simultaneous SPEC WEB99 Instances on Linux (L) and Xen(X) OLS2006 19 Scalability • Scaling many domains – One domain per

��� ��� ����������

Event Channel Virtual MMUVirtual CPU Control IF

Hardware (SMP, MMU, physical memory, Ethernet, SCSI/IDE)

NativeDeviceDrivers

GuestOS(XenLinux)

Device Manager & Control s/w

VM0

GuestOS(XenLinux)

UnmodifiedUser

Software

VM1

Front-EndDevice Drivers

GuestOS(XenLinux)

UnmodifiedUser

Software

VM2

Front-EndDevice Drivers

UnmodifiedGuestOS(WinXP))

UnmodifiedUser

Software

VM3

Safe HW IF

Xen Virtual Machine Monitor

Back-End

VT-x

x86_32x86_64

IA64

AGPACPIPCI

SMP

Front-EndDevice Drivers

Page 9: Department of Computer Science and Technology: The ......Simultaneous SPEC WEB99 Instances on Linux (L) and Xen(X) OLS2006 19 Scalability • Scaling many domains – One domain per

������������� �� ���

�����+��������+,-�������4�0��+,-"��������� 0��������� ���������

�� ��������*���������

�������������������� ��������������������

������������������ ��*���������������.������

�����*�0���������������� ������������ =�5���.���0������ �=� �������������������> ������������*�����������������

�(+������������������ ���������*> (����������������������������� ���

Page 10: Department of Computer Science and Technology: The ......Simultaneous SPEC WEB99 Instances on Linux (L) and Xen(X) OLS2006 19 Scalability • Scaling many domains – One domain per

��� � ��� �� ��

�4��+�?=-=@-/@A/@,����.��/.���

�?=-=B�?=-=C=(4�?=:=?@=(4

�� ���������������� �%':"�%'B"�%'-"����(4��+@D"��4(�@D"�)����"�#��"E

�2��6��F"�%���6���A=D"����������@D"�&��C"����+"�E

�4��+������������������������������������G�����������

Page 11: Department of Computer Science and Technology: The ......Simultaneous SPEC WEB99 Instances on Linux (L) and Xen(X) OLS2006 19 Scalability • Scaling many domains – One domain per

��� !�� ����������

Event Channel Virtual MMUVirtual CPU Control IF

Hardware (SMP, MMU, physical memory, Ethernet, SCSI/IDE)

NativeDeviceDrivers

GuestOS(XenLinux)

Device Manager & Control s/w

VM0

GuestOS(XenLinux)

UnmodifiedUser

Software

VM1

Front-EndDevice Drivers

GuestOS(XenLinux)

UnmodifiedUser

Software

VM2

Front-EndDevice Drivers

GuestOS(Solaris)

UnmodifiedUser

Software

VM3

Safe HW IF

Xen Virtual Machine Monitor

Back-Ends

Front-EndDevice Drivers

Page 12: Department of Computer Science and Technology: The ......Simultaneous SPEC WEB99 Instances on Linux (L) and Xen(X) OLS2006 19 Scalability • Scaling many domains – One domain per

�"� ����������

����1�.���������������������������������������������������������/� �� ����� ��������&'1����������������� ������������������ H2����1���)��������������������I

��� ��������� ���������������+���������������� ����� ����'������ �������*�����������������*��������� J6��0��K���� �����+������J�����K���� ���� 2�� �����������������"������"���������� 6��0 ��+�����*���0�� ��=�=����:"��D" �F

�H1������/�7������21'�8�����������������1�I

Page 13: Department of Computer Science and Technology: The ......Simultaneous SPEC WEB99 Instances on Linux (L) and Xen(X) OLS2006 19 Scalability • Scaling many domains – One domain per

#$���% ����% ���

L X V U

SPEC INT2000 (score)

L X V U

Linux build time (s)

L X V U

OSDB-OLTP (tup/s)

L X V U

SPEC WEB99 (score)

0.0

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1.0

1.1

Benchmark suite running on Linux (L), Xen (X), VMware Workstation (V), and UML (U)

Page 14: Department of Computer Science and Technology: The ......Simultaneous SPEC WEB99 Instances on Linux (L) and Xen(X) OLS2006 19 Scalability • Scaling many domains – One domain per

� ��&��!��'

����

����

����

����

����

����

����

���

���

�� ���� �������

�� ���

�������� �����

Page 15: Department of Computer Science and Technology: The ......Simultaneous SPEC WEB99 Instances on Linux (L) and Xen(X) OLS2006 19 Scalability • Scaling many domains – One domain per

(�����

��

���

���

���

���

���

� � � �� ��

�����������

����

�� ���

���

Page 16: Department of Computer Science and Technology: The ......Simultaneous SPEC WEB99 Instances on Linux (L) and Xen(X) OLS2006 19 Scalability • Scaling many domains – One domain per

)���� ����(

��

���

���

���

���

���

���

� � � �

�� ��!�"

�� ���

���

����� �������� ����

�������������� �

BL

,L

@FL

@,L ?FL

Source: XenSource, Inc: 10/06

# Virtual CPUs

Page 17: Department of Computer Science and Technology: The ......Simultaneous SPEC WEB99 Instances on Linux (L) and Xen(X) OLS2006 19 Scalability • Scaling many domains – One domain per

*+� ������

L X V UTx, MTU 1500 (Mbps)

L X V URx, MTU 1500 (Mbps)

L X V UTx, MTU 500 (Mbps)

L X V URx, MTU 500 (Mbps)

0.0

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1.0

1.1

TCP bandwidth on Linux (L), Xen (X), VMWare Workstation (V), and UML (U)

Page 18: Department of Computer Science and Technology: The ......Simultaneous SPEC WEB99 Instances on Linux (L) and Xen(X) OLS2006 19 Scalability • Scaling many domains – One domain per

#�������$

L X

2L X

4L X

8L X

16

0

200

400

600

800

1000

Simultaneous SPEC WEB99 Instances on Linux (L) and Xen(X)

Page 19: Department of Computer Science and Technology: The ......Simultaneous SPEC WEB99 Instances on Linux (L) and Xen(X) OLS2006 19 Scalability • Scaling many domains – One domain per

OLS2006 19

Scalability• Scaling many domains

– One domain per processor core, 1 to many cores/domains– Presented data showing problems at OLS on 64-bit domains

• Since then, tested 32-bit domains, which look fine• 64-bit did not scale because of excessive TLB flushes, which put too much pressure on global

update of tlbflush_clock in Xen. Jun has fixed with TLB global bit patch –no need to flush all TLB entries for syscalls, etc, which also does not update tlbflush_clock. Patch also improves single domain performance by keeping user TLB entries.

Big jump with less atomic updates to tlbflush_clock

64-bit XenPaxville processors

1 domain/processor core2 vCPUs/domain, 1 per hyperthread

8 cores total1st core for dom0

Page 20: Department of Computer Science and Technology: The ......Simultaneous SPEC WEB99 Instances on Linux (L) and Xen(X) OLS2006 19 Scalability • Scaling many domains – One domain per

OLS2006 20

Scalability• Scaling a large domain, 1 to many vCPUs

– Elimination of writable page-tables in xen-unstable helps a lot (red bars below) but still have significant scaling problems beyond 6-way

– Now need fine grain locking in mm functions; should be easier to implement with writable page-tables gone. (green bars have domain big-lock removed)

– TLB global bit optimization also helps scalability (blue bars)

Need to confirm this data point

64-bit XenPaxville processors

2-way = 1 processor core4-way = 2 cores, etc,

(HT enabled)8 cores total

Page 21: Department of Computer Science and Technology: The ......Simultaneous SPEC WEB99 Instances on Linux (L) and Xen(X) OLS2006 19 Scalability • Scaling many domains – One domain per

����F

,-./�!

��������� ����������������

��������������������������0����

��*�����������������������

����F�����������&�(����M:#6����

G����

)���

:#6

F#6

D#6

��

) ����@

����D

Page 22: Department of Computer Science and Technology: The ......Simultaneous SPEC WEB99 Instances on Linux (L) and Xen(X) OLS2006 19 Scalability • Scaling many domains – One domain per

,-./.0

�4����������������0�������������������"����

�2��������������������

�2��������������.�� ���������������������*��� ���

G����

)���

?-:

D

��

)

)

����� ��

?:A

?-:.?:A

Page 23: Department of Computer Science and Technology: The ......Simultaneous SPEC WEB99 Instances on Linux (L) and Xen(X) OLS2006 19 Scalability • Scaling many domains – One domain per

,-./.0

��������.���������0�����������F�������������������������

� ;��&#�K�H&�4:K�I �������������������3������������������0�����������

��*�������������N�����������������*�����/���� �����

�&��.'&)������������� ���������#������

G����

)���

��

)

)

�*�����/�*����

�F

�D

�F

Page 24: Department of Computer Science and Technology: The ......Simultaneous SPEC WEB99 Instances on Linux (L) and Xen(X) OLS2006 19 Scalability • Scaling many domains – One domain per

,-. +�1 �����������

��������������D�H������� ������I

�����@/?������������"�F��������.������#&%���������������������������� �����������

������ ��������-:�6�������������������� ������������������������������������������������������������������+,-

�$*��������O���������������D

�#����������*��������J���������K�������������������.������������������*����������

���)� ����������� ������� �=�������.���

Page 25: Department of Computer Science and Technology: The ......Simultaneous SPEC WEB99 Instances on Linux (L) and Xen(X) OLS2006 19 Scalability • Scaling many domains – One domain per

������������ ��� 221

�#�����������������������������&;�

�$*����������������&;�����

��������� ��������&;������������������

������������������������"�� ������ �������

�������������������������������&;(

@=�#�������*��*����������������P

?=�&�����������������*��*�������������

����������&;(��������������������"���J��0�K�&;(������������0��������

Page 26: Department of Computer Science and Technology: The ......Simultaneous SPEC WEB99 Instances on Linux (L) and Xen(X) OLS2006 19 Scalability • Scaling many domains – One domain per

221 ����������� 3 4�����2�(�

MMU

Guest OS

Xen VMM

Hardware

guest writes

guest reads

Virtual � Machine

Page 27: Department of Computer Science and Technology: The ......Simultaneous SPEC WEB99 Instances on Linux (L) and Xen(X) OLS2006 19 Scalability • Scaling many domains – One domain per

5 ������ ��� *���� 3 6 7 5 ��� ����

MMU

Guest OS

Xen VMM

Hardware

page fault

first guestwrite

guest reads

Virtual � Machine

Page 28: Department of Computer Science and Technology: The ......Simultaneous SPEC WEB99 Instances on Linux (L) and Xen(X) OLS2006 19 Scalability • Scaling many domains – One domain per

5 ������ ��� *���� 3 ! 7 8% ����9

MMU

Guest OS

Xen VMM

Hardware

first guestwrite

guest reads

Virtual � Machine

emulate?

yes

Page 29: Department of Computer Science and Technology: The ......Simultaneous SPEC WEB99 Instances on Linux (L) and Xen(X) OLS2006 19 Scalability • Scaling many domains – One domain per

5 ������ ��� *���� 3 � � 1����:

MMU

Guest OS

Xen VMM

Hardware

guest writes

guest reads

Virtual � Machine�

Page 30: Department of Computer Science and Technology: The ......Simultaneous SPEC WEB99 Instances on Linux (L) and Xen(X) OLS2006 19 Scalability • Scaling many domains – One domain per

5 ������ ��� *���� 3 0 � ;��� 1��

MMU

Guest OS

Xen VMM

Hardware

page fault

guest writes

guest reads

Virtual � Machine�

Page 31: Department of Computer Science and Technology: The ......Simultaneous SPEC WEB99 Instances on Linux (L) and Xen(X) OLS2006 19 Scalability • Scaling many domains – One domain per

5 ������ ��� *���� 3 ' 7 <�����:

MMU

Guest OS

Xen VMM

Hardware

validate

guest writes

guest reads

Virtual � Machine

Page 32: Department of Computer Science and Technology: The ......Simultaneous SPEC WEB99 Instances on Linux (L) and Xen(X) OLS2006 19 Scalability • Scaling many domains – One domain per

221 2 ���������% :�

L X V U

Page fault (µs)L X V U

Process fork (µs)

0.0

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1.0

1.1

lmbench results on Linux (L), Xen (X), VMWare Workstation (V), and UML (U)

Page 33: Department of Computer Science and Technology: The ......Simultaneous SPEC WEB99 Instances on Linux (L) and Xen(X) OLS2006 19 Scalability • Scaling many domains – One domain per

#2� =���� )�����

���������������������'&)����������� ��������1&1K����� ������� ���������

�'������*������F?��'&)���������

��������������/���������'&)��%�������������� �����������

� ��������������� ���'&)�������*�����*��������������0�

�26 ���*�������������+�����������&�����������*�Q �����������������������������������������������������

Page 34: Department of Computer Science and Technology: The ......Simultaneous SPEC WEB99 Instances on Linux (L) and Xen(X) OLS2006 19 Scalability • Scaling many domains – One domain per

#2� =���� )�����

�;�0�������������������������&�������������������������������� ��N�������+����;46��*������� 1&1�

���&��������������������0*�������� 5��������������'&)������������������ 6��"�����������������������������0����� ��� ��������*�������*������������

�&��� ���������������������������� ��������������������� � ������*� �������1&1�� ������J������������K�� ������ �����������/��������'&)�

Page 35: Department of Computer Science and Technology: The ......Simultaneous SPEC WEB99 Instances on Linux (L) and Xen(X) OLS2006 19 Scalability • Scaling many domains – One domain per

4��� 4�% ���

Event Channel Virtual MMUVirtual CPU Control IF

Hardware (SMP, MMU, physical memory, Ethernet, SCSI/IDE)

NativeDeviceDriver

GuestOS(XenLinux)

Device Manager & Control s/w

VM0

NativeDeviceDriver

GuestOS(XenLinux)

VM1

Front-EndDevice Drivers

GuestOS(XenLinux)

UnmodifiedUser

Software

VM2

Front-EndDevice Drivers

GuestOS(XenBSD)

UnmodifiedUser

Software

VM3

Safe HW IF

Xen Virtual Machine Monitor

Back-End Back-End

DriverDomain

Page 36: Department of Computer Science and Technology: The ......Simultaneous SPEC WEB99 Instances on Linux (L) and Xen(X) OLS2006 19 Scalability • Scaling many domains – One domain per

4����� +����� �������

Page 37: Department of Computer Science and Technology: The ......Simultaneous SPEC WEB99 Instances on Linux (L) and Xen(X) OLS2006 19 Scalability • Scaling many domains – One domain per

������( 4��� �2�

������ ������� ��������������������

�����������������=�=

� 1�������������

� ;�����

�G��������"��������

�(=�=�?AB��������������������(������������ ��

0

50

100

150

200

250

300

350

0 5 10 15 20 25 30 35 40time (s)

Page 38: Department of Computer Science and Technology: The ......Simultaneous SPEC WEB99 Instances on Linux (L) and Xen(X) OLS2006 19 Scalability • Scaling many domains – One domain per

�� �����������

�1�� ���������������/� ������ ������

�4����*� �=� ��������������

> ���������������������0�����������

�'������@D.FDL�����'&)�������� �

���������/� ��������������

���������+�����������������/�

�����������������

� ������21'��/�$'��

Page 39: Department of Computer Science and Technology: The ......Simultaneous SPEC WEB99 Instances on Linux (L) and Xen(X) OLS2006 19 Scalability • Scaling many domains – One domain per

#% � >�+� ���� #�����

���������������������������*���D� ;�����) ��������������������������*

�21'�������*���������1���������H�1�I� �1�R�%������S�����N�����S�� ���N����

�����������������������������������21'�������������������*������������*

Dom0 DomU DomU

HardwareHypervisor

Dom0 DomU DomU

HardwareHypervisor

Page 40: Department of Computer Science and Technology: The ......Simultaneous SPEC WEB99 Instances on Linux (L) and Xen(X) OLS2006 19 Scalability • Scaling many domains – One domain per

8�$ ������

����

������������

������������

������������

������������

����������������

����������������

����������������

���� ������ ������ ������ ��

������������������������

���� ������ ������ ������ ��

������������������������

����������������

������ ��������� ��������� ��������� ���

���� ������ ������ ������ ��

������� ��������� ��������� ��������� ��

!���"� #$��� %&!���"� #$��� %&!���"� #$��� %&!���"� #$��� %&

�� !'� � �� !'� � �� !'� � �� !'� �

Page 41: Department of Computer Science and Technology: The ......Simultaneous SPEC WEB99 Instances on Linux (L) and Xen(X) OLS2006 19 Scalability • Scaling many domains – One domain per

+�1 1���

����

��������

��������

��������

��������

������������

������������

������������

���� ������ ������ ������ �� ���� ������ ������ ������ �� ����������������

������� ��������� ��������� ��������� ���!'� �(!'� )��!'� �(!'� )��!'� �(!'� )��!'� �(!'� )�

!���"� #$��� %&!���"� #$��� %&!���"� #$��� %&!���"� #$��� %&�!'� � ( !'� )��!'� � ( !'� )��!'� � ( !'� )��!'� � ( !'� )�

�� !'� � �� !'� � �� !'� � �� !'� ��!'� ���!'� ���!'� ���!'� ��

Page 42: Department of Computer Science and Technology: The ......Simultaneous SPEC WEB99 Instances on Linux (L) and Xen(X) OLS2006 19 Scalability • Scaling many domains – One domain per

�*�, " �24�� 3 ��%

�(�����#����������������������������������� (=�=������*�4��+"�5������&/?DDF

�'&)��� ����� ��+���������������� ������������

�������������������������� ��������� ��)

������ ���������������������������� 61��"�����"������"����"�2���H����F?I"�1�(��������

�1���������� �������������� ����������������������.����������1�

�&��������*����'&)��������*����� ������������ 2.� ��� ���*��� ���������������

Page 43: Department of Computer Science and Technology: The ......Simultaneous SPEC WEB99 Instances on Linux (L) and Xen(X) OLS2006 19 Scalability • Scaling many domains – One domain per

��2 ����������

NativeDevice Drivers

Control

Panel

(xm/xend)

Front end Virtual

Drivers

Linux xen64

Xen Hypervisor

Device

Models

Guest BIOS

Unmodified OS

Domain N

Linux xen64

Callback / Hypercall VMExit

Virtual Platform

0D

Guest VM (VMX)(32-bit)

Backend

Virtual driver

Native Device Drivers

Domain 0

Event channel0P

1/3P

3P

I/O: PIT, APIC, PIC, IOAPICProcessor Memory

Control Interface HypercallsEvent Channel Scheduler

Guest BIOS

Unmodified OS

VMExit

Virtual Platform

Guest VM (VMX)(64-bit)

3D

PIC/APIC/IOAPICemulation

Page 44: Department of Computer Science and Technology: The ......Simultaneous SPEC WEB99 Instances on Linux (L) and Xen(X) OLS2006 19 Scalability • Scaling many domains – One domain per

��������� �����������

�$*���������&1�� ����������$���������

�������� ��*�����&���+����������������2������6��0�1�

���&1'H� ���������I

���)��������> ����������;46������

> &;(���������H���������������������I

> &����������

�;���

�'&)��������*�������

Page 45: Department of Computer Science and Technology: The ......Simultaneous SPEC WEB99 Instances on Linux (L) and Xen(X) OLS2006 19 Scalability • Scaling many domains – One domain per

�� 4����

NativeDevice Drivers

Control

Panel

(xm/xend)

Front end Virtual

Drivers

Linux xen64

Xen Hypervisor

Device

Models

Guest BIOS

Unmodified OS

Domain N

Linux xen64

Callback / Hypercall VMExit

Virtual Platform

0D

Guest VM (VMX)(32-bit)

Backend

Virtual driver

Native Device Drivers

Domain 0

Event channel0P

1/3P

3P

I/O: PIT, APIC, PIC, IOAPICProcessor Memory

Control Interface HypercallsEvent Channel Scheduler

FE V

irtual D

rivers

Guest BIOS

Unmodified OS

VMExit

Virtual Platform

Guest VM (VMX)(64-bit)

FE V

irtual D

rivers

3D

PIC/APIC/IOAPICemulation

Page 46: Department of Computer Science and Technology: The ......Simultaneous SPEC WEB99 Instances on Linux (L) and Xen(X) OLS2006 19 Scalability • Scaling many domains – One domain per

���

���

���

���

���

���

���

��

��

����

��� # �$%��%&$� �$

�'��

�(�� (��

��2 �"� ����% ���

� �������� !"!!���#����$!�� %� Source: XenSource, Sep 06

Page 47: Department of Computer Science and Technology: The ......Simultaneous SPEC WEB99 Instances on Linux (L) and Xen(X) OLS2006 19 Scalability • Scaling many domains – One domain per

��8% � ���� ?!

NativeDevice Drivers

Control

Panel

(xm/xend)

Front end Virtual

Drivers

Linux xen64

Xen Hypervisor

Guest BIOS

Unmodified OS

Domain N

Linux xen64

Callback / Hypercall

VMExit

Virtual Platform0D

Guest VM (VMX)(32-bit)

Backend

Virtual driver

Native Device Drivers

Domain 0

Event channel0P

1/3P

3P

I/O: PIT, APIC, PIC, IOAPICProcessor Memory

Control Interface HypercallsEvent Channel Scheduler

FE V

irtual D

rivers

Guest BIOS

Unmodified OS

VMExit

Virtual Platform

Guest VM (VMX)(64-bit)

FE V

irtual D

rivers

3D

IO Emulation IO Emulation

Page 48: Department of Computer Science and Technology: The ......Simultaneous SPEC WEB99 Instances on Linux (L) and Xen(X) OLS2006 19 Scalability • Scaling many domains – One domain per

��2 ����% ���

����*������������������

�BL��&('T66�HD=BL��������*�&�I

� ��.����� ������������������������������

�&����������������*��.����������+�������������

�$���������������������������� ��*����'&)�

������������������������

�7�?(8��������.����� ��������N�����

�2����������������������

Page 49: Department of Computer Science and Technology: The ......Simultaneous SPEC WEB99 Instances on Linux (L) and Xen(X) OLS2006 19 Scalability • Scaling many domains – One domain per

OLS2006 49

Full Virtualization• Shadow2 code shows vast improvement in processor performance/scaling

– Boosts single domain throughput significantly -Dbench (running in tmpfs filesystem, NO I/O) – Many HVM domain scalability also improved dramatically

• 1 to 7 HVMs scaled 1 : 6.47 with shadow2. Same test scaled 1 : 2.63 with old shadow code

DomU

HVM, original shadow

HVM shadow2

1 72 3 4 5 6

Number of domains

32-bit PAE XenPaxville processors

Uniprocessor domains,One domain/core.

8 cores total1st core for dom0

HT not usedSMP HVM not stable

Page 50: Department of Computer Science and Technology: The ......Simultaneous SPEC WEB99 Instances on Linux (L) and Xen(X) OLS2006 19 Scalability • Scaling many domains – One domain per

#�(�� ��������

MMU

Accessed &dirty bits

Guest OS

VMM

Hardware

guest writes

guest reads Virtual � Pseudo-physical

Virtual � Machine

Updates

Page 51: Department of Computer Science and Technology: The ......Simultaneous SPEC WEB99 Instances on Linux (L) and Xen(X) OLS2006 19 Scalability • Scaling many domains – One domain per

����� 4��: #����

�4���4������������������*������*������������������� ����������0�����������*

� 2����������� ���������������

� '�*..������������������������������������

����������0���������������������4��+K��7��8���� ������K����0�����

�;���76�0���8���� �����������F=D=F��� ��������������� ��

� �������������0���N�������������� �����������.��������������.��*��1���������

Page 52: Department of Computer Science and Technology: The ......Simultaneous SPEC WEB99 Instances on Linux (L) and Xen(X) OLS2006 19 Scalability • Scaling many domains – One domain per

��:� �( � (��: �������

� '������ ������������*�����.��������� ��

���N����/��������N�������������������

�#�����������������������.��*��/���������

�%�������������N�����������������"�'5"����*���"���������

� '���������������������������*

�����������N�������

Page 53: Department of Computer Science and Technology: The ......Simultaneous SPEC WEB99 Instances on Linux (L) and Xen(X) OLS2006 19 Scalability • Scaling many domains – One domain per

��:� �� ���% ���

Page 54: Department of Computer Science and Technology: The ......Simultaneous SPEC WEB99 Instances on Linux (L) and Xen(X) OLS2006 19 Scalability • Scaling many domains – One domain per

*�% � ���

���������������������������'&)������������� 7���;�'����������������U"���������������;�'����N���*���������������������!8

� ������� �������������;�'�����+���������

�5����'&)� �������"����������������������*������'&)

�&�������������������;�'V� ����������/����� 5�0��� ����*������������.�*����;�'�� )������������������'&)����N���*��������H�.�����I� ���"����*��������������������'&)������ ��*�������������������������

Page 55: Department of Computer Science and Technology: The ......Simultaneous SPEC WEB99 Instances on Linux (L) and Xen(X) OLS2006 19 Scalability • Scaling many domains – One domain per

��� *����

xm

xend

libxc

Priv Cmd Back

dom0_op

Xen

xenbus

dom0 dom1

xenbus Front

Web svcsCIM

builder control save/restore

control

Page 56: Department of Computer Science and Technology: The ......Simultaneous SPEC WEB99 Instances on Linux (L) and Xen(X) OLS2006 19 Scalability • Scaling many domains – One domain per

�2 <�������� 3 2 ��������

������������������

�$���.� ���������*

> ���������������

� 4����������

> ��������������������+������

Xen

Xen

Page 57: Department of Computer Science and Technology: The ......Simultaneous SPEC WEB99 Instances on Linux (L) and Xen(X) OLS2006 19 Scalability • Scaling many domains – One domain per

����% �����

�2����0���������

�2�� �2%�"�'1%�

���2 �%�����'����

� ��'�1"�����0����0���

� ��������0���1�

�#������� ��*

� ����4?�����0

� 4F���.�������

Xen

Xen

Storage

Page 58: Department of Computer Science and Technology: The ......Simultaneous SPEC WEB99 Instances on Linux (L) and Xen(X) OLS2006 19 Scalability • Scaling many domains – One domain per

+��������

���� �� ��������������������*

�������� �� ����������.�������N��������

�(=�=�������� ���"����������"��������� ���

� ��*������������������������N����

� ������������ ���

�&������������������N��������������

���������� ���������������

Page 59: Department of Computer Science and Technology: The ......Simultaneous SPEC WEB99 Instances on Linux (L) and Xen(X) OLS2006 19 Scalability • Scaling many domains – One domain per

������D ����.�������

������@ ������ ���

������? �������� �����.��*

������F ����.��.��*

������: ���������

<�������� #����$

������� �����������������������������H6��0��� ������������I1�����������������

����������

'�*�����*����������������� �����������������������������������0���������*�������������������� ���������6����������������

��������

Page 60: Department of Computer Science and Technology: The ......Simultaneous SPEC WEB99 Instances on Linux (L) and Xen(X) OLS2006 19 Scalability • Scaling many domains – One domain per

���+� $ 2 ������3 <���( 6

Page 61: Department of Computer Science and Technology: The ......Simultaneous SPEC WEB99 Instances on Linux (L) and Xen(X) OLS2006 19 Scalability • Scaling many domains – One domain per

���+� $ 2 ������3 <���( 6

Page 62: Department of Computer Science and Technology: The ......Simultaneous SPEC WEB99 Instances on Linux (L) and Xen(X) OLS2006 19 Scalability • Scaling many domains – One domain per

���+� $ 2 ������3 <���( 6

Page 63: Department of Computer Science and Technology: The ......Simultaneous SPEC WEB99 Instances on Linux (L) and Xen(X) OLS2006 19 Scalability • Scaling many domains – One domain per

���+� $ 2 ������3 <���( 6

Page 64: Department of Computer Science and Technology: The ......Simultaneous SPEC WEB99 Instances on Linux (L) and Xen(X) OLS2006 19 Scalability • Scaling many domains – One domain per

���+� $ 2 ������3 <���( 6

Page 65: Department of Computer Science and Technology: The ......Simultaneous SPEC WEB99 Instances on Linux (L) and Xen(X) OLS2006 19 Scalability • Scaling many domains – One domain per

���+� $ 2 ������3 <���( !

Page 66: Department of Computer Science and Technology: The ......Simultaneous SPEC WEB99 Instances on Linux (L) and Xen(X) OLS2006 19 Scalability • Scaling many domains – One domain per

���+� $ 2 ������3 <���( !

Page 67: Department of Computer Science and Technology: The ......Simultaneous SPEC WEB99 Instances on Linux (L) and Xen(X) OLS2006 19 Scalability • Scaling many domains – One domain per

���+� $ 2 ������3 <���( !

Page 68: Department of Computer Science and Technology: The ......Simultaneous SPEC WEB99 Instances on Linux (L) and Xen(X) OLS2006 19 Scalability • Scaling many domains – One domain per

���+� $ 2 ������3 <���( !

Page 69: Department of Computer Science and Technology: The ......Simultaneous SPEC WEB99 Instances on Linux (L) and Xen(X) OLS2006 19 Scalability • Scaling many domains – One domain per

���+� $ 2 ������3 <���( !

Page 70: Department of Computer Science and Technology: The ......Simultaneous SPEC WEB99 Instances on Linux (L) and Xen(X) OLS2006 19 Scalability • Scaling many domains – One domain per

���+� $ 2 ������3 ;���

Page 71: Department of Computer Science and Technology: The ......Simultaneous SPEC WEB99 Instances on Linux (L) and Xen(X) OLS2006 19 Scalability • Scaling many domains – One domain per

5 ����� 5 �:��� #��

�&��������������������������������.���

���������������

> �=�=������������0�3��������������������

�6�����������

�2����0������ ��/����0��������

�����*�����������������������.����

������������������ ���������*���� E

Page 72: Department of Computer Science and Technology: The ......Simultaneous SPEC WEB99 Instances on Linux (L) and Xen(X) OLS2006 19 Scalability • Scaling many domains – One domain per

<�� @�% ���( <��������

��*�������*���O���������������������������������������������

� ����*���������������W?.FL

� '&)��������0������������*���0��

�(=�=���������*������������@DD��/�"������������������������ �������*�������

� ����������������������������� ��������������������.����

Page 73: Department of Computer Science and Technology: The ......Simultaneous SPEC WEB99 Instances on Linux (L) and Xen(X) OLS2006 19 Scalability • Scaling many domains – One domain per

5 �� #��� <��������

Elapsed time (secs)0 10 20 30 40 50 60 70 80 90 100 110 120 130

Thro

ughp

ut (M

bit/s

ec)

0

200

400

600

800

1000Effect of Migration on Web Server Transmission Rate

Sample over 100ms

Sample over 500ms

512Kb files100 concurrent clients

1st precopy, 62 secs further iterations9.8 secs

765 Mbit/sec870 Mbit/sec

694 Mbit/sec

165ms total downtime

Page 74: Department of Computer Science and Technology: The ......Simultaneous SPEC WEB99 Instances on Linux (L) and Xen(X) OLS2006 19 Scalability • Scaling many domains – One domain per

������� ������3 #�8+5 ��

52s

Page 75: Department of Computer Science and Technology: The ......Simultaneous SPEC WEB99 Instances on Linux (L) and Xen(X) OLS2006 19 Scalability • Scaling many domains – One domain per

������� ������3 A�:��

Page 76: Department of Computer Science and Technology: The ......Simultaneous SPEC WEB99 Instances on Linux (L) and Xen(X) OLS2006 19 Scalability • Scaling many domains – One domain per

A�:� � #��� ��������

Elapsed time (secs)0 10 20 30 40 50 60 70

Pac

ket f

light

tim

e (s

ecs)

0

0.02

0.04

0.06

0.08

0.1

0.12

Packet interarrival time during Quake 3 migration

Mig

ratio

n 1

dow

ntim

e: 5

0ms

Mig

ratio

n 2

dow

ntim

e: 4

8ms

Page 77: Department of Computer Science and Technology: The ......Simultaneous SPEC WEB99 Instances on Linux (L) and Xen(X) OLS2006 19 Scalability • Scaling many domains – One domain per

#$���% 4�������� �� ���

�#�����������������������&��.���������*����

������� ���2����������0�������������

���������%��.�������� ���������

�+��/+���

�����������������.�������������

Page 78: Department of Computer Science and Technology: The ......Simultaneous SPEC WEB99 Instances on Linux (L) and Xen(X) OLS2006 19 Scalability • Scaling many domains – One domain per

��� � �����

�������.���������������������������*����

OProfile

dom0

HW event

PC sample

Sample log

dom1

HW event

PC sample

dom2

HW event

PC sample

Oprofilereport

Page 79: Department of Computer Science and Technology: The ......Simultaneous SPEC WEB99 Instances on Linux (L) and Xen(X) OLS2006 19 Scalability • Scaling many domains – One domain per

��� � ����� �,% ��

)�*+�����������,� -���-.���% -���/�0�����/����1����&2�!�� � � �/")�#� �/�34��546��78968$8��:����� ��,� -���#�� � ��;��<��(���! ��/� ��."���#� ���������� �=����>��������� �?���� ������������������������������������ ��������������������������������. '�=��� ����������1������/� ����%;����=�����������������������/� ����%;����= 66�����������.6 �6#���6==�����������1�����(��%�. �%�1�%#�� �'=��������������(��%�. �%�1�%#�� �'=� /�6?��� 6 �'=�6�������������1������ =��#(%�. �%�1�1��1��%(������ =��#(%�. �%�1�1��1��%(��� �� 6 (6�� �������������1�����(��%�. �%�1�%#�� �'=��������������(��%�. �%�1�%#�� �'=� <��/6/� ���6'.6�/����������1�����(��%�. �%�1�%#�� �'=��������������(��%�. �%�1�%#�� �'=� ?� �'6 ����<�����������1�����/� ����%(�����������������������������/� ����%(�� �� �-�6�� 6���/��?�����������1������ =��#(%�. �%�1�1��1��%(������ =��#(%�. �%�1�1��1��%(��� �� 6�(6�� ��������������1�����/� ����%;����=�����������������������/� ����%;����= ��6��6��������������1������(��%�. �%�1�%#�� �'=��������������(��%�. �%�1�%#�� �'=� -.�����==�����������1����/� ����%(�����������������������������/� ����%(�� ?#�� 6�� ���6��?������������1������ =��#(%�. �%�1�1��1��%(������ =��#(%�. �%�1�1��1��%(��� -.�����==6��?����������1������� =��#(%�. �%�1�1��1��%(������ =��#(%�. �%�1�1��1��%(��� � -6 .��6 ���������������1�����/� ����%(�����������������������������/� ����%(�� ?� 6��?�6<�� 6=������������1�����/� ����%;����=�����������������������/� ����%;����= � -6 .��6 ���������������1����� =��#(%�. �%�1�1��1��%(������ =��#(%�. �%�1�1��1��%(��� �����6�� �

@

�����������1����/� ����%�����������������������������/� ����%���� !����. '�=�"����������1������/� ����%;����=�����������������������/� ����%;����= ��6 �6 � ���������������1������� =��#(%�. �%�1�1��1��%(������ =��#(%�. �%�1�1��1��%(��� /�=�.6 ������������1������/� ����%;����=�����������������������/� ����%;����= /�6A9B�����������1����������<�=�/ ����<�=�/ �/'6�����

Page 80: Department of Computer Science and Technology: The ......Simultaneous SPEC WEB99 Instances on Linux (L) and Xen(X) OLS2006 19 Scalability • Scaling many domains – One domain per

��� <����� ��&����

�5���.�*�������� ��� ����������� 4���������������0����� ��������*

� '������/�������������*�������������

���������������������/��������������� (+�����������������������*

� (+��������������������������*����&��*�����

������.�� �����������*�������������� ���(/���;' �'��������"�1���"�#'$�"�$&"�E

������0��� 4�������������� �������������"�������

� )'���&���0� ��*���� ��O���

Page 81: Department of Computer Science and Technology: The ......Simultaneous SPEC WEB99 Instances on Linux (L) and Xen(X) OLS2006 19 Scalability • Scaling many domains – One domain per

���,

����������������������������=

�������������������"�������������

�����������������������

Root A Root BSnapshot

Data

L2

L1

Page 82: Department of Computer Science and Technology: The ......Simultaneous SPEC WEB99 Instances on Linux (L) and Xen(X) OLS2006 19 Scalability • Scaling many domains – One domain per
Page 83: Department of Computer Science and Technology: The ......Simultaneous SPEC WEB99 Instances on Linux (L) and Xen(X) OLS2006 19 Scalability • Scaling many domains – One domain per

�!8 3 *��� ��:����!8 3 *��� ��:����!8 3 *��� ��:����!8 3 *��� ��:���

VMM

Control VM

DD

DiskNet

ND

Protected VM

VN VD

I/O Taint

Taint Pagemap

1. Inbound pages are marked as tainted. Fine-grained taintDetails in extension, page-granularity bitmap in VMM.2. VM traps on access to a tainted page. Tainted pagesMarked not-present. Throw VM to emulation.

Qemu*

Protected VM

VN VD

3. VM runs in emulation, tracking tainted data. Qemumicrocode modified to reflect tainting across data movement.4. Taint markings are propagated to disk. Disk extensionmarks tainted data, and re-taints memory on read.

Page 84: Department of Computer Science and Technology: The ......Simultaneous SPEC WEB99 Instances on Linux (L) and Xen(X) OLS2006 19 Scalability • Scaling many domains – One domain per

�!8 3 *��� ��:����!8 3 *��� ��:����!8 3 *��� ��:����!8 3 *��� ��:���

VMM

Control VM

DD

DiskNet

ND

I/O Taint

Taint Pagemap

1. Inbound pages are marked as tainted. Fine-grained taintDetails in extension, page-granularity bitmap in VMM.2. VM traps on access to a tainted page. Tainted pagesMarked not-present. Throw VM to emulation.

Qemu*

3. VM runs in emulation, tracking tainted data. Qemumicrocode modified to reflect tainting across data movement.4. Taint markings are propagated to disk. Disk extensionmarks tainted data, and re-taints memory on read.

Protected VM

VN VD

Protected VM

VN VD

Page 85: Department of Computer Science and Technology: The ......Simultaneous SPEC WEB99 Instances on Linux (L) and Xen(X) OLS2006 19 Scalability • Scaling many domains – One domain per

+���� ��� #����

Driver Domains

Progressive PV

>4GB memory

Save/Restore/Migrate

SMP Guests

Guest Domains

Privileged Domains

PowerIA64x86_64x86_32px86_32

Page 86: Department of Computer Science and Technology: The ......Simultaneous SPEC WEB99 Instances on Linux (L) and Xen(X) OLS2006 19 Scalability • Scaling many domains – One domain per

���������� <���� +�(� #���

aliases checkins insertionsxensource.com 16 1281 363449ibm.com 30 271 40928intel.com 26 290 29545hp.com 8 126 19275novell.com 8 78 17108valinux.co.jp 3 156 12143bull.net 1 145 11926ncsc.mil 3 25 6048fujitsu.com 13 119 6442redhat.com 7 68 4822amd.com 5 61 2671virtualiron.com 5 23 1434cam.ac.uk 1 9 1211sun.com 2 9 826unisys.com 3 7 857other 30 189 48132 ����������

F=D=D��������

Page 87: Department of Computer Science and Technology: The ......Simultaneous SPEC WEB99 Instances on Linux (L) and Xen(X) OLS2006 19 Scalability • Scaling many domains – One domain per

��� 4����� % ��� <�(%

�&��������������������������

�&����������*����$������+,-9-:

�(���������������0

���������������*���������

�����������*����2)��������������

�6�����������/���0���������

����#4� �����������"���������������

�2����0�����������

Page 88: Department of Computer Science and Technology: The ......Simultaneous SPEC WEB99 Instances on Linux (L) and Xen(X) OLS2006 19 Scalability • Scaling many domains – One domain per

+����������

���������������������������*��� ���

����������������������������������*

�(+������������������������������

���������� �������������*

������ ����������

�;�*������������'��������������X���������������������������H��%�����'���-"����� @D=+I

����� //+������=��/������*

Page 89: Department of Computer Science and Technology: The ......Simultaneous SPEC WEB99 Instances on Linux (L) and Xen(X) OLS2006 19 Scalability • Scaling many domains – One domain per

*��:�B

�1��*�K�����������������0���������K����0��������������������������������������������4��"����������0�����0���������������'��������������=�

���=�����Y��=���=��=�0

Page 90: Department of Computer Science and Technology: The ......Simultaneous SPEC WEB99 Instances on Linux (L) and Xen(X) OLS2006 19 Scalability • Scaling many domains – One domain per

+���� 4����� 2�(��

Page 91: Department of Computer Science and Technology: The ......Simultaneous SPEC WEB99 Instances on Linux (L) and Xen(X) OLS2006 19 Scalability • Scaling many domains – One domain per

+���� 4����� 2�(��

��(�)��� ����(������

�����������D����)����&�����

�2�1��������&�����*������������$���1/�

� ���V��������Q 4�����2����(�).���%��( ��*�$�������"�'������*����������$�������*

� ��*�'���*�����;�������

> ��( ��*�1/��1��������( ���6�������(�)����G����

> ��( ��*�1/��'�����6�������(�)����������� ������� ���

� ��*�'���*����(+�������( ��*�1/��

Page 92: Department of Computer Science and Technology: The ......Simultaneous SPEC WEB99 Instances on Linux (L) and Xen(X) OLS2006 19 Scalability • Scaling many domains – One domain per

#��� 4�% ��

Page 93: Department of Computer Science and Technology: The ......Simultaneous SPEC WEB99 Instances on Linux (L) and Xen(X) OLS2006 19 Scalability • Scaling many domains – One domain per

#��� 4�% �� <�C���% �������N��������

�2����)����������'��+������(�)>������ �������N�����)����&������. ���� ��

�2����4�����*������������(�)

�2������&�������

�2���������1��(���������G����������

�2���������%�������� ���

�2������4�����1��������6����

�2������4������(�)����������1�����