Unit 2: Virtualization and capacity planning
Cloud Computing notes · PTU syllabus (UGCA1936)
On this page
Unit summary
Virtualization is the technology that lets one physical computer behave as many separate computers, and it is what makes the cloud efficient and elastic. This unit covers the characteristics and types of virtualization, its pros and cons, the leading hypervisors, and then capacity planning: how to measure demand, set a baseline and scale resources up and down.
After this unit you can
- Explain virtualization and the characteristics of a virtualized environment
- Describe the taxonomy of virtualization techniques and how virtualization supports the cloud
- Compare the Xen, VMware and Microsoft Hyper-V hypervisors
- Explain capacity planning, baselines, load testing, resource ceilings and scaling, and distinguish elasticity from scalability
PTU syllabus topics
- Characteristics of virtualized environments
- taxonomy of virtualization techniques
- virtualization and cloud computing
- pros and cons
- hypervisors (Xen, VMware, Microsoft Hyper-V)
- elasticity vs scalability
- baselines and metrics
- system metrics
- load testing
- resource ceilings
- server and instance types
- network capacity and scaling
Topic 1
Introduction to virtualization
Virtualization creates a virtual version of a resource, such as a server, storage device or network, so that several virtual machines (VMs) can share one physical machine, each with its own operating system and applications. The software that does this is the hypervisor or virtual machine monitor.
Servers
One application per physical server
Many VMs on one physical server
Utilisation
Often 10 to 15 percent
Often 60 percent or more
Provisioning
Days or weeks to buy and install
Minutes by cloning a VM
Failure
A hardware fault stops the application
A VM can be moved to another host
Example
Server consolidation: a college runs 10 servers, each only 10 percent busy. With virtualization, 10 VMs run on two hosts at about 50 percent load, saving hardware, power, cooling and space.
Topic 2
Characteristics of a virtualized environment
- Increased security
- The guest runs isolated from the host, so a problem in one VM does not reach others
- Managed execution
- Sharing, aggregation, emulation and isolation of resources
- Portability
- A VM is saved as files, so it can be copied and moved between hosts
- Sharing: many guests use the same host resources.
- Aggregation: many hosts are pooled to look like one large resource.
- Emulation: a guest runs on hardware different from the real one.
- Isolation: each guest sees only its own virtual resources.
Topic 3
Taxonomy of virtualization techniques
Execution virtualization
Process level (application virtual machines such as the JVM) and system level (hypervisors)
Storage virtualization
Many physical disks appear as one pool
Network virtualization
Virtual LANs and virtual switches
Desktop virtualization
A desktop runs on a server and is shown on the user's device
Application and server virtualization
Applications or servers separated from the hardware they run on
At the system level there are three ways to virtualize hardware:
- Full virtualization: the guest OS runs unmodified and does not know it is virtual.
- Paravirtualization: the guest OS is modified to talk to the hypervisor directly, which is faster.
- Hardware-assisted virtualization: processor features such as Intel VT-x and AMD-V help the hypervisor.
Topic 4
Virtualization and cloud computing
Virtualization is the foundation of IaaS. The provider runs thousands of hosts, and each customer VM is created from an image in minutes. It enables resource pooling, elasticity (start and stop VMs as needed), multi-tenancy (many customers on one host in isolation) and live migration (moving a running VM to another host). Pros: better hardware use, lower cost, quick provisioning, isolation, easy backup and snapshots, and simple disaster recovery. Cons: the hypervisor adds a small performance overhead, one host failure affects many VMs, resource contention between VMs, licensing and management complexity, and a hypervisor attack is serious.
Topic 5
Hypervisor technology examples
Runs on
Directly on the hardware
On a host operating system
Performance
High
Lower
Examples
Xen, VMware ESXi, Microsoft Hyper-V
VMware Workstation, Oracle VirtualBox
Typical use
Data centres and clouds
Desktops, labs and learning
- Xen: an open-source Type 1 hypervisor. A privileged control domain (Dom0) manages the unprivileged guests (DomU). It pioneered paravirtualization and underpins early Amazon EC2.
- VMware: a family of products, with ESXi as the Type 1 hypervisor, vSphere for management, vMotion for live migration and Workstation for desktops.
- Microsoft Hyper-V: a Type 1 hypervisor built into Windows Server, supporting live migration and used by Azure.
Topic 6
Capacity planning
Capacity planning is estimating the resources an application will need so that performance stays acceptable without paying for unused capacity.
- Elasticity vs scalability: scalability is the ability of a system to handle growth by adding resources; elasticity is doing so automatically and quickly, in both directions, as demand rises and falls.
- Defining a baseline: measure the system under normal load to record what is typical. Without a baseline you cannot tell whether a number is good or bad.
- System metrics: CPU utilisation, memory use, disk input and output, network throughput, and response time.
- Load testing: simulate many users to find how the system behaves as load grows.
- Resource ceilings: the maximum a resource can deliver, such as the top bandwidth of a network link or the CPU limit of an instance. When one ceiling is hit, that resource is the bottleneck.
- Server and instance types: providers offer general-purpose, compute-optimised, memory-optimised and storage-optimised instances; choose by workload.
- Network capacity: check bandwidth and latency between users, servers and storage, because a fast server behind a slow link is still slow.
Method
Move to a bigger machine with more CPU or RAM
Add more machines behind a load balancer
Limit
Hardware ceiling and needs a restart
Almost unlimited
Failure
Single point of failure
Failure of one node is tolerated
Best for
Databases and quick fixes
Web servers and cloud-native applications
Example
Sizing a web server: the baseline shows one server handles 200 requests per second at 60 percent CPU. A load test shows it fails at 330 requests per second (the ceiling). Exam week is forecast at 1,500 requests per second. Keeping 25 percent headroom means planning for 1,500 ÷ 0.75 = 2,000 requests per second. At 200 per server, horizontal scaling needs 2,000 ÷ 200 = 10 servers, added by auto scaling only for that week.
Exam tip
Remember the order for capacity planning: measure baseline, load test, find ceilings, forecast demand, choose the scaling approach.
Key terms
- Virtualization
- Creating virtual versions of hardware resources so many VMs share one machine
- Hypervisor
- Software that creates and manages virtual machines
- Paravirtualization
- Virtualization with a modified guest OS that cooperates with the hypervisor
- Elasticity
- Automatically scaling resources up and down with demand
- Baseline
- The measured normal behaviour of a system
- Resource ceiling
- The maximum a resource can deliver
- Horizontal scaling
- Adding more machines to share the load
Quick revision
- Characteristics: increased security, managed execution (sharing, aggregation, emulation, isolation), portability.
- Types of system virtualization: full, para and hardware-assisted.
- Type 1 hypervisors run on hardware (Xen, ESXi, Hyper-V); Type 2 run on an OS (Workstation, VirtualBox).
- Scalability is capacity to grow; elasticity is automatic growth and shrinking.
- Vertical = bigger machine; horizontal = more machines.
Important exam questions
Practice questions written to the PTU exam pattern for this unit's syllabus: short answers (Section A style) and long answers (Sections B and C style).
Short-answer questions
- Q1.What is virtualization?
- Q2.What is a hypervisor?
- Q3.Differentiate Type 1 and Type 2 hypervisors.
- Q4.What is paravirtualization?
- Q5.Define elasticity and scalability.
- Q6.What is a resource ceiling?
- Q7.What is the purpose of a baseline?
Long-answer questions
- Q1.Explain the characteristics of a virtualized environment.
- Q2.Explain the taxonomy of virtualization techniques.
- Q3.Discuss the pros and cons of virtualization and its role in cloud computing.
- Q4.Compare the Xen, VMware and Microsoft Hyper-V hypervisors.
- Q5.Explain capacity planning with baseline measurements, system metrics, load testing and scaling.
- Q6.Differentiate between elasticity and scalability, and vertical and horizontal scaling.
Stuck on this unit?
Message SBS on WhatsApp for help with Cloud Computing, or to ask about studying BCA at Synetic.
