Skip to content
  • Kevin Wolf's avatar
    a35e1c17
    qcow2: Metadata preallocation · a35e1c17
    Kevin Wolf authored
    
    
    This introduces a qemu-img create option for qcow2 which allows the metadata to
    be preallocated, i.e. clusters are reserved in the refcount table and L1/L2
    tables, but no data is written to them. Metadata is quite small, so this
    happens in almost no time.
    
    Especially with qcow2 on virtio this helps to gain a bit of performance during
    the initial writes. However, as soon as create a snapshot, we're back to the
    normal slow speed, obviously. So this isn't the real fix, but kind of a cheat
    while we're still having trouble with qcow2 on virtio.
    
    Note that the option is disabled by default and needs to be specified
    explicitly using qemu-img create -f qcow2 -o preallocation=metadata.
    
    Signed-off-by: default avatarKevin Wolf <kwolf@redhat.com>
    Signed-off-by: default avatarAnthony Liguori <aliguori@us.ibm.com>
    a35e1c17
    qcow2: Metadata preallocation
    Kevin Wolf authored
    
    
    This introduces a qemu-img create option for qcow2 which allows the metadata to
    be preallocated, i.e. clusters are reserved in the refcount table and L1/L2
    tables, but no data is written to them. Metadata is quite small, so this
    happens in almost no time.
    
    Especially with qcow2 on virtio this helps to gain a bit of performance during
    the initial writes. However, as soon as create a snapshot, we're back to the
    normal slow speed, obviously. So this isn't the real fix, but kind of a cheat
    while we're still having trouble with qcow2 on virtio.
    
    Note that the option is disabled by default and needs to be specified
    explicitly using qemu-img create -f qcow2 -o preallocation=metadata.
    
    Signed-off-by: default avatarKevin Wolf <kwolf@redhat.com>
    Signed-off-by: default avatarAnthony Liguori <aliguori@us.ibm.com>
Loading