ms thesis defense evaluating cpu utilization in...
TRANSCRIPT
Evaluating CPU utilization in a Cloud
Environment
6/9/2017
Presenter
Hafiz ur Rahman
MSCS, KFUPM
Thesis Committee Members
Dr. Farag Azzedin (Advisor)
Dr. Mahmood Khan Naizi
Dr. Salahdin Adam
ICS Department, KFUPM
MS THESIS DEFENSE
MS THESIS DEFENSE Hafiz ur Rahman2 of 37
Outline
Literature ReviewIntroduction Research Objectives
Research Methodology ConclusionResults and Discussion
Present Research Objectiv
es
Conduct Literature Review
Select Appropri
ate Approac
h to achieve
objectives
Conduct Performa
nce Evaluatio
n
Collect Data
Analyze and
Conclude
MS THESIS DEFENSE Hafiz ur Rahman3 of 37
• Cloud computing allows users and businesses to access their data
and applications from any device and anywhere in the world
• Virtualization is the fundamental element of cloud computing by
which we can deliver resources or data as a service
• A datacenter is a facility composed of networked computers and
storage that organizations use to organize, process, store, and
disseminate large amounts of data
Introduction
MS THESIS DEFENSE Hafiz ur Rahman4 of 37
Underutilized servers (unproductive)
Maintenance cost
High infrastructure cost
High power consumption
Disaster recovery
Migration challenges
Running legacy applications
Difficulty in management of computing resources
Introduction Why Virtualization?
MS THESIS DEFENSE Hafiz ur Rahman5 of 37
Virtualization offers many advantages over traditional data centers
✓ Reducing fiscal costs
✓ Running legacy applications
✓ Easing computing resource management
✓ Ease of deployment
✓ Easing system migration
✓ Easing backups and disaster recovery
✓ Efficient resource utilization
Many organizations are adopting virtualization technology to reduce the cost
while maximizing the productivity, flexibility, responsiveness, and efficiency
Introduction Why Virtualization?
MS THESIS DEFENSE Hafiz ur Rahman6 of 37
Virtualization is a technology to run multiple operating systems on asingle machine and giving an illusion that each OS is running on realhardware
An example of running Windows, Linux, and Mac OSs on the same machine
Hardware
Virtual Machine Monitor
Windows
App App
App
Linux
App App
App
Mac
App App
Introduction What is Virtualization?
Hardware
Windows
App App
App
Regular System Virtualized Environment
MS THESIS DEFENSE Hafiz ur Rahman7 of 37
• In a regular system, the hardware resources are shared by single operating system
• In virtualization environments, hypervisors are responsible to manage hardware resources and virtual machines
• Virtualization technology inserts an additional abstraction layer between the hardware and the operating system
Introduction Difference between regular & virtualized environment
Hardware
Windows
App App
App
Hardware
Virtual Machine
Monitor
Windows
App App
App
Regular System Virtualized Environment
➢ System resources such as CPU, main
memory, and I/O are virtualized to
virtual machine
➢ Every guest operating system is in
charge of virtual resources and
concurrently share and access the
hardware resources, which mainly
decreases the performance of the
system
MS THESIS DEFENSE Hafiz ur Rahman8 of 37
Virtualization ShortcomingsIntroduction
Such shortcomings may lead to system performance degradation
vCPU1vCPU1
vCPU2
vCPU1
vCPU2
pCPU pCPU pCPU pCPU
Virtual Machine Monitor…
…
VMnVM1 VM2
…
…VM2
vCPU3 vCPU3
vCPU2
vCPU1
vCPU4
Virtual CPUs – Physical
CPU MappingVirtual Machines
Allocation
Virtual CPUs –Virtual
Machines configuration
Virtualized Environment
MS THESIS DEFENSE Hafiz ur Rahman9 of 37
Virtualization ShortcomingsIntroduction CPU Virtualization & Utilization
➢ CPU utilization is the amount of work handled by a CPU in
a given time
➢ In virtualized environments, the higher the percentage of
the CPU utilization results in the maximum performance
➢ CPU utilization is the metric that represents how busy is a
processor
• CPU is the most significant and critical resource among all the available resources in a system
MS THESIS DEFENSE Hafiz ur Rahman10 of 37
In virtualized environments, the higher the percentage of the CPU utilization results in the maximum performance
CPU utilization in virtualized environmentsProblem Description
• CPU installed on the host is only one set, but each VM that runs on the host requires their own CPU. Therefore, CPU needs to
be virtualized
Under Allocation Balance Allocation Over Allocation Over Allocation
MS THESIS DEFENSE Hafiz ur Rahman11 of 37
CPU Utilization
vCPU-VM allocation
vCPU-pCPU mapping
Resource sharing
between physical cores
Resource sharing
between logical cores
The choice of guest OS
The BIOS setting for
power management
Hypervisor
Main factors that have implications on CPU utilization [23]
CPU utilization in virtualized environmentsProblem Description
MS THESIS DEFENSE Hafiz ur Rahman12 of 37
• The aim is to investigate the best CPU resources allocation and better performance using state-of-the-
are hypervisors
• We focused, on hypervisor selection, vCPU-VM allocation, and vCPU-pCPU pinning strategies to find
out the variation in CPU utilizations
pCPU pCPU pCPU pCPU
Virtual Machine Monitor…
…
VMnVM1 VM2
…
…VM2
vCPU1
vCPU2
vCPU1
vCPU2
vCPU1
vCPU2
vCPU1
vCPU4
CPU utilization in virtualized environmentsProblem Description
Virtualized Environment
MS THESIS DEFENSE Hafiz ur Rahman13 of 37
vCPU1vCPU1
vCPU2
vCPU1
vCPU2
pCPU pCPU pCPU pCPU
Virtual Machine Monitor…
…
VMnVM1 VM2
…
…VM2
vCPU3 vCPU3
vCPU2
vCPU1
vCPU4
We are motivated by the fact that virtualization suffers from drawbacks
Virtual CPUs – Physical CPU Mapping
Virtual Machines Allocation
Virtual CPUs –Virtual
Machines configuration
Motivation #01
Virtualized Environment
MS THESIS DEFENSE Hafiz ur Rahman14 of 37
• There are a variety of vendors for the virtualization environment
• When applying virtualization technology to an infrastructure environment, which hypervisor among others is
better and faster in terms of CPU utilization?
pCPU pCPU pCPU pCPU
Virtual Machine Monitor…
…
• All virtualization vendors claim that their virtualization hypervisor is the best, however they depend on the
used application
Motivation #02
Virtualized Environment
MS THESIS DEFENSE Hafiz ur Rahman15 of 37
• Researchers evaluate and analyze hypervisors without investigating the best vCPU-VM configuration and
vCPU – pCPU mapping through which better CPU utilization and performance for each hypervisor can be
expected
• They assigned vCPU toVM based on non-suitable configuration
vCPU1vCPU1
vCPU2
vCPU1
vCPU2
pCPU pCPU pCPU pCPU
Virtual Machine Monitor…
…
VMnVM1 VM2
…
…VM2
vCPU3 vCPU3
vCPU2
vCPU1
vCPU4Prior to deploying VM in a cloud
environment, which vCPU –VM
configuration is the best to
improve CPU utilization?
Motivation #03
After VM deployment, which vCPU-
pCPU pinning strategies is the best
to improve CPU utilization?
Virtualized Environment
MS THESIS DEFENSE Hafiz ur Rahman16 of 37
Research Objectives
MS THESIS DEFENSE Hafiz ur Rahman17 of 37
Work Hypervisor Used ArchitectureVirtualization
Type
Benchmarking
Tool
Hypervisor
Comparison
vCPU-VM
Configuration vCPU-pCPU Mapping
Hwang et al. [1]
VMware EXSi,
Hyper-V2008,
KVM 2.6, Xen
CMP HAVRamspeed,
Netperf√ Randomly Randomly
S. Varette et al, [14]
Hyper-V, KVM,
VirtualBox,
VMware
CMPFV,
HAVHPL √ Randomly Randomly
Mancas [33] Vmware, KVM Not Mention Not Mention Passmask √ Randomly Randomly
Literature Review
√ : Authors compared different hypervisors
Babu et al [35]OpenVZ,
XenServer, XenSMP
Container,
PV, FVUnixbench √ Randomly Randomly
Charles David [31]KVM (RHEL 5),
Xen 3.1.2SMP
HAV,
PVPTS √ Randomly Randomly
Zong et al. [16] Xen 3.4.0 SMP PVApache
TPC-H* Randomly Not Randomly
Kourai et al, [10] Xen 4.4.03 SMP PV Tascell * Not Randomly Randomly
Sogand et al. [11] VMware EXSi 5.5 NUMA Unknown
Vcenter
Performace,
SSH + Sar
* Not Randomly Randomly
MS THESIS DEFENSE Hafiz ur Rahman18 of 37
Present Research
Objectives
Conduct Literature
Review
Select Appropriate Approach to
achieve objectives
Conduct Performance Evaluation
Collect DataAnalyze and Conclude
Proposed Methodology
MS THESIS DEFENSE Hafiz ur Rahman19 of 37
Proposed Methodology Architecture
MS THESIS DEFENSE Hafiz ur Rahman20 of 37
➢ N-Queens problem is a classical
combinatorial problem, that have
different workloads
➢ The problem involves placing N queens
on an N x N chessboard such that no
queen can attack any other
➢ A solution requires that no two queens
share the same row, column, or diagonal
➢ As the problem size increases, the
corresponding possible solutions and
the elapsed time to solve the problem
is also increasing
➢ We tested each hypervisor for different
queens size ranges from 4 to 19
➢ For a regular-sized board (8 x 8), there
are 92 distinct solutions,
Experimental Design
MS THESIS DEFENSE Hafiz ur Rahman21 of 37
Experimental Design
MS THESIS DEFENSE Hafiz ur Rahman22 of 37
For the clarity of presentation, the Results and Discussion is divided into five sections:
Results and Discussion
(1) The Effect of Virtualization Technology on Performance
Regular System
Hypervisor#01
Hypervisor#02
(2) The Effect of Virtual Machines on
Performance
Under Allocation
Balance Allocation
Over Allocation
(3) The Effect of Virtual CPUs on
Performance
Under Allocation
Balance Allocation
Over Allocation
(4) The Significance of Over Allocation on Performance
Uniform Configuration
Un-uniform Configuration
(5) The Effect of Pinning Strategies on
Performance
Pinning Strategy
No Pinning Strategy
MS THESIS DEFENSE Hafiz ur Rahman23 of 37
Results and Discussion
1. The Effect of Virtualization Technology
Hardware
Ubuntu
Low High
M
Hardware
Citrix XenServer
Ubuntu
Low High
M
Regular System Virtualized Environment
Hardware
KVM
Ubuntu
Low High
M
Virtualized Environment
MS THESIS DEFENSE Hafiz ur Rahman24 of 37
Results and Discussion
The effect of Virtualization Layer using N-Queens benchmark
1. The Effect of Virtualization Technology
N-Queens problem with elapsed time (second)
MS THESIS DEFENSE Hafiz ur Rahman25 of 37
Results and Discussion
The effect of Virtualization Layer using John-the-Ripper benchmark
1. The Effect of Virtualization Technology
E: The maximum error with one degree of confidence,
(alpha): using two tail distribution,
s: standard deviation,
n: number of samples
MS THESIS DEFENSE Hafiz ur Rahman26 of 37
Results and Discussion
2. The Effect of Virtual Machines on Performance
The Effect of Virtual Machines on Performance
Under Allocation
Over Allocation
Balance Allocation
MS THESIS DEFENSE Hafiz ur Rahman27 of 37
Virtual Machine Monitor
VM#1
vCPU1
vCPU3
pCPU1 pCPU2 pCPU3 pCPU4
VM#1
vCPU5
vCPU7
pCPU5 pCPU6 pCPU7 pCPU8 pCPU9 pCPU10 pCPU11 pCPU12
pCPU13 pCPU14 pCPU15 pCPU16 pCPU17 pCPU18 pCPU19 pCPU20 pCPU21 pCPU22 pCPU23 pCPU24
vCPU2
vCPU4
vCPU6
vCPU8
vCPU9
vCPU11
vCPU13
vCPU15
vCPU10
vCPU12
vCPU14
vCPU16
VM#2
vCPU1
vCPU2
vCPU3
vCPU4
vCPU5
vCPU6
vCPU7
vCPU8
vCPU1
vCPU2
vCPU3
vCPU4
vCPU5
vCPU6
vCPU7
vCPU8
VM#1 VM#2
VM#3 VM#4
vCPU1
vCPU2
vCPU3
vCPU4
vCPU1
vCPU2
vCPU3
vCPU4
VM#1 VM#2
VM#5 VM#6
VM#3 VM#4
VM#7 VM#8
vCPU1
vCPU2
vCPU1
vCPU2
vCPU1
vCPU2
vCPU1
vCPU2
Results and Discussion
2. The Effect of Virtual Machines on Performance <<< Under Allocation >>>
Virtualized Environment
MS THESIS DEFENSE Hafiz ur Rahman28 of 37
Results and Discussion
The effect of Virtual Machines on Performance - Under Allocation
2. The Effect of Virtual Machines on Performance <<< Under Allocation >>>
MS THESIS DEFENSE Hafiz ur Rahman29 of 37
Results and Discussion
The effect of Virtual Machines on Performance - Balance Allocation
2. The Effect of Virtual Machines on Performance << Balance Allocation >>
MS THESIS DEFENSE Hafiz ur Rahman30 of 37
Results and Discussion
2. The Effect of Virtual Machines on Performance << Balance Allocation >>
Linear Regression model for Balance Allocation
MS THESIS DEFENSE Hafiz ur Rahman31 of 37
Results and Discussion
The effect of Virtual Machines on Performance - Over Allocation
2. The Effect of Virtual Machines on Performance < Over Allocation >
MS THESIS DEFENSE Hafiz ur Rahman32 of 37
Results and Discussion
The effect of Virtual Machines on Performance: Interval Plot of Elapsed time (sec) for Citrix XenServer and KVM Hypervisors (Problem Size: 19)
2. The Effect of Virtual Machines on Performance < Comparison >
MS THESIS DEFENSE Hafiz ur Rahman33 of 37
Results and Discussion
The effect of Virtual Machines on Performance (Under allocation, Balance Allocation, and Over allocation comparison)
2. The Effect of Virtual Machines on Performance < Comparison >
MS THESIS DEFENSE Hafiz ur Rahman34 of 37
Results and Discussion
The effect of Virtual CPUs on Performance - KVM Total CPU Utilization Hypervisor Level - KVM
The effect of Virtual CPUs on Performance - Citrix XenServer Total CPU Utilization Hypervisor Level - Citrix XenServer
3. The Effect of Virtual CPUs on Performance (Comparison)
MS THESIS DEFENSE Hafiz ur Rahman35 of 37
Results and Discussion
pCPU19 pCPU20 pCPU21 pCPU22 pCPU23 pCPU24
pCPU13 pCPU14 pCPU15 pCPU16 pCPU17 pCPU18
pCPU7 pCPU8 pCPU9 pCPU10 pCPU11 pCPU12
pCPU1 pCPU2 pCPU3 pCPU4 pCPU5 pCPU6
Virtual Machine Monitor
VM#1
vCPU1
vCPU3
vCPU5
vCPU7
vCPU2
vCPU4
vCPU6
vCPU8
vCPU9
vCPU11
vCPU10
vCPU12
Virtualized Environment
VM#2
vCPU13
vCPU15
vCPU17
vCPU19
vCPU14
vCPU16
vCPU18
vCPU20
vCPU21
vCPU23
vCPU22
vCPU24
pCPU19 pCPU20 pCPU21 pCPU22 pCPU23 pCPU24
pCPU13 pCPU14 pCPU15 pCPU16 pCPU17 pCPU18
pCPU7 pCPU8 pCPU9 pCPU10 pCPU11 pCPU12
pCPU1 pCPU2 pCPU3 pCPU4 pCPU5 pCPU6
Virtual Machine Monitor
VM#1
vCPU1
vCPU3
vCPU5
vCPU7
vCPU2
vCPU4
vCPU6
vCPU8
vCPU9
vCPU11
vCPU10
vCPU12
Virtualized Environment
4. The Significance of Over Allocation and Pinning
Strategies
MS THESIS DEFENSE Hafiz ur Rahman36 of 37
Results and Discussion
pCPU19 pCPU20 pCPU21 pCPU22 pCPU23 pCPU24
pCPU13 pCPU14 pCPU15 pCPU16 pCPU17 pCPU18
pCPU7 pCPU8 pCPU9 pCPU10 pCPU11 pCPU12
pCPU1 pCPU2 pCPU3 pCPU4 pCPU5 pCPU6
Virtual Machine Monitor
VM#1
vCPU1
vCPU3
vCPU5
vCPU7
vCPU2
vCPU4
vCPU6
vCPU8
vCPU9
vCPU11
vCPU10
vCPU12
Virtualized Environment
VM#2
vCPU13
vCPU15
vCPU17
vCPU19
vCPU14
vCPU16
vCPU18
vCPU20
vCPU21
vCPU23
vCPU22
vCPU24
pCPU19 pCPU20 pCPU21 pCPU22 pCPU23 pCPU24
pCPU13 pCPU14 pCPU15 pCPU16 pCPU17 pCPU18
pCPU7 pCPU8 pCPU9 pCPU10 pCPU11 pCPU12
pCPU1 pCPU2 pCPU3 pCPU4 pCPU5 pCPU6
Virtual Machine Monitor
VM#1
vCPU1
vCPU3
vCPU5
vCPU7
vCPU2
vCPU4
vCPU6
vCPU8
vCPU9
vCPU11
vCPU10
vCPU12
Virtualized Environment
vCPU47 vCPU47 vCPU47 vCPU48 vCPU47 vCPU48
: : : : : : : : : : : : : : : : : :
4. The Significance of Over Allocation and Pinning
Strategies
MS THESIS DEFENSE Hafiz ur Rahman37 of 37
Results and Discussion
4. The Significance of Over Allocation and Pinning
Strategies
The effect of Virtual CPUs on Performance - Uniform vCPUs per VMs
The effect of Virtual CPUs on Performance - Non-uniform vCPUs per VMs
CPU Utilization for uniform vCPUs
CPU Utilization for non-uniform vCPUs
MS THESIS DEFENSE Hafiz ur Rahman38 of 37
Results and Discussion
The Effect of Hypervisors, Virtual Machines and Virtual CPUs on Performance
(Concluding Remarks)
Mean Elapsed time of Hypervisors, VMs, and vCPUs
MS THESIS DEFENSE Hafiz ur Rahman39 of 37
Results and Discussion
Normal distribution of Elapsed Time (sec), uniformed vCPU allocation
The Effect of Pinning Strategies on Performance
(Concluding Remarks)
F i r s t S c e n a r i o
Normal distribution of Elapsed Time (sec), un-uniformed vCPU allocation
S e c o n d S c e n a r i o
MS THESIS DEFENSE Hafiz ur Rahman40 of 37
Using CPU-bound operations, the results obtained from this evaluation showed that
commercial (Citrix Xenserver) and opensource (KVM) hypervisors showed similar performance
in terms of elapsed time and CPU utilization
The performance of a system would degrade by running many VMs, improper allocation of
vCPUs to VMs, or using unsuitable vCPUs - pCPUs pinning strategies
The elapsed time increases, when there is a massive over allocation of vCPUs
The best performance (elapsed time) was gained when there was only few active VMs with
balance allocation and over allocation (over allocation using no pinning strategies)
Pinning and no pinning strategies have no effect on under allocation and balance allocation of
vCPUs-VMs or overallocation having same workload is running on each VM
Conclusion and Future Work
MS THESIS DEFENSE Hafiz ur Rahman41 of 37
CPU utilization during live migration of VMs from one host to another is one of the
future directions for this work
The obtained results from our evaluation experiments can be validated by
comparing using other commercial hypervisors (VMware and Hyper V). This will aid
the cloud service providers in choosing the best cloud platform
CPU utilization for I/O bound operations has not been investigated
We suggested that the cloud service providers and researchers should consider the
effects of massive over allocation of vCPUs, VMs, and vCPUs-pCPUs mapping when
they choose deployment strategies for vCPUs-VMs configuration and vCPU-pCPU
mapping
Conclusion and Future Work
MS THESIS DEFENSE Hafiz ur Rahman42 of 37
I would like to acknowledge the support provided by
King Fahd University of Petroleum and Minerals (KFUPM)
Information & Computer Science Department
Acknowledgements
My Advisor: Dr. Farag Azzedin
Committee Members: Dr. Mahmood Khan & Dr. Salahdin Adam
All friends in KFUPM
Thank You !
MS THESIS DEFENSE Hafiz ur Rahman43 of 37
MS THESIS DEFENSE Hafiz ur Rahman44 of 37
MS THESIS DEFENSE Hafiz ur Rahman45 of 37
Results and Discussion
The effect of Virtual CPUs on Performance - Citrix XenServer
3. The Effect of Virtual CPUs on Performance (Citrix XenServer)
MS THESIS DEFENSE Hafiz ur Rahman46 of 37
Results and Discussion
Total CPU Utilization Hypervisor Level - Citrix XenServer
3. The Effect of Virtual CPUs on Performance (Citrix XenServer)
MS THESIS DEFENSE Hafiz ur Rahman47 of 37
Results and Discussion
The effect of Virtual CPUs on Performance - KVM
3. The Effect of Virtual CPUs on Performance (KVM)
MS THESIS DEFENSE Hafiz ur Rahman48 of 37
Results and Discussion
Total CPU Utilization Hypervisor Level - KVM
3. The Effect of Virtual CPUs on Performance (KVM)
MS THESIS DEFENSE Hafiz ur Rahman49 of 37
Results and Discussion
4. (a) The Significance of Over Allocation << Uniform vCPUs per VMs >>
The effect of Virtual CPUs on Performance - Uniform vCPUs per VMs CPU Utilization for uniform vCPUs
• No Pinning strategy: The hypervisor is free to schedule domain’s vCPUs on any pCPUs
• Pinning strategy: The hypervisor is free to schedule the Dom0 vCPUs on any pCPUs and other active VMs’ vCPUs are statically pinned to user define logical CPUs
• Both strategies have no effect on under allocation and balance allocation of vCPUs-VMs
F i r s t S c e n a r i o
MS THESIS DEFENSE Hafiz ur Rahman50 of 37
Results and Discussion
The effect of Virtual CPUs on Performance - Non-uniform vCPUs per VMs CPU Utilization for non-uniform vCPUs
4. (b) The Significance of Over Allocation << Un-uniform vCPUs per VMs >>
S e c o n d S c e n a r i o
MS THESIS DEFENSE Hafiz ur Rahman51 of 37
Results and Discussion
Elapsed time to solve N-Queen Problem using Citrix XenServer
MS THESIS DEFENSE Hafiz ur Rahman52 of 37
Results and Discussion
Elapsed time to solve N-Queen Problem using KVM
MS THESIS DEFENSE Hafiz ur Rahman53 of 37
Types of Hypervisor
MS THESIS DEFENSE Hafiz ur Rahman54 of 37
MS THESIS DEFENSE Hafiz ur Rahman59 of 37
CMPs use relatively simple single-thread processor cores to
exploit only moderate amounts of parallelism within any one
thread, while executing multiple threads in parallel across
multiple processor cores.
SMP - Symmetric multiprocessing - the case where two or more
processors (identical or non-identical) are connected via an
interconnect and have equal access to all other system resources
like memory, IO ports, etc. ...
MS THESIS DEFENSE Hafiz ur Rahman60 of 37
NUMA
NUMA - Non-uniform memory access - the case where in an SMP system the processors are not equi-distant from the shared system memory. i.e., a processor may be physically at varying distances from a given set of memory regions.
MS THESIS DEFENSE Hafiz ur Rahman61 of 37
The cloud service provider assigns resources to each user
request aiming to minimize resource allocation and fulfill
user requirements