博威---云架构决胜云计算

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 7295|回复: 0

读VMware与KVM的虚拟化性能比较后感

[复制链接]
发表于 2020-4-27 07:47:51 | 显示全部楼层 |阅读模式
读VMware与KVM的虚拟化性能比较后感

分类: 信息化

2013-09-27 18:05:50




这篇论文是OSLO 大学网络与系统管理专业的学生研究的课题,这篇论文只是针对目前存在的两大虚拟化产品VMwareKVM的性能进行了比较,目录结构由五部分组成:

第一章: 陈述了目前虚拟化存在的问题

第二章: 介绍了虚拟化的发展历史及分类,VMwarekvm的优缺点

第三章:介绍了几种测试性能的可用的benchmark 工具

第四章:在指定的硬件和工具的情况下,实现性能的测试

第五章:由第四章的实验得到了一些数据图表,选择一部分进行分析讨论

第六章:总结性的报告


第一章: 问题的描述

随着虚拟化技术的发展,越来越多的虚拟化产品问世,如何评估哪个产品的性能更好一些,成为了研究该课题的必要条件,本文作者想从下面的内容着手研究:

1) 在物理机上安装RHEL6.1版本,测试其性能

2) VMware平台中的VM上安装RHEL6.1,测试其性能

3) Red Hat KVM平台中的VM上安装RHEL6.1,测试其性能

对于一个OS的性能测试,需要测试其CPU、内存、磁盘I/O,该文研究的目的是:
     1.    VM较物理机性能的退化
     2.    不同的虚拟化技术的性能差别
     3.     哪种操作导致虚拟化系统的性能损失

第二章 虚拟化的分类

虚拟化分为:全虚拟化和 OS-半虚拟化及硬件层虚拟化

1.    全虚拟化的架构图

虚拟化的监视器(hypervisor)是类似于用户的应用程序运行在主机的OS之上,如VMwareworkstation,这种虚拟化产品提供了虚拟的硬件如上图所示


2.OS-半虚拟化的架构图

   

OS层实现虚拟化,VM使用的是OSImage,这种虚拟化也叫SKISingle kernel Image

OS层虚拟化大部分使用web版虚拟主机,高性能计算(HPC)集群和网格计算。系统容易管理和处理这种方法,系统资源在创建vm的同时分配给一定的cpu、内存及磁盘空间,这种类型的虚拟化比服务器虚拟化更有效,但是最大的缺点是VMhostOS必须是相同的,因为它们使用的相同的内核,所以,在linuxserver上不能跑windowsVM


3.硬件层-虚拟化的架构图


硬件层的虚拟化具有高性能和隔离性,因为hypervisor直接在硬件上运行,有利于控制VMOS访问硬件资源,使用这种解决方案的产品有VMware ESXi Xen server

4.服务器虚拟化存在的问题

? The reported time by guest OS can be incorrect.

? Poor performance tolls can also be mislead.

? In-identical configuration can be caused incorrect information.

? Resource contention with other Virtual Machines.

? Consistency of results. Other approaches consider several factors that increase the overhead

第三章  benchmarking

一个用于测试计算机属性的特定技术被称为benchmarking,这些属性包括:速度、性能、传输速率等等。在benchmarking之前要选择设备,这样就可以在相同设备和工作负载的情况下进行测试,这个负载除了是工作的环境,也包括最坏的情况,因为它不是总是可用的,当巨大的数据进行复制备份时可能导致其不可用。因此,我们有必要通过执行和监视benchmarking程序来制作人工负载。

Benchmarks的分类

集中性能:只追求高性能忽略了系统的成本

集中价格或者性能:只追求低成本,忽略了系统的性能

也应该考虑系统的以下属性:

     1. 系统的架构:32bit/64bit 64-bit. x86, Itanium, POWER等
     
2. 系统的cpu数
    3. 系统配置: 多集群系统, 或单个非集群系统。
    4.  数据库的范围:100GB to many terabytes
    5.   Services Some benchmark includes the cost of 24x7 support, others factors do not support costs into the final result
   
I/O benchmark 工具
1.    FlexibleI/O
fio is a tool that will spawn a number of threads or processes doing a particular type ofI/O action as specified by the user. The typical use of fio is to write a job file matching the I/O load one wants to simulate.

2.  Bonnie++
Bonnie++ is a benchmark tool for testing hard disks and file system performances. Bonnie  is a micro benchmark, written by Bray in 1988, 1989 and 1996, which measures sequential input and output,creating and reading a file character for charac-ter, and in 8 KB chunks and random seeks, in terms of number of bytes per second, on a file .The file size is the only that is configurable, whereas all the other values are hardcoded in Bonnie. From 2000, Coker rewrite the Bonnie into Bonnie++ . Bonnie also added new features for creating and deleting files, direct I/O and benchmarking ZCAV effects. Bonnie++ is made able to use several files, for datasets larger than 2 GB

3.      Postmark
Postmark [30] is a macrobenchmark which emulates e-mail, netnews and webbase  commerce software; workloads which consists  of a large number of shortlived files. A pool of a large number of text files are created when the Postmark runs for performance measurement. Whereas different Postmark
operations include create, delete, read and write with random file selection. At the end the delete performance is measured while deleting the remaining files. Postmark configuration is quite easy and simple to run and has its own pseudo-random number generator. This has an advantage when
comparing results from different op-erating systems as it provides identical conditions across platforms . Whereas the outdated default configuration file
of Postmark does not fit for current hardware and does not scale the workload. The result comparison is difficult because lack of standard and scaling
workload. Postmark is not updated and maintained so the disadvantages are not likely to be corrected

