From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Zhang Haoyu" Subject: Re: [Qemu-devel] [question] virtio-blk performance degradationhappened with virito-serial Date: Mon, 1 Sep 2014 20:52:46 +0800 Message-ID: <201409012052442706397@sangfor.com> References: <201408291545282753855@sangfor.com>, <20140829143849.GA8909@grmbl.mre>, <201409012038178763909@sangfor.com> Mime-Version: 1.0 Content-Type: text/plain; charset="gb2312" Content-Transfer-Encoding: 7bit Cc: "qemu-devel" , "kvm" To: "Zhang Haoyu" , "Amit Shah" Return-path: Received: from smtp.sanfor.com ([58.251.49.30]:35615 "EHLO mail.sangfor.com" rhost-flags-OK-FAIL-OK-OK) by vger.kernel.org with ESMTP id S1752608AbaIAMwv (ORCPT ); Mon, 1 Sep 2014 08:52:51 -0400 Sender: kvm-owner@vger.kernel.org List-ID: >>> Hi, all >>> >>> I start a VM with virtio-serial (default ports number: 31), and found that virtio-blk performance degradation happened, about 25%, this problem can be reproduced 100%. >>> without virtio-serial: >>> 4k-read-random 1186 IOPS >>> with virtio-serial: >>> 4k-read-random 871 IOPS >>> >>> but if use max_ports=2 option to limit the max number of virio-serial ports, then the IO performance degradation is not so serious, about 5%. >>> >>> And, ide performance degradation does not happen with virtio-serial. >> >>Pretty sure it's related to MSI vectors in use. It's possible that >>the virtio-serial device takes up all the avl vectors in the guests, >>leaving old-style irqs for the virtio-blk device. >> >I don't think so, >I use iometer to test 64k-read(or write)-sequence case, if I disable the virtio-serial dynamically via device manager->virtio-serial => disable, >then the performance get promotion about 25% immediately, then I re-enable the virtio-serial via device manager->virtio-serial => enable, >the performance got back again, very obvious. add comments: Although the virtio-serial is enabled, I don't use it at all, the degradation still happened. >So, I think it has no business with legacy interrupt mode, right? > >I am going to observe the difference of perf top data on qemu and perf kvm stat data when disable/enable virtio-serial in guest, >and the difference of perf top data on guest when disable/enable virtio-serial in guest, >any ideas? > >Thanks, >Zhang Haoyu >>If you restrict the number of vectors the virtio-serial device gets >>(using the -device virtio-serial-pci,vectors= param), does that make >>things better for you? >> >> >> Amit