From 552420b76981702269cee1767b943fa373d84ca4 Mon Sep 17 00:00:00 2001 From: Eduardo Habkost <ehabkost@redhat.com> Date: Mon, 21 Sep 2009 14:25:15 -0300 Subject: [PATCH 1/2] qcow2: Change cluster size to 64k RH-Author: Kevin Wolf <kwolf@redhat.com> Message-id: <4A22500F.1030904@redhat.com> Patchwork-id: 2581 O-Subject: [KVM PATCH] qcow2: Change cluster size to 64k Bugzilla: 502809 RH-Acked-by: Juan Quintela <quintela@redhat.com> RH-Acked-by: Dor Laor <dlaor@redhat.com> RH-Acked-by: Gleb Natapov <gleb@redhat.com> A patch from Kevin Wolf. Current qcow2 performance with cache=off are poor. Changing the default cluster size from 4k to 64k should improve it. Some RH early trials complain about this issue exactly. Yaniv Kaul reported it actually improves performance by 25%. It also passed some MS stress testing, it will undergo QE and performance team tests too. This is a trivial change to qcow2, at the moment we're not backporting Kevin's new optimization which will make things even better: http://lists.gnu.org/archive/html/qemu-devel/2009-05/msg01285.html Post beta we may even consider that since currently the combination of qcow2+cache=off+nfs kills us. As for ACKS, please ack it after a technical review, let leave the stability speculations for testing and further discussion. Ack-by: Dor Laor >From 2d2148a372e437ec96c2c77049d566ffad665825 Mon Sep 17 00:00:00 2001 From: Kevin Wolf <kwolf@redhat.com <mailto:kwolf@redhat.com>> Date: Mon, 25 May 2009 16:59:16 +0200 Subject: [PATCH] qcow2: Change cluster size to 64k --- qemu/block-qcow2.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) header_size = (header_size + 7) & ~7; -- 1.6.0.6 Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> --- qemu/block-qcow2.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/qemu/block-qcow2.c b/qemu/block-qcow2.c index 37a73e0..a0b3d70 100644 --- a/qemu/block-qcow2.c +++ b/qemu/block-qcow2.c @@ -1666,7 +1666,7 @@ static int qcow_create2(const char *filename, int64_t total_size, header.backing_file_size = cpu_to_be32(backing_filename_len); header_size += backing_filename_len; } - s->cluster_bits = 12; /* 4 KB clusters */ + s->cluster_bits = 16; /* 64 KB clusters */ s->cluster_size = 1 << s->cluster_bits; header.cluster_bits = cpu_to_be32(s->cluster_bits); header_size = (header_size + 7) & ~7; -- 1.6.3.rc4.29.g8146