• Julien Muchembled's avatar
    kvm: always enable discard for drives · bbb4d069
    Julien Muchembled authored
    Given that the default is to use raw for device drives and qcow2 for
    file drives,  and that 'discard' was already enabled for raw, this
    commit is in practice mainly for file drives, for which QEMU processes
    TRIM by punching holes (i.e. the image file becomes sparse).
    
    This reduces disk usage not only by the process running the VM but
    also by backups and replicas (e.g. runner1).
    
    For qcow2 at least, the discarded space can be reused for other blocks
    and qemu compacts the image at dump (for backups) so images on replicas
    are not sparse.
    
    When an image disk format doesn't support it, QEMU ignores the option
    so it's safe.
    
    Guest support of TRIM for virtio-blk is recent: Linux 5.0
    bbb4d069
buildout.hash.cfg 2.86 KB