xen i/o 共享环_回送支持和blktap支持Xen文件支持的VBD之间的I / O性能比较

xen i/o 共享环

I have done some I/O performance benchmark test of Xen DomU. For easier management, some of our DomU VMs are using file-backed VBDs. Previously, our VMs are using Loopback-mounted file-backed VBDs. But blktap-based support are recommended by Xen community. Before considering changing from loopback based VBD to blktap based VBD, I have done this performance bench comparison.

我已经完成了Xen DomU的一些I / O性能基准测试。 为了简化管理,我们的某些DomU VM使用了文件支持的VBD。 以前,我们的VM使用的是环回安装的文件支持的VBD。 但是Xen社区推荐基于blktap的支持。 在考虑从基于环回的VBD更改为基于blktap的VBD之前,我已经进行了性能基准比较。

Note: if your VM is I/O intensive, you may consider setting up LVM backed DomU. Check the performance comparison.

注意:如果您的VM是I / O密集型的,则可以考虑设置LVM支持的DomU 。 检查性能比较

The hardware platform:

硬件平台:

DomU:

DomU:

CPU: 2 x Intel(R) Xeon(R) CPU E5520 @ 2.27GHz

CPU:2 x Intel(R)Xeon(R)CPU E5520 @ 2.27GHz

Memory: 1G

内存:1G

HD:

高清:

Filesystem    Type    Size  Used Avail Use% Mounted on
/dev/mapper/VolGroup-lv_root
              ext4     16G  2.0G   13G  14% /
/dev/xvda1    ext3    194M   23M  162M  13% /boot
tmpfs        tmpfs    517M     0  517M   0% /dev/shm

Dom0:

Dom0:

The raw image file is stored on a ext4 partition.

原始映像文件存储在ext4分区上。

Test method

测试方法

Bonnie++ 1.03c

邦妮++ 1.03c

Using default parameter.

使用默认参数。

Result

结果

Loopback driver backed:

支持环回驱动程序:

Version 1.03c       ------Sequential Output------ --Sequential Input- --Random-
                    -Per Chr- --Block-- -Rewrite- -Per Chr- --Block-- --Seeks--
Machine        Size K/sec %CP K/sec %CP K/sec %CP K/sec %CP K/sec %CP  /sec %CP
vm101         2064M 25511  35 18075   3 199488  47 71094  98 937880  86 +++++ +++
                    ------Sequential Create------ --------Random Create--------
                    -Create-- --Read--- -Delete-- -Create-- --Read--- -Delete--
              files  /sec %CP  /sec %CP  /sec %CP  /sec %CP  /sec %CP  /sec %CP
                 16 +++++ +++ +++++ +++ +++++ +++ +++++ +++ +++++ +++ +++++ +++
vm101,2064M,25511,35,18075,3,199488,47,71094,98,937880,86,+++++,+++,16,+++++,+++,+++++,+++,+++++,+++,+++++,+++,+++++,+++,+++++,+++

blktap driver backed:

blktap驱动程序支持:

Version 1.03c       ------Sequential Output------ --Sequential Input- --Random-
                    -Per Chr- --Block-- -Rewrite- -Per Chr- --Block-- --Seeks--
Machine        Size K/sec %CP K/sec %CP K/sec %CP K/sec %CP K/sec %CP  /sec %CP
vm101         2064M 69438  96 93549  20 38118  10 54955  76 131645   8 249.1   0
                    ------Sequential Create------ --------Random Create--------
                    -Create-- --Read--- -Delete-- -Create-- --Read--- -Delete--
              files  /sec %CP  /sec %CP  /sec %CP  /sec %CP  /sec %CP  /sec %CP
                 16 29488  79 +++++ +++ +++++ +++ +++++ +++ +++++ +++ +++++ +++
vm101,2064M,69438,96,93549,20,38118,10,54955,76,131645,8,249.1,0,16,29488,79,+++++,+++,+++++,+++,+++++,+++,+++++,+++,+++++,+++

From the result we can see that the loopback backed VBD has better read performance with high CPU usage while it has worse write performance. The blktap backed VBD has a more balanced performance. It has a much better write speed than the loopback backed one. With a bit worse read performance, we can get a much better over all performance. So from the view of performance, blktap driver is better than the loopback driver for Xen DomU’s VBD usage.

从结果可以看出,环回支持的VBD在CPU使用率较高的情况下具有更好的读取性能,而在写入性能方面却较差。 blktap支持的VBD具有更平衡的性能。 它的写速度比环回支持的写速度好得多。 如果读取性能稍差,我们可以在所有性能上获得更好的性能。 因此,从性能的角度来看,对于Xen DomU的VBD使用情况,blktap驱动程序优于环回驱动程序。

There are some other benefits we can get by using blktap driver. The loopback file-backed VBDs may not be appropriate for backing I/O-intensive domains because this approach is known to experience substantial slowdowns under heavy I/O workloads, due to the I/O handling by the loopback block device used to support file-backed VBDs in dom0 [1]. Another reason is the blktap can provides better scalability than loopback backed driver. Linux only support at most eight loopback file-backed VBDs across all domains by default. If we want to have more than eight loopback devices, the max_loop=n boot option should be passed to the kernel or module depends on whether CONFIG_BLK_DEV_LOOP is conpiled as a module of the Dom0 kernel. The method can be found at Add More Loop Device in Linux. And some other advantages such as easily support for metadata disk formats such as Copy-on-Write, encrypted disks, sparse formats and other compression features, avoid the flushing dirty pages problem which are present in the Linux blktap driver, and some more [2].

使用blktap驱动程序可以获得其他好处。 回送文件支持的VBD可能不适用于备份I / O密集型域,因为众所周知,由于用于支持文件的回送块设备对I / O的处理,这种方法在大量I / O工作负载下会出现严重的速度下降dom0 [1]中支持VBD的VBD。 另一个原因是blktap可以提供比回送后备驱动程序更好的可伸缩性。 默认情况下, Linux在所有域中最多仅支持八个回送文件支持的VBD。 如果我们希望有八个以上的回送设备,则应将max_loop = n引导选项传递给内核或模块,具体取决于是否将CONFIG_BLK_DEV_LOOP编译为Dom0内核的模块。 该方法可以在Linux中的Add More Loop Device中找到。 还有其他一些优点,例如轻松支持写时复制,加密磁盘,稀疏格式和其他压缩功能等元数据磁盘格式,避免了Linux blktap驱动程序中存在的刷新脏页问题,还有更多[2] ]。

Referrences

推荐人

[1] http://www.cl.cam.ac.uk/research/srg/netos/xen/readmes/user/
[2] http://wiki.xensource.com/xenwiki/blktap

[1] http://www.cl.cam.ac.uk/research/srg/netos/xen/readmes/user/
[2] http://wiki.xensource.com/xenwiki/blktap

翻译自: https://www.systutorials.com/an-io-performance-comparison-between-loopback-backed-and-blktap-backed-xen-file-backed-vbd/

xen i/o 共享环

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值