4. Iozone
Iozone is a file system benchmark tool. The benchmark generates and measures a variety of file operations. Iozone has been ported to many machines and runs under many operating systems. Iozone  is analyzed file systems, written by Norcott, with enhancements by Capps. Iozone is quite a lot
of different operations for testing and can be used to many operating systems,including Sun Solaris and DragonFly. Iozone operations are listed in detail by Oppegaard in table

Memory benchmark 工具
1.    Bandwidth
One way to analyze the memory is bandwidth.Bandwidth can test the memory in different ways that includes sequential read and write for CPU level 1 and 2 cashes besides the main memory and video memory.Bandwidth test the performance and speed of memst, memcopy and bzero routines.Bandwidth is handy to figure out the performance related problems of memory

2. mbw(Memory Band Width)
MBW determines the "copy" memory bandwidth available to user space programs. Mbw is another memory benchmarking tool that uses two arrays in memory. Theses arrays are twice the size of physical memory that is under test. User can give the size of the array through command line to create
arrays. Then different methods includes memory copy function memcpy(), dumb copy by  element coping, and by block copy of a defined block size can be used

3.RAMSpeed
RAMSMP is tool written in C and used to benchmark cache and memory to deter-mine the bandwidth of a system’s various memory components. RAMSMP can run 18 memory intensive tests at a time and each of them measure a different aspect of the systems memory performance. These tests are
focused on testing the reading, writing and data manipulation bandwidth of memory operations on the system. Floating point and integer operations are used by this benchmark as most of the scientific applications used these data types

CPU benchmark 工具
1.CPU Free BenchMark (former CPUMark)
CPU benchmark is required to know the performance of the CPU specially in vir-tualized environment when more then one OS routines are competing for CPU. CUP Free BenchMark is open source performance measurement tool that tests the registries, ALU ( Arithmetic Logic Unit) and FPU (Floating Point Unit). All the tests are basedon some equations and operations depending upon the test.
The final score = 40% Score Test1 + 80% Score
Test2 + 80% Score Test3

2.SysBench
SysBench is an open source tool, that can be used for almost all kind of operating sys-tem and multi threaded benchmark.SysBench is made to evaluate OS parameters that are important for a system running a database under intensive load [60]. According to Kopytov SysBench is quite fast and gives system performance without configuration of database or even without database installation on the system

3.UnixBench
UnixBench was first started in 1983 at Monash University is an open source tool that provides performance of Unix systems in
various aspects of system performance specifically for CPU . UnixBench  is enabled to assess the following in table3.2:

?
the performance of the system when running a single task
? the performance of the system when running multiple tasks
? the gain from the systems implementation of parallel processing

第四章 实现方法

选择DELL R710服务器一台

Memory Size:
72 GB with speed of 1067 MHz

Hard disk

Two SCSi
disk with 140 GB each.


选择其中一块盘分别为bare metal kvm使用,另一块盘为vmwarevm使用,因为kvmRHEL6.1的内核一样,所以不需要特别指定磁盘


1)先在dell服务器的一块盘安装RHEL6.1,再安装Iozone3.3 测试磁盘 I/O, Ramspeed 2.13.1 测试内存, UnixBench 5.1.2 测试CPU,数据收集
2)在1)基础上安装
KVM,创建一个RHELvm,安装上述相同的IozoneRamspeedUnixbenchbenchmark工具,再收集数据;
3)在另一块盘上安装vmwareESXi,并创建与kvm平台中相同配置的VM,再安装上述的benchmark 工具,其中Iozone 要重复70次,Ramspeed 要重复25次,Unixbench要重复3次。
单次运行Iozone的命令如下:

iozone -s 1024M -r 4k -Rac >> iozonetest.txt

ramsmp的命令 :
[root@naveedramsmp-3.5.0]./ramsmp -b1 -m 2048

unixbench的命令:

[root@naveedunixbench]# ./Run


以上 可以通过perl脚本实现多次运行并收集数据

第五章结果的分析与讨论

1.    Iozone的图表中发现:裸机的性能要高于kvmvmwarevm,因此,虚拟化技术的性能有一定的待提升的空间。VMware的打大部分性能略高于KVM,而在文件大小为64kb write, rewrite, random write, record rewrite, forward write and forward re-write要高于VMware,随着文件的增大,KVM的性能越差,在文件大小为1GB时,性能最差,因此,KVM适合小文件的读写,而VMware的性能接近裸机,适合各种类型的文件的读

2.  Ramspeed的图表中发现:裸机的性能要高于kvmvmwarevm,在内存块大小小于1MB时,KVM的对于整数和浮点数的读写性能高于VMware,块大小大于1MB时,VMware的性能高于KVM,在块大小为4MB时,浮点数的写操作,KVMVMware的性能相同

3. ALU方面,KVM的性能接近于裸机,VMware的略差2%左右,在其它方面的测试,如:piple throughput process creationshell scriptsystem call overhead,及file system throughputVMware的性能略高于kvm,但都会低于裸机


最后就是总结,其实他只选用了rhel的OS,单个机器的性能,未涉及到每个平台多个VM运行的情况,或是最大支持多少VM能正常工作,至于guest OS也可选用其它windows系列。benchmark也可选用其它的。

您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|Archiver|boway Inc. ( 冀ICP备10011147号 )

GMT+8, 2024-4-30 19:15 , Processed in 0.086627 second(s), 16 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表