aboutsummaryrefslogtreecommitdiff
path: root/scripts/create_config
diff options
context:
space:
mode:
authorDenis V. Lunev <den@openvz.org>2015-04-28 10:46:59 +0300
committerStefan Hajnoczi <stefanha@redhat.com>2015-05-22 09:37:32 +0100
commit19f5dc15912dfb6af06c97e4975023e545e85c72 (patch)
treec78fd046988fc38c113e436b840848f5f12c0363 /scripts/create_config
parentd61790112fa861fbbbb02b53f9c3beb9ca7f8419 (diff)
block/parallels: optimize linear image expansion
Plain image expansion spends a lot of time to update image file size. This seriously affects the performance. The following simple test qemu_img create -f parallels -o cluster_size=64k ./1.hds 64G qemu_io -n -c "write -P 0x11 0 1024M" ./1.hds could be improved if the format driver will pre-allocate some space in the image file with a reasonable chunk. This patch preallocates 128 Mb using bdrv_write_zeroes, which should normally use fallocate() call inside. Fallback to older truncate() could be used as a fallback using image open options thanks to the previous patch. The benefit is around 15%. Signed-off-by: Denis V. Lunev <den@openvz.org> Reviewed-by: Roman Karan <rkagan@parallels.com> Signed-off-by: Roman Kagan <rkagan@parallels.com> Message-id: 1430207220-24458-27-git-send-email-den@openvz.org CC: Kevin Wolf <kwolf@redhat.com> CC: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'scripts/create_config')
0 files changed, 0 insertions, 0 deletions