为了理解为什么我们的一些工作负载在数据库相关活动中产生了非常差的“用户体验”,我正在进行大量testing。
我们有一个带有B140i控制器的dl160g9服务器(4个LFF磁盘7.2k rpm)。 主机为centos 7 ,虚拟化引擎为kvm ,版本号为105.el7_2.4 (1.5.3)。 磁盘是由b140i控制器生成的虚假raid 5上的厚LVM卷 。 调整是为了执行 (设置为虚拟客户端并没有太多变化)。
我们同时运行win和linux虚拟机 。 在任何情况下, 存储都是本地的 , 通过virtio和cache = none和io = native连接到VM。
由于我们的db文件很小,我正在模拟工作负载:
iozone -i 0 -i 8 -s 4m -t X
其中X是1(简单情况)或25(实际用户基数) 。
这些是主持人的结果:
Children see throughput for 1 mixed workload = 1768421.25 kB/sec Parent sees throughput for 1 mixed workload = 293368.05 kB/sec Min throughput per process = 1768421.25 kB/sec Max throughput per process = 1768421.25 kB/sec Avg throughput per process = 1768421.25 kB/sec Min xfer = 4096.00 kB Children see throughput for 25 mixed workload = 12061204.12 kB/sec Parent sees throughput for 25 mixed workload = 39519.61 kB/sec Min throughput per process = 1017999.00 kB/sec Max throughput per process = 1237047.00 kB/sec Avg throughput per process = 482448.16 kB/sec Min xfer = 2212.00 kB
Linux VM (ubuntu 14.04 LTS)显示:
Children see throughput for 1 mixed workload = 1901520.62 KB/sec Parent sees throughput for 1 mixed workload = 176180.65 KB/sec Min throughput per process = 1901520.62 KB/sec Max throughput per process = 1901520.62 KB/sec Avg throughput per process = 1901520.62 KB/sec Min xfer = 4096.00 KB Children see throughput for 25 mixed workload = 5338608.75 KB/sec Parent sees throughput for 25 mixed workload = 15434.67 KB/sec Min throughput per process = 0.00 KB/sec Max throughput per process = 2675395.75 KB/sec Avg throughput per process = 213544.35 KB/sec Min xfer = 0.00 KB
Windows 10 64位专业版虚拟机的结果:
Children see throughput for 1 mixed workload = 496220.16 KB/sec Parent sees throughput for 1 mixed workload = 162133.06 KB/sec Min throughput per process = 496220.16 KB/sec Max throughput per process = 496220.16 KB/sec Avg throughput per process = 496220.16 KB/sec Min xfer = 4096.00 KB Children see throughput for 25 mixed workload = 1298231.58 KB/sec Parent sees throughput for 25 mixed workload = 7626.09 KB/sec Min throughput per process = 0.00 KB/sec Max throughput per process = 285706.31 KB/sec Avg throughput per process = 51929.26 KB/sec Min xfer = 0.00 KB
我在这里看到一些问题:
在1x线程上的linux perf似乎是根据virtio开销合法的,但是线程并发访问似乎是一团糟,尤其是0 KB / sec的min是很奇怪的
而linux虚拟机似乎严重缩小,胜利(和相关的virtio驱动程序)似乎是一团糟,即使在1线程。 虽然我预计会有一些开销,但人们在这里得到更好的结果
当然,赢10是新的,只有最新(117)的驱动程序支持,但赢得8.1类似的结果(省略,因为这个职位变大)。
我接受任何文件或build议,可以指向正确的方向:我的知识是caching=无,原始的LVM和正确的调谐-AD足以获得好的结果。
内核(股票):Linux dl190g9 3.10.0-327.18.2.el7.x86_64#1 SMP Thu May 12 11:03:55 UTC 2016 x86_64 x86_64 x86_64 GNU / Linux
qemu-kvm(centos virt sig):105.el7_2.4(1.5.3)
libvirtd:1.2.17
当我说virtio驱动程序我的意思是libvirt xml文件报告virtio作为总线。
Win显示“红帽virtIO SCSI磁盘设备”
linux将磁盘报告为“00:06.0 SCSI存储控制器:Red Hat,Inc Virtio块设备”
我之前曾经说过,窗口上的1个线程是非常糟糕的。 它实际上符合这里公布的结果 :本地和Win VM吞吐量之间的比例为1:3。
这使得两种情况都出现严重的缩放问题:主机1:3比例,虚拟机比例1:10
根据评论,我希望在7.3的改进中,根据Red Hat的发布时间表应该在真正的近期发布(大约在发布之间的6个月)。
谢谢