Basic principles of Virtualization Technology
Disk:
IO Scheduler
CFQ
Deadline
Anticipatory
NOOP
/ sys/block//queue/scheduler
Memory:
MMU two kinds of memory chips
TLB
Vm.swapiness= (0.. 100); propensity to use swap partitions, 60
Overcommit_memory: overuse
Overcommit_ratio
Make full use of physical memory:
1. Swap is as big as RAM, swappiness=0
2 、 overcommit_memory=2, overcommit_ratio=100, swappiness=0
Tcp_max_tw_buckets: turn it up
Tw: number of connections
Established-- > tw
Sar, dstat, vmstat, mpstat, iostat, top, free, iotop, uptime, cat / proc/meminfo, ss, netstat, lsof, time, perf, strace, blktrace, blkparse, btt
Dd, iozone, io-stress, fio
Look at the physical hardware from the perspective of each OS:
CPU: full CPU time slice
Memory: continuous, all memory space (0x0000)
IO: all available IO
Hypervisor Virtualization Software
Virtualized network model:
Bridging
NAT
HOST Only
CPU Virtualization:
CPU instruction set:
General instruction
Special instruction (sensitive instruction)
Some x86 sensitive instructions cannot be virtualized
Basic conditions that virtualization software needs to meet:
CPU hardware Virtualization Technology:
Intel VT-x
AMD AMD-V
Memory Virtualization:
VA without Virtualization-- > PA
VA-- > PA VA-- > HA shadow MMU Intel EPT AMD NPT when there is virtualization
TLB: hardware chip
Full-Virtualization: fully virtualized HVM (Hardware-asistant VM)
Para-virtualization: paravirtualized PV
Integration of PV and HVM
PV on HVM:
IO Virtualization:
QEMU
PV
IO requires high performance and can be transmitted through IO.
Practical operation: compatibility list
Xen Virtualization Architecture
Xen only manages CPU, Memory, interrupt
Qemu: virtualization tool, can also cross-platform virtual CPU is X86 can simulate PowerPC, ARM platform
Xend/xm
Redhat virsh
Openstack
KVM Virtualization Kernel-based Virtual Machine
KVM: kernel module Kernel-- > Hypervisor
The performance of KVM using CPU is better than CPU simulated by Qemu.
KVM can only run on 64-bit operating systems and must run on CPU-assisted virtualization.
KVM is an Israeli company acquired by redhat
Xen is developed by the University of Cambridge and acquired by Citrix.
KVM:virtio (PV IO)
Container: containers are less isolated and perform much better than virtual machines
Simulating .netframework in wine linux environment
Cywin windows environment simulates linux environment
Virtualization technology:
Motherboard chipset:
Intel: IOMMU
AMD:
The virtualization technology of X86 platform is more and more simple and mature.
Intel VT-x 、 EPT 、 IOMMU
The network model is complicated.