From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54742) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YzONV-0005OC-2B for qemu-devel@nongnu.org; Mon, 01 Jun 2015 07:59:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YzONU-0006ID-8B for qemu-devel@nongnu.org; Mon, 01 Jun 2015 07:59:36 -0400 Sender: Dmitry Monakhov From: Dmitry Monakhov In-Reply-To: <556C4164.6040906@redhat.com> References: <1430746944-27347-1-git-send-email-den@openvz.org> <20150511150817.GK16270@stefanha-thinkpad.redhat.com> <5550D3B5.2050703@openvz.org> <5550DD2D.8000407@odin.com> <20150512100155.GB11497@stefanha-thinkpad.redhat.com> <5551D39E.1020902@odin.com> <5551DA21.7020105@redhat.com> <20150513154342.GB24352@stefanha-thinkpad.redhat.com> <55538001.90207@odin.com> <5568974C.6080502@redhat.com> <877frn90pz.fsf@openvz.org> <556C36BC.1000409@redhat.com> <87382b8yr3.fsf@openvz.org> <556C4164.6040906@redhat.com> Date: Mon, 01 Jun 2015 14:57:00 +0300 Message-ID: <87vbf77ib7.fsf@openvz.org> MIME-Version: 1.0 Content-Type: text/plain Subject: Re: [Qemu-devel] [PATCH v5 0/2] block: enforce minimal 4096 alignment in qemu_blockalign List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini , "Denis V. Lunev" , Stefan Hajnoczi Cc: Dmitry Monakhov , Stefan Hajnoczi , qemu-block@nongnu.org, qemu-devel@nongnu.org <#secure method=pgpmime mode=sign> Paolo Bonzini writes: > On 01/06/2015 13:16, Dmitry Monakhov wrote: >> 259,0 31 385 0.719283423 10729 Q WS 29376775 + 248 [qemu-io] >> 259,0 31 388 0.719287600 10729 Q WS 29377023 + 8 [qemu-io] >> 259,0 31 391 0.719315193 10729 Q WS 29377031 + 248 [qemu-io] >> 259,0 31 394 0.719319179 10729 Q WS 29377279 + 8 [qemu-io] > > Compared to the old one: > >> 9,0 11 1 0.000000000 11151 Q WS 312737792 + 1023 [qemu-img] >> 9,0 11 2 0.000007938 11151 Q WS 312738815 + 8 [qemu-img] >> 9,0 11 3 0.000030735 11151 Q WS 312738823 + 1016 [qemu-img] >> 9,0 11 4 0.000032482 11151 Q WS 312739839 + 8 [qemu-img] >> 9,0 11 5 0.000041379 11151 Q WS 312739847 + 1016 [qemu-img] >> 9,0 11 6 0.000042818 11151 Q WS 312740863 + 8 [qemu-img] >> 9,0 11 7 0.000051236 11151 Q WS 312740871 + 1017 [qemu-img] > > I suspect the difference is that my patch avoids RMW operations on disks > that have 512-byte logical blocks and 4K physical blocks. Probably. I've checked bio/request submission path for my nvme device and it is appeared that merge is merges are disabled for that device. /sys/block/nvme0n1/queue/nomerges -> 2 (QUEUE_FLAG_NOMERGES) so we follow this trace ->blk_mq_make_request(bio) if(!blk_mq_merge_queue_io) blk_mq_run_hw_queue(data.hctx, !is_sync || is_flush_fua); So the only thing we can in order to improve performance is to is to modify fs/direct-io.c -> bio submission path by constructing bios with maximum size. > > Paolo