1/16
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced |
---|
No study sessions yet.
Server Virtualization
The hypervisor, is a low-level program that allocates hardware resources such as CPU, memory, hard-disk, etc. to the VMs (guests) in real time.
Type 1 Hypervisor
Referred to as “bare metal”
Efficient and scalable
Secure
Used in production environments
Examples: VMware, ESX/ESXi, Microsoft Hyper-V, Xen releases
Does not include operating system
Type 2 Hypervisor
Latency issues
Great for personal or development purposes
Examples: VMware, Workstation/Fusion/Player, Oracle Virtualbox
Does include an operating system
Why use Server Virtualization?
Underutilized Hardware
Traditional data centers plan and provision servers to handle peak loads. But, workloads change throughout the day, week, month, and year.
Server utilizalization is around 5-10%
High Data center Space Costs
Physical servers housed in the data centers consume space (even when idle)
High Energy Costs
Power and cooling costs money
High Costs of IT operations
Installation, patching, upgrades
Demand fluctuates over time
Benefits of Virtualization
Server consolidation reduces the data center footprint and lowers energy costs, cost of IT operations, etc, i.e., reduces TCO
Virtualization improves utilization rates to 70-80%
Rapid elastic compute capacity - VMs can be launched quickly
High availability
Minimized downtime
Example: Instead of running 150 physical servers, you can run 150 VMs on 15 physical servers
Planning for Virtual Machines
What is overcommitment? - Assigning more resources to VMs than available physical resources on the host
A physical server may run diverse applications with different requirements
Critical Components - Compute (CPU), memroy (RAM), and disk space
It is a common practice to overprovision these resources to maximize the workloads (applications) on a host
Choosing not to overprovision is safe but wasteful. Too much overcommitment
CPU
Processing power is assigned to virtual machine as virtual CPUS (vCPUs). The vCPUs are allocated from the host’s available physical CPUs (pCPUs).
Guidelines for CPU overcommitment:
Overcommitment ratio (vCPU to pCPU) should be determined based on the type of workloads you are running. A higher ratio is not recommended if the host is running all workloads that are process-intensive.
It is safe to maintain an overcommitment ratio of 3:1 i.e., each pCPU supports three vCPUs.
Close monitoring of metrics becomes important for higher ratios such as 4:1 or 6:1
Memory
Over commitment ratio is 1.25:1 is safe
Following measures are useful to maximize the use of RAm
Memory Ballooning
The hypervisor reclaims memory from other VMs
Places all the loaned memory pages into a balloon that is made available to the VM that urgently needs it
Transparent Page Sharing
Deduplication technique, minimal performance impact
Memory Compression
Memory pages are compressed and placed into a compression cache on disk. When needed, a page is retrieved from the cache and uncompressed. Some performance impact.
Swapping or Paging to Disk
When insufficient memory is available, the hypervisor will dump data from memory to a page file on the hard disk. Retrieval from disk is slow regarding the overall performance.
Used as a last resort.
Storage
A virtual disk is utilized by a virtual machine to store the operating system, application software, and other files that it needs
There are two ways virtual disks can be provisioned to virtual machines
Thick (Fixed) Provisioning - The size is specified and pre-allocated during creation
Thin (Dynamic) Provisioning - Starts small, additional chunks are allocated as needed
Thin provisioning has shown to have negligible impact on performance and is the widely accepted method for overcommitting storage
Virtual Machine Cloning
“Copy” or “replica” of an existing VM
The existing VM is called the parent and the new VM is the clone
There are two types of clones: full and linked. A linked clone shares virtual disks with the parent, and a full clone creates its own. A full clone has faster performance but takes longer to create.
Cloning allows faster deployment of identical VMs to a group.
Use Case: Setting up a development or a testing environment
Virtual Machine Snapshots
Captures the state of a VM at the specific time when the snapshot is taken
What is contained in a snapshot?
State of the VM’s disks
Contents of the VM’s memory
VM settings
Can be taken when a machine is running, powered off, or suspended
Best practice: Take a snapshot before a major software installation or maintenance task. In case of failure or issues, the machine can be restored back to its 'previous’ state in a short time
What is a container?
A __________ is a unit of software that packages all its code and dependencies so that the application runs consistently in any environment.
A runtime engine such as docker enables all containers on a host to share the host OS kernel.
A container has a docker engine that allows for containers on top of the host
No operating systems in their containers, they share it with the kernel
Virtual Machines vs. Containers
VMs
Each VM runs in its own OS
Heavyweight (several GBs in size)
Hardware-level virtualization
Startup time in minutes
Fully isolated and hence more secure
Containers
All containers share the host OS
Lightweight (tens of MBs in size)
OS virtualization
Startup time in milliseconds
Possibly less secure
Monolith vs. Microservices-based Application
Monolith:
Has to go sequentially
Coupled together
Micro-serviced:
Removes any dependencies from each other and each business function now runs as a separate service
Run through API calls
Benefits: Can assign multiple teams and work on one service, can be done in different languages,
What are Microservices?
Common to cloud-native applications
A microservice-based application is composed of multiple loosely coupled and independently deployable components called as “Services”.
Services are deployed over containers
Challenges:
Intro to Serverless Computing
Serverless means that cloud consumers are free from the administrative burden of provisioning and managing servers as that responsibility is handled by the CSPs.
AWS Example: AWS Lambda
Application developers write code to AWS lambda and do not have to worry about the infrastructure or scale required for the application. A multitude of programming languages such as Java, Python, Ruby, etc, are supported.
Serverless applications are triggered by events.
You only pay for compute when your code runs
Benefits: Lower costs, increase in productivity, better operational efficiency and simplified management