• No results found

Virtualization: Concepts, Applications, and Performance Modeling

N/A
N/A
Protected

Academic year: 2021

Share "Virtualization: Concepts, Applications, and Performance Modeling"

Copied!
32
0
0

Loading.... (view fulltext now)

Full text

(1)

Virtualization: Concepts,

Virtualization: Concepts,

Applications, and Performance

Applications, and Performance

Modeling

Modeling

Daniel A. Menascé, Ph.D.

The Volgenau School of Information Technology

and Engineering

Department of Computer Science

George Mason University

www.cs.gmu.edu/faculty/menasce.html

(2)

Basic Concepts in Virtualization

Basic Concepts in Virtualization

Hardware

Operating System

Application Environment Application Environment Application Environment

Non-virtualized system

• The OS controls access to the hardware resources.

• The instruction set is divided into privileged and non-privileged.

• The machine can be in two modes of operation: user and supervisor.

• Only non-privileged instructions can be executed in user mode.

• Any instruction can be executed in supervisor mode.

• Application environments execute in user mode and the OS in supervisor mode.

(3)

Basic Concepts in Virtualization

Basic Concepts in Virtualization

Hardware

Operating System

Application Environment Application Environment Application Environment

Non-virtualized system

Hardware

Operating System

Application Environment Application Environment Application Environment

Virtual Machine Monitor

Virtualized system

(4)

Basic Concepts in Virtualization

Basic Concepts in Virtualization

Hardware

Application Environment Application Environment

Virtual Machine Monitor (VMM)

Virtualized system OS 1 OS 2

Application Environment Application Environment

• The VMM controls access to the hardware resources.

• OSs (called guest OSs) execute in user mode and the VMM in supervisor mode.

• The VMM interprets in software

privileged instructions that would be executed by an OS.

• Any non-privileged instruction issued by an OS or Application Environment is executed directly by the machine.

• This is called virtualization by direct execution or full virtualization.

(5)

Basic Concepts in Virtualization:

Basic Concepts in Virtualization:

the x86 architecture

the x86 architecture

Hardware

Application Environment Application Environment

Virtual Machine Monitor (VMM)

Virtualized system OS 1 OS 2

Application Environment Application Environment

• The x86 architecture provides four levels of privilege: rings 0 through 3.

• In a non virtualized environment, the

OS executes in ring 0 and the applications in ring 3.

• In a virtualized environment that

uses paravirtualization (e.g., Xen) the VMM runs at ring 0, the guest OS at ring 1 and the applications at ring 3.

(6)

Basic Concepts in Virtualization

Basic Concepts in Virtualization

(7)

7

Virtualization Slowdown,

Virtualization Slowdown, S S v v

• In the direct execution approach, privileged

instructions have to be emulated by the

VMM instead of being executed by the

hardware.

S v = f p × N e + (1− f p )

f

p

N

e

: fraction of privileged instructions executed by a VM.

: average number of instructions required by the VMM to emulate a privileged instruction.

(8)

Execution Slowdown

0 1 2 3 4 5 6

0.00% 0.05% 0.10% 0.15% 0.20% 0.25% 0.30% 0.35% 0.40% 0.45%

Fraction of privileged instructions

Slowdown

Ne= 500 Ne= 1000

(9)

Mapping of Virtual to Physical Disks

Mapping of Virtual to Physical Disks

(10)

Some History

Some History

• Over 30 years ago: IBM’s VM/370

• 80’s: decrease in hardware cost caused migration

away from mainframes and virtualization faded

away.

• More recent networked environments brought

problems such as reliability, security, increased

administration cost and complexity, thermal

dissipation.

– Virtualization is poised to address these problems.

(11)

Advantages of Virtualization

Advantages of Virtualization

• Security

– Compartmentalized environments allow for better

choice of guest operating system for each environment (e.g., run Apache on top of Linux and MS SQL on top of Windows XP)

• Reliability and Availability

– A software failure in one VM does not affect other VMs

• Cost

– Server consolidation can bring cost reductions from hardware economies of scale, personnel cost

reductions, floor space, and software licenses.

• Typical savings: 29% to 64%.

(12)

Advantages of Virtualization

Advantages of Virtualization

(cont

(cont ’ ’ d) d)

• Adaptability to Workload Variations:

– Changes in workload intensity levels can be taken care by dynamically shifting resources and priority

allocations among VMs using autonomic computing techniques.

• Load Balancing

– The state of a VM is completely encapsulated in the VMM: easy to migrate VMs to other platforms to improve performance.

• Legacy applications

– Legacy applications can continue to run on old OSs that run as a guest operating systems on VMs.

(13)

Performance Modeling of

Performance Modeling of

Virtualized Environments

Virtualized Environments

• Use Queuing Network (QN) models:

– Customer classes

– Parameters: service demands and workload

intensities

– Service Demand Law: D

i,r

= U

i,r

/ X

0,r

(14)

Queuing Network Models

Queuing Network Models

CPU

Disk 1

Disk n

Input parameters per class:

• workload intensity (e.g., arrival rates, concurrency levels)

• service demands per device (i.,e, total time spent by a transaction receiving service from that device) Solution techniques:

•“Performance by Design,” Menasce, Almeida, and Dowdy, Prentice Hall, 2004.

(15)

Service Demand (D)

Service Demand (D)

Resource LINE

Service demand =

Total service time received by a request over

all visits to a resource

. . . S1 S2 Sk

Arriving requests Completing

