($INBOX_DIR/description missing)
 help / color / Atom feed
From: Vivek Goyal <vgoyal@redhat.com>
To: Miklos Szeredi <miklos@szeredi.hu>
Cc: Amir Goldstein <amir73il@gmail.com>, cgxu <cgxu519@mykernel.net>,
	Jan Kara <jack@suse.cz>,
	overlayfs <linux-unionfs@vger.kernel.org>,
	Sargun Dhillon <sargun@sargun.me>,
	Daniel J Walsh <dwalsh@redhat.com>,
	gscrivan@redhat.com
Subject: Re: [PATCH v12] ovl: improve syncfs efficiency
Date: Fri, 22 May 2020 09:44:47 -0400
Message-ID: <20200522134447.GA58162@redhat.com> (raw)
In-Reply-To: <CAJfpeguyg0e-mE5N=1VKkHWTDJKKhf-Ka6vZ02sQCFeiqRD-aQ@mail.gmail.com>

On Fri, May 22, 2020 at 11:31:41AM +0200, Miklos Szeredi wrote:
> On Wed, May 20, 2020 at 9:24 AM Amir Goldstein <amir73il@gmail.com> wrote:
> >
> > On Wed, May 20, 2020 at 4:02 AM cgxu <cgxu519@mykernel.net> wrote:
> > >
> > > On 5/6/20 5:53 PM, Chengguang Xu wrote:
> > > > Current syncfs(2) syscall on overlayfs just calls sync_filesystem()
> > > > on upper_sb to synchronize whole dirty inodes in upper filesystem
> > > > regardless of the overlay ownership of the inode. In the use case of
> > > > container, when multiple containers using the same underlying upper
> > > > filesystem, it has some shortcomings as below.
> > > >
> > > > (1) Performance
> > > > Synchronization is probably heavy because it actually syncs unnecessary
> > > > inodes for target overlayfs.
> > > >
> > > > (2) Interference
> > > > Unplanned synchronization will probably impact IO performance of
> > > > unrelated container processes on the other overlayfs.
> > > >
> > > > This patch tries to only sync target dirty upper inodes which are belong
> > > > to specific overlayfs instance and wait for completion. By doing this,
> > > > it is able to reduce cost of synchronization and will not seriously impact
> > > > IO performance of unrelated processes.
> > > >
> > > > Signed-off-by: Chengguang Xu <cgxu519@mykernel.net>
> > >
> > > Except explicit sycnfs is triggered by user process, there is also implicit
> > > syncfs during umount process of overlayfs instance. Every syncfs will
> > > deliver to upper fs and whole dirty data of upper fs syncs to persistent
> > > device at same time.
> > >
> > > In high density container environment, especially for temporary jobs,
> > > this is quite unwilling  behavior. Should we provide an option to
> > > mitigate this effect for containers which don't care about dirty data?
> 
> If containers don't care about dirty data, why go to great lengths to
> make sure that syncfs() works?  Can't we just have an option to turn
> off syncing completely, for fsync, for syncfs, for shutdown, for
> everything?  That would be orders of magnitude simpler than the patch
> you posted.

We definitely have this use case where certain class of contaienrs
don't want to actually sync data back to disk. It slows them down
significantly. For example, containers used for building images
and they use "dnf" which issues bunch of sync and hence slowing
down build process.

These build containers don't care about system crashes. They will
restart the build process if such an event were to happen.

They are not in a position to modify "dnf" and other applications
to not issue sync. So they will like to have a mount option say
"nosync" where sync will be ignored by filesystem instance. This
expedites their build process. Copying Dan Walsh and Gisueppe who
were looking for such an option.

Thanks
Vivek


  reply index

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-06  9:53 Chengguang Xu
2020-05-20  1:01 ` cgxu
2020-05-20  7:24   ` Amir Goldstein
2020-05-22  9:31     ` Miklos Szeredi
2020-05-22 13:44       ` Vivek Goyal [this message]
2020-05-22 14:40         ` Giuseppe Scrivano
2020-05-26  7:50     ` cgxu
2020-05-26  8:25       ` Amir Goldstein

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200522134447.GA58162@redhat.com \
    --to=vgoyal@redhat.com \
    --cc=amir73il@gmail.com \
    --cc=cgxu519@mykernel.net \
    --cc=dwalsh@redhat.com \
    --cc=gscrivan@redhat.com \
    --cc=jack@suse.cz \
    --cc=linux-unionfs@vger.kernel.org \
    --cc=miklos@szeredi.hu \
    --cc=sargun@sargun.me \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

($INBOX_DIR/description missing)

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-unionfs/0 linux-unionfs/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-unionfs linux-unionfs/ https://lore.kernel.org/linux-unionfs \
		linux-unionfs@vger.kernel.org
	public-inbox-index linux-unionfs

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-unionfs


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git