From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christian Borntraeger Subject: Re: [Qemu-devel] [question] virtio-blk performance degradationhappened with virito-serial Date: Mon, 01 Sep 2014 15:09:51 +0200 Message-ID: <5404701F.5070302@de.ibm.com> References: <201408291545282753855@sangfor.com>, <20140829143849.GA8909@grmbl.mre>, <201409012038178763909@sangfor.com> <201409012052442706397@sangfor.com> Mime-Version: 1.0 Content-Type: text/plain; charset=gbk Content-Transfer-Encoding: 7bit Cc: qemu-devel , kvm To: Zhang Haoyu , Amit Shah Return-path: Received: from e06smtp13.uk.ibm.com ([195.75.94.109]:50064 "EHLO e06smtp13.uk.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751500AbaIANKF (ORCPT ); Mon, 1 Sep 2014 09:10:05 -0400 Received: from /spool/local by e06smtp13.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 1 Sep 2014 14:10:03 +0100 Received: from b06cxnps4074.portsmouth.uk.ibm.com (d06relay11.portsmouth.uk.ibm.com [9.149.109.196]) by d06dlp03.portsmouth.uk.ibm.com (Postfix) with ESMTP id 986141B08051 for ; Mon, 1 Sep 2014 14:11:00 +0100 (BST) Received: from d06av06.portsmouth.uk.ibm.com (d06av06.portsmouth.uk.ibm.com [9.149.37.217]) by b06cxnps4074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id s81DA06I40239354 for ; Mon, 1 Sep 2014 13:10:00 GMT Received: from d06av06.portsmouth.uk.ibm.com (localhost [127.0.0.1]) by d06av06.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id s8188bbH031316 for ; Mon, 1 Sep 2014 04:08:37 -0400 In-Reply-To: <201409012052442706397@sangfor.com> Sender: kvm-owner@vger.kernel.org List-ID: On 01/09/14 14:52, Zhang Haoyu wrote: >>>> 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. This is just wild guessing: If virtio-blk and virtio-serial share an IRQ, the guest operating system has to check each virtqueue for activity. Maybe there is some inefficiency doing that. AFAIK virtio-serial registers 64 virtqueues (on 31 ports + console) even if everything is unused. Christian