linux-unionfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Rodrigo Campos <rodrigo@sdfg.com.ar>
To: Amir Goldstein <amir73il@gmail.com>, Sargun Dhillon <sargun@sargun.me>
Cc: overlayfs <linux-unionfs@vger.kernel.org>,
	Miklos Szeredi <miklos@szeredi.hu>
Subject: Re: Detaching lower layers (Was: Lazy Loading Layers)
Date: Mon, 29 May 2023 19:50:41 +0200	[thread overview]
Message-ID: <16766416-1176-80d2-241a-ac982fb30ac0@sdfg.com.ar> (raw)
In-Reply-To: <CAOQ4uxg0BHD8OHWk-b6TrE=SqGJTvp8TuHaLCwC5g9ZL=7W0Ew@mail.gmail.com>

On 5/29/23 17:15, Amir Goldstein wrote:
> On Mon, Jan 25, 2021 at 9:54 PM Sargun Dhillon <sargun@sargun.me> wrote:
>>
>> One of the projects I'm playing with for containers is lazy-loading of layers.
>> We've found that less than 10% of the files on a layer actually get used, which
>> is an unfortunate waste. It also means in some cases downloading ~100s of MB, or
>> ~1s of GB of files before starting a container workload. This is unfortunate.
>>
>> It would be nice if there was a way to start a container workload, and have
>> it so that if it tries to access and unpopulated (not yet downloaded) part
>> of the filesystem block while trying to be accessed. This is trivial to do
>> if the "lowest" layer is FUSE, where one can just stall in userspace on
>> loads. Unfortunately, AFAIK, there's not a good way to swap out the FUSE
>> filesystem with the "real" filesystem once it's done fully populating,
>> and you have to pay for the full FUSE cost on each read / write.
>>
>> I've tossed around:
>> 1. Mutable lowerdirs and having something like this:
>>
>> layer0 --> Writeable space
>> layer1 --> Real XFS filesystem
>> layer2 --> FUSE FS
>>
>> and if there is a "miss" on layer 1, it will then look it up on
>> layer 2 while layer 1 is being populated. Then the FUSE FS can block.
>> This is neat, but it requires the FUSE FS to always be up, and incurs
>> a userspace bounce on every miss.

Interesting.

I haven't checked the patches yet, but does the patchset "FUSE BPF: A 
Stacked Filesystem Extension for FUSE" help with your use case,  Sargun?



Best,
Rodrigo

      reply	other threads:[~2023-05-29 17:52 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-25 19:48 Lazy Loading Layers (Userfaultfd for filesystems?) Sargun Dhillon
2021-01-26  5:18 ` Amir Goldstein
2021-01-26 13:12   ` Alessio Balsini
2023-05-29 15:15 ` Detaching lower layers (Was: Lazy Loading Layers) Amir Goldstein
2023-05-29 17:50   ` Rodrigo Campos [this message]

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=16766416-1176-80d2-241a-ac982fb30ac0@sdfg.com.ar \
    --to=rodrigo@sdfg.com.ar \
    --cc=amir73il@gmail.com \
    --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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).