Cloud Computing 25 min read

Introduction to Cloud Computing and KVM Virtualization: Concepts, Service Models, and Practical Setup

This article provides a comprehensive overview of cloud computing fundamentals, public/private/hybrid cloud models, SaaS/PaaS/IaaS service layers, virtualization concepts, full and paravirtualization, and detailed step‑by‑step KVM installation, configuration, and performance optimization techniques on Linux.

Architecture Digest
Architecture Digest
Architecture Digest
Introduction to Cloud Computing and KVM Virtualization: Concepts, Service Models, and Practical Setup

Cloud computing is a pay‑as‑you‑go model that offers on‑demand, network‑accessible shared pools of compute, storage, networking, and services, requiring minimal management effort.

Characteristics and Advantages

It is usage‑based, accessed over the network, and provides elastic resources with on‑demand scaling.

Pre‑cloud Models

Before cloud computing, common approaches included IDC hosting, IDC leasing, virtual hosting, and VPS, each with limited flexibility and resource utilization.

Problems with Traditional Data Centers

Traditional data centers suffer from low resource utilization (often <15% CPU usage), inefficient allocation, and difficulty achieving true operational automation.

Three‑Layer Cloud Service Model

Infrastructure as a Service (IaaS) provides raw compute, storage, and networking; Platform as a Service (PaaS) offers development runtimes, databases, and messaging; Software as a Service (SaaS) delivers complete applications to end users.

Public, Private, and Hybrid Clouds

Public clouds (e.g., AWS, Alibaba Cloud) are shared, low‑cost, and accessed via the Internet. Private clouds are dedicated to a single organization, offering greater control and security. Hybrid clouds combine both to balance cost, security, and scalability.

Virtualization Overview

Virtualization abstracts physical hardware, allowing multiple independent operating systems to run on a single host. It supports heterogeneous OSes, snapshots, and cloning.

Full vs. Paravirtualization

Full virtualization uses a hypervisor (type‑1 or type‑2) to emulate hardware, requiring no guest OS modifications. Paravirtualization modifies the guest OS to call a specialized API, reducing overhead but limiting OS compatibility.

KVM Features and Installation

KVM is a kernel‑integrated hypervisor offering high compatibility, code‑level resource calls, process‑based VMs, NUMA support, and active community development.

Key installation commands (preserved as code):

[root@chuck~]# yum install qemu-kvm qemu-kvm-tools virt-manager libvirt -y
[root@chuck~]# qemu-img create -f raw /opt/CentOS-7.1-x86_64.raw 10G
[root@chuck~]# virsh start CentOS-7.1-x86_64

VM management commands include virsh list, virsh dumpxml, virsh shutdown, virsh destroy, and virsh undefine.

CPU Optimization

Binding KVM processes to specific CPUs (using taskset) reduces cache misses and can improve performance by over 20%.

Memory Optimization

Modern CPUs use Extended Page Tables (EPT) or Rapid Virtualization Indexing (RVI) to accelerate memory virtualization. KSM merges duplicate pages, and Transparent HugePages increase page size to 2 MiB, reducing overhead.

Disk I/O Optimization

Linux supports several I/O schedulers (noop, deadline, cfq). Changing the scheduler (e.g., echo cfq > /sys/block/sda/queue/scheduler) and making it permanent via kernel parameters can tailor performance for SSDs or database workloads.

Cache Write Policies

Write‑back caches improve performance but risk data loss on power failure; write‑through ensures data safety at the cost of speed. RAID controllers may use battery‑backed units (BBU) to mitigate this risk.

The article concludes with best‑practice guidelines for creating lightweight VM images, disabling swap, removing persistent network rules, and installing essential tools such as net‑tools, lrzsz, screen, tree, vim, and wget.

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

Performance OptimizationLinuxVirtualizationIaaSKVM
Architecture Digest
Written by

Architecture Digest

Focusing on Java backend development, covering application architecture from top-tier internet companies (high availability, high performance, high stability), big data, machine learning, Java architecture, and other popular fields.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.