Re: [Qemu-block] [PATCH v5 0/2] block: enforce minimal 4096 alignment in qemu_blockalign

2015-06-01 Thread Dmitry Monakhov
#secure method=pgpmime mode=sign Paolo Bonzini pbonz...@redhat.com 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

Re: [Qemu-block] [PATCH v5 0/2] block: enforce minimal 4096 alignment in qemu_blockalign

2015-06-01 Thread Dmitry Monakhov
Paolo Bonzini pbonz...@redhat.com writes: On 13/05/2015 18:46, Denis V. Lunev wrote: I agree with this. Kernel guys are aware and may be we will have the fix after a while... I have heard (not tested) that performance loss over multi-queue SSD is around 30%. I came up with this patch... can

Re: [Qemu-block] [PATCH v5 0/2] block: enforce minimal 4096 alignment in qemu_blockalign

2015-06-01 Thread Paolo Bonzini
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 On 01/06/2015 12:34, Dmitry Monakhov wrote: Yes. Improvement is not huge, but it can be detected for old qemu unpatched kernel: 728 MiB/sec ± 20Mb patched kernel : 748 MiB/sec ± 10Mb Ok, so about 3-4%. What does the blktrace look like with

Re: [Qemu-block] [PATCH v5 0/2] block: enforce minimal 4096 alignment in qemu_blockalign

2015-05-29 Thread Paolo Bonzini
On 13/05/2015 18:46, Denis V. Lunev wrote: I agree with this. Kernel guys are aware and may be we will have the fix after a while... I have heard (not tested) that performance loss over multi-queue SSD is around 30%. I came up with this patch... can you test it with your test case (and old

Re: [Qemu-block] [PATCH v5 0/2] block: enforce minimal 4096 alignment in qemu_blockalign

2015-05-13 Thread Denis V. Lunev
On 13/05/15 18:43, Stefan Hajnoczi wrote: On Tue, May 12, 2015 at 12:46:57PM +0200, Paolo Bonzini wrote: On 12/05/2015 12:19, Denis V. Lunev wrote: hades /vol $ strace -f -e pwrite -e raw=write,pwrite qemu-io -n -c write -P 0x11 0 64M ./1.img Process 19326 attached [pid 19326] pwrite(0x6,

Re: [Qemu-block] [PATCH v5 0/2] block: enforce minimal 4096 alignment in qemu_blockalign

2015-05-12 Thread Denis V. Lunev
On 12/05/15 13:01, Stefan Hajnoczi wrote: On Mon, May 11, 2015 at 07:47:41PM +0300, Denis V. Lunev wrote: On 11/05/15 19:07, Denis V. Lunev wrote: On 11/05/15 18:08, Stefan Hajnoczi wrote: On Mon, May 04, 2015 at 04:42:22PM +0300, Denis V. Lunev wrote: The difference is quite reliable and

Re: [Qemu-block] [PATCH v5 0/2] block: enforce minimal 4096 alignment in qemu_blockalign

2015-05-12 Thread Paolo Bonzini
On 12/05/2015 12:19, Denis V. Lunev wrote: hades /vol $ strace -f -e pwrite -e raw=write,pwrite qemu-io -n -c write -P 0x11 0 64M ./1.img Process 19326 attached [pid 19326] pwrite(0x6, 0x7fac07fff200, 0x400, 0x5) = 0x400 1 GB Write from userspace FWIW this is 64 MB

Re: [Qemu-block] [PATCH v5 0/2] block: enforce minimal 4096 alignment in qemu_blockalign

2015-05-12 Thread Stefan Hajnoczi
On Mon, May 11, 2015 at 07:47:41PM +0300, Denis V. Lunev wrote: On 11/05/15 19:07, Denis V. Lunev wrote: On 11/05/15 18:08, Stefan Hajnoczi wrote: On Mon, May 04, 2015 at 04:42:22PM +0300, Denis V. Lunev wrote: The difference is quite reliable and the same 5%. qemu-io -n -c 'write -P 0xaa

Re: [Qemu-block] [PATCH v5 0/2] block: enforce minimal 4096 alignment in qemu_blockalign

2015-05-11 Thread Denis V. Lunev
On 11/05/15 18:08, Stefan Hajnoczi wrote: On Mon, May 04, 2015 at 04:42:22PM +0300, Denis V. Lunev wrote: The difference is quite reliable and the same 5%. qemu-io -n -c 'write -P 0xaa 0 1G' 1.img for image in qcow2 format is 1% faster. I looked a little at the qemu-io invocation but am not

Re: [Qemu-block] [PATCH v5 0/2] block: enforce minimal 4096 alignment in qemu_blockalign

2015-05-11 Thread Denis V. Lunev
On 11/05/15 19:07, Denis V. Lunev wrote: On 11/05/15 18:08, Stefan Hajnoczi wrote: On Mon, May 04, 2015 at 04:42:22PM +0300, Denis V. Lunev wrote: The difference is quite reliable and the same 5%. qemu-io -n -c 'write -P 0xaa 0 1G' 1.img for image in qcow2 format is 1% faster. I looked a

[Qemu-block] [PATCH v5 0/2] block: enforce minimal 4096 alignment in qemu_blockalign

2015-05-04 Thread Denis V. Lunev
The following sequence int fd = open(argv[1], O_RDWR | O_CREAT | O_DIRECT, 0644); for (i = 0; i 10; i++) write(fd, buf, 4096); iperforms 5% better if buf is aligned to 4096 bytes rather then to 512 bytes. I have used the following program to test #define _GNU_SOURCE