On Sun, Jun 28, 2020 at 8:11 AM Fabio Valentini <decatho...@gmail.com> wrote:
>
> From what I remember about Android Studio / Simulator, it uses qemu and disk 
> images under the hood. Setting the nodatacow attribute (chattr +C, I think?) 
> on VM images should improve performance by a fair bit.

chattr +C (nodatacow) is recommended.

- no limitation on snapshotting
- limitation on reflink copies. cp --reflink is permitted between
locations with the same cow attribute, i.e. if the file has +C then
the destination dir needs +C; otherwise --reflink=always will fail and
--reflink=auto will fall back to monolithic copy of the whole image.
- implies no compression and no data checksums. There might be narrow
use cases where it's preferred to retain datacow behavior. i.e. I
think it's fine for nodatacow to be the default, the question is
whether and how easy to opt out.

> Maybe libvirt / gnome-boxes / virt-manager should do that by default if it 
> detects that the backing storage for an allocated VM image is on btrfs (if it 
> doesn't do that already)?

Yes. There are many possibilities. It can be done at file create time
(qemu-img already has an option that causes +C  attribute to be set).
Maybe the installer could set it on the containing directory; or
likewise libvirtd could do it.

systemd-journald for a while now detects if /var/log/journal is on
btrfs and automatically sets +C attribute, so it could be something
similar for libvirtd, and use a drop in empty file to inhibit?
sd-journald uses /etc/tmpfiles.d/journal-nocow.conf to inhibit.

-- 
Chris Murphy
_______________________________________________
devel mailing list -- devel@lists.fedoraproject.org
To unsubscribe send an email to devel-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org

Reply via email to