requests

Sk: Service time received by the request during visit k D: Service demand = S1 + S2 + …+ Sk

(16)

Computing Service Demands

Computing Service Demands

using the Service Demand Law

using the Service Demand Law

• The service demand D

i

is given by:

D

i

= U

i

/ X

o

where U

i

is the utilization of resource i and X

o

the

system throughput.

(17)

Performance Modeling of

Performance Modeling of

Virtualized Environments

Virtualized Environments

• Use Queuing Network (QN) models:

– Customer classes

– Parameters: service demands and workload intensities – Service Demand Law: Di,r = Ui,r / X 0,r

• Issue: How to combine measurements obtained

from measurements tools at different software

layers of a virtualized environment?

(18)

Parameter Computation

Parameter Computation

420 sec of CPU 220 sec of CPU

Ucpu=40%

UD1=35%

UD2=45%

Ucpu for vm1:

0.4*

420/(420+220)

= 0.2625

(19)

Parameter Computation

Parameter Computation

420 sec of CPU 220 sec of CPU

Ucpu=40%

UD1=35%

UD2=45%

Ucpu for vm2:

0.4*

220/(420+220)

= 0.1375

(20)

Parameter Computation

Parameter Computation

420 sec of CPU 220 sec of CPU

Ucpu=40%

UD1=35%

UD2=45%

290 sec CPU 100 sec CPU

Ucpu of TPM:

0.2625 *

290/(290+100)=

0.1952

Ucpu for vm1:

0.4*

420/(420+220)

= 0.2625

(21)

Parameter Computation

Parameter Computation

420 sec of CPU 220 sec of CPU

Ucpu=40%

UD1=35%

UD2=45%

5400 Q 1200 U Q: 110 sec CPU U: 150 sec CPU

290 sec CPU 100 sec CPU

Ucpu of TPM:

0.2625 *

290/(290+100)=

0.1952

Ucpu of Query:

0.1952 *

110/(110+150)=

0.0826

(22)

Parameter Computation

Parameter Computation

420 sec of CPU 220 sec of CPU

Ucpu=40%

UD1=35%

UD2=45%

5400 Q 1200 U Q: 110 sec CPU U: 150 sec CPU

290 sec CPU 100 sec CPU

Ucpu of Query:

0.1952 *

110/(110+150)=

0.0826

Query throughput:

5400 / 1800 = 3tps CPU demand for Q:

0.0826/3=0.0275 sec

(23)

Server Consolidation

Server Consolidation

3-server scenario

consolidated server scenario

(24)

Server Consolidation

Server Consolidation

(25)

Server Consolidation

Server Consolidation

Physical disks Logical disks

(26)

Server Consolidation

Server Consolidation

Computing Service Demands

Computing Service Demands

D

CPU ,rcons

= D

CPU

s ,r

× S

v

/C

s

s=1 S

Service demand at the CPU of the consolidated server for class r applications.

Number of

original servers

Service demand

at the CPU of original server s for class r applications.

Slowdown factor

Speedup of consolidated server relative to

individual server s

(27)
(28)

For a Cs = 1, the response time is 3.6 times higher.

(29)

For a Cs = 2.5, the response time is only 4% higher.

(30)

Concluding Remarks

Concluding Remarks

• Many vendors are adopting virtualization

solutions:

– Sun’s zones in Solaris 10

– IBM’s Logical Partitioning (LPAR)

– Intel’s Virtualization Technology: hardware support for virtualization.

• Additional instructions that can be used by the VMM to create and support VMs.

• The VMM runs one level below ring 0 and the VMs execute at ring 0

– Xen (Open Source) – EMC’s VMWare

– Microsoft Virtual Server 2005 R2

(31)

Concluding Remarks (cont

Concluding Remarks (cont ’ ’ d) d)

• Two main directions in virtualization:

– Full virtualization: the VMM provides an identical abstraction of the underlying hardware. However, not all architectures are

virtualizable (e.g., x86).

• No changes required to the guest OSs

• Example: VMware

– Paravirtualization: the VMM provides an “almost” identical abstraction of the underlying hardware. The abstraction

implements some new instructions to make the machine virtualizable.

• Guest OSs need to be modified.

• Better performance than full virtualization.

• Examples: Xen and Denali

(32)

Questions?

Questions?

www.cs.gmu.edu/faculty/menasce.html

References

Related documents

At an on-going project at JTI, co-digesting liquid cattle manure and solid manure with CSTR- technology (Mats Edström pers. Tests both in laboratory scale and at

It is also important to realize that even though there is further need for improvement in the technique, the analysis of dissolved fault gases represents a practical and

“Negotiating the Collective Memory in Word and Image” 2011 Kentucky Foreign Language Conference, University of Kentucky, Lexington, April 2011. “The words and images of

The repetitive application of HE and ECAH methods in technological chain of processing the materials in fractional modes and with the optimal degrees of deformation results in

Biohydrogen, which is another form of renewable energy also has been proven feasible to be produced from different types of organic wastes which include municipal solid waste

We first prove that this problem can be solved in polynomial time for k ≤ 3 in any graph and that it is NP-complete for any fixed k ≥ 5 in the class of planar bipartite graphs of

É necessário referir que o marketing de experiências é cada vez mais importante no turismo, os novos turistas dão valor à autenticidade e à experiência da viagem,

Inside this box you can find the power supply, storage device, hard disk and floppy drives, and the mother board containing CPU and memory.. It also contains