On Fri, Aug 7, 2020 at 5:36 PM Richard W.M. Jones <rjones(a)redhat.com> wrote:
On Fri, Aug 07, 2020 at 05:29:24PM +0300, Nir Soffer wrote:
> On Fri, Aug 7, 2020 at 5:07 PM Richard W.M. Jones <rjones(a)redhat.com> wrote:
> > These ones?
> >
https://www.redhat.com/archives/libguestfs/2020-August/msg00078.html
>
> No, we had a bug when copying image from glance caused sanlock timeouts
> because of the unpredictable page cache flushes.
>
> We tried to use fadvice but it did not help. The only way to avoid such issues
> is with O_SYNC or O_DIRECT. O_SYNC is much slower but this is the path
> we took for now in this flow.
I'm interested in more background about this, because while it is true
that O_DIRECT and POSIX_FADV_DONTNEED are not exactly equivalent, I
think I've shown here that DONTNEED can be used to avoid polluting the
page cache.
This fixes the minor issue of polluting the page cache, but it does not help
to avoid stale data in the cache, or unconfrolled flushes.
The bug I mentioned is:
https://bugzilla.redhat.com/1832967
This explains the issue:
https://bugzilla.redhat.com/1247135#c29
And here you can how unrelated I/O is affected by uncontrolled flushes:
https://bugzilla.redhat.com/1247135#c30
https://bugzilla.redhat.com/1247135#c36
Here we compare oflag=nocache,dsync with oflag=direct for NFS and iSCSI disks:
https://gerrit.ovirt.org/c/108912/
cahe=none now is basically oflag=nocache,dsync
Rich.
--
Richard Jones, Virtualization Group, Red Hat
http://people.redhat.com/~rjones
Read my programming and virtualization blog:
http://rwmj.wordpress.com
libguestfs lets you edit virtual machines. Supports shell scripting,
bindings from many languages.
http://libguestfs.org