Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp463282imu; Mon, 5 Nov 2018 03:56:07 -0800 (PST) X-Google-Smtp-Source: AJdET5fvk9kGdtOMv8jVcbdxgcCsGaIkqAyRK7wfbyJ3M4EVeyLvW5+PanY45RPjlNA4Esl3oNJR X-Received: by 2002:a65:56cc:: with SMTP id w12-v6mr19170694pgs.224.1541418967178; Mon, 05 Nov 2018 03:56:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541418967; cv=none; d=google.com; s=arc-20160816; b=Q0KI4LgrP8Cn4VNx2ncF8JGQCf890PCETBqxVOaYK6NRTGIwQeZif//r+23HrxliCz cqEjEUrdwUEV0hiLlFotkdlO6QQAwR24+zMwgi64d2OP+oB4jsIV2Ygjx6BM1vmnF9xJ RgWy47NHwpd/Wta/Ne35t3hdhpWBMEW55sqMa+mvv4NSi3Z2edYtD7tgTZbLUgR1fJJt HuF+X/hMfSZnrHtfSkuySBjY8z6I4kAmWBDLwKdTNKdXx4YpNpxMp5gzngk0g6c9/hJH +k1J/dzr1B3jw8kH16WT75MklqZu8g2GomVOZi8WKVhMzKPnOEKnmM7ZdTiRjs6fEEGB 1xaQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:date:cc:to:from:subject:message-id; bh=L+fnx9ld/5g18+DwKEXbXvlJ2BuCn0MPc6M+ijMiGwM=; b=MbKBtS8ntnuPMpNOrKPmLMh4kfIl5LK3ySLahJUYbaEIGSPyBHmcUIjPfr0sPZ4l+m Fa2wlMk3Bh4gxk5M9ghrpI8Sf7KuQLpyEz52NTHQh/jCa/c+w+uAAwBpZai+f5de00U5 lJHua1CCrNG21CE94xN3NuIC+ZeJ8J3OFTGpYZsKbG0GILfQzkt7nHSNlszDd7qpxJyu qyw75RvaNnfaMGFEZZPir6zXFqMGtSm1v5aaUWFl5FoUyVO7BQABLTyJaXxgQfboxRuW ap816fCsF0zn+Mkn4v+fb1S0i3IV92OBUeluU/+sKukwILuuuR4UC5+JAW1nl5SmDAcQ UE9Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t1si8845260pgj.542.2018.11.05.03.55.51; Mon, 05 Nov 2018 03:56:07 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728136AbeKEVOw (ORCPT + 99 others); Mon, 5 Nov 2018 16:14:52 -0500 Received: from mx1.redhat.com ([209.132.183.28]:59584 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726358AbeKEVOw (ORCPT ); Mon, 5 Nov 2018 16:14:52 -0500 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 3A9A7308212A; Mon, 5 Nov 2018 11:55:30 +0000 (UTC) Received: from dhcp-4-67.tlv.redhat.com (dhcp-4-67.tlv.redhat.com [10.35.4.67]) by smtp.corp.redhat.com (Postfix) with ESMTP id 4BAF8672C2; Mon, 5 Nov 2018 11:55:26 +0000 (UTC) Message-ID: <71ed924dfecf358f6e13a0d1897f94e148058b4a.camel@redhat.com> Subject: Re: [PATCH 0/1] vhost: add vhost_blk driver From: Maxim Levitsky To: Vitaly Mayatskih Cc: "Michael S . Tsirkin" , Jason Wang , Paolo Bonzini , kvm@vger.kernel.org, virtualization@lists.linux-foundation.org, linux-kernel@vger.kernel.org Date: Mon, 05 Nov 2018 13:55:24 +0200 In-Reply-To: References: <20181102182123.29420-1-v.mayatskih@gmail.com> Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.42]); Mon, 05 Nov 2018 11:55:30 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, 2018-11-04 at 11:40 -0500, Vitaly Mayatskih wrote: > On Sun, Nov 4, 2018 at 6:57 AM Maxim Levitsky wrote: > > > Hi! > > I am also working in this area, and so I am very intersted in this driver. > > > > > 1 171k 151k 148k 151k 195k 187k 175k > > > > If I understand correctly this is fio --numjobs=1? > > It looks like you are getting better that native performance over bare metal > > in > > E,F,G (vhost-blk cases in fact). Is this correct? > > Yes. At such speeds it is a matter of how the workers are scheduled, > i.e. how good is batching. There are other factors why vhost-blk is on > par or slightly higher than fio running in userspace on bare metal, > but from my observation the right batching all through the stack is > more important. I completely agree with you on that. I currently learning profiling/tracing to understand the batching (or lack of) in the tests I run My focus currently is mostly on spdk + native nvme While for multiple threads, the performance is very close to bare metal, on single thread I see significant overhead which probably relate to batching as well. > > > Could you share the full fio command line you have used? > > sysctl -w vm.nr_hugepages=8300; numactl -p 1 -N 1 ./qemu-system-x86_64 > -enable-kvm -cpu host -smp 16 -mem-prealloc -mem-path > /dev/hugepages/foo -m 8G -nographic -drive > if=none,id=drive0,format=raw,file=/dev/mapper/mirror-hello,cache=none > -device virtio-blk-pci,id=blk0,drive=drive0,num-queues=16 -drive > if=none,id=drive1,format=raw,file=/dev/mapper/mirror-volume,cache=none > -device vhost-blk-pci,id=blk1,drive=drive1,num-queues=16 Thanks! > > for i in `seq 1 16`; do echo -n "$i "; ./fio --direct=1 --rw=randread > --ioengine=libaio --bs=4k --iodepth=128 --numjobs=$i --name=foo > --time_based --runtime=15 --group_reporting --filename=/dev/vda > --size=10g | grep -Po 'IOPS=[0-9\.]*k'; done > > > Which IO device did you use for the test? NVME? > > That was LVM mirror over 2 network disks. On the target side it was > LVM stripe over few NVMe's. Have you tried to test this over directly connected NVME device to? The networking might naturally improve batching I think. > > > Which system (cpu model/number of cores/etc) did you test on? > > Dual socket: "model name : Intel(R) Xeon(R) Gold 6142 CPU @ > 2.60GHz" with HT enabled, so 64 logical cores in total. The network > was something from Intel with 53 Gbps PHY and served by fm10k driver. All right, thanks! I'll test your driver on my system where I tested most of the current solutions. Best regards, Maxim Levitsky