Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp5603515rwd; Wed, 24 May 2023 04:25:49 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6YrlI2E3ucmmNhwlxhAUukcFP1dPOkjwInJ9o2bxmcEvsqcCtNj6bnj5qZdjPSbzlLqmjL X-Received: by 2002:a05:6a20:3d95:b0:101:4c8c:d1ee with SMTP id s21-20020a056a203d9500b001014c8cd1eemr17065283pzi.50.1684927549307; Wed, 24 May 2023 04:25:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684927549; cv=none; d=google.com; s=arc-20160816; b=w0OHNdk71cBOmh8GQJ7BXr9Tpz7tbWDjXwHzX4QD1Wt1H1E7XFUNjXgyOR5bdWvZYn EmehARj1ZSHBd6tViWCpd/CxlfkUik/5687qtIqFf9uUVDvUXU5SogrHL8FMRhNwSKrD 1RX62T9uYj91begL/Pu06GXwJX0Q0aLu4Snmn045cXqAuvj3iZ4arWUuHXe9eeM7di2z EU6BCpPPKNxiD8hNbx2mwNGHBqgu/cbYH8oxXKi23n1tFiZLtPdvAXrYCQPfHWelrp7T uxUtrzQb/5qeZWeIeZ1K8KbRBDBhHWwBSciAy3gB200T7Jnoz0I8I5VBim0Zyf/NQOtg ks/g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:message-id:in-reply-to :date:references:subject:cc:to:from:dkim-signature; bh=1b7B2eWvrCdXsO/LwBEusNkxbQCx1woNLXNuitI/A7s=; b=ETESbqnHRC2Jva3jFbhLSPf+CuPoi3AIdQaG0Qo1XUdGliHMcvBLnzWtq62/dG1TM1 tnchX/nojlNWZGn7vKXW0RPdTQGNPEiPVvowI6EB0UNSeuFTWpAG9nJ7cGBFI7GyQx9Q 0qZsdDJG1Ift1LL6+IOLScOnxPg0cjhigXhI7dLXs9WWNlqJFxZ8KgxUTIGOaVkinfP6 lqQHJu/ihHg23hdN1R+v8D2oDa43gi9imxxv85FWACBJxiTJVoBuwv8EObztnzjhgLMP I2jQKaI1cSprShL9P3VX7tWhVlD9IeIPVyD0OyjSHJM4eA7i1zU81E6XOwLib5vaQeKK lc6Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=dwfxW93s; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c1-20020a637241000000b00502f4fd0c16si8378766pgn.653.2023.05.24.04.25.21; Wed, 24 May 2023 04:25:49 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=dwfxW93s; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234073AbjEXKtM (ORCPT + 99 others); Wed, 24 May 2023 06:49:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59428 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231731AbjEXKtH (ORCPT ); Wed, 24 May 2023 06:49:07 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C4EA7198 for ; Wed, 24 May 2023 03:48:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1684925296; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=1b7B2eWvrCdXsO/LwBEusNkxbQCx1woNLXNuitI/A7s=; b=dwfxW93sDlxGEQbxyXKyhPO5pfNGrIPKEJbckudx+oZ42mlmRmVF1Pb5EzGcgEEBfgJuau V+lK7G6iVbz8iqryGo4+P1HLKSYbzt0Et/mvEUBj+T/nUP9+4pCg4dWCOwc8kvbJKEic8g IIyW3ONqPTJu9zSfF8mOCbRLA1hdQU4= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-178-w0HYiZ6tN_qJ6p3SozTy0A-1; Wed, 24 May 2023 06:48:13 -0400 X-MC-Unique: w0HYiZ6tN_qJ6p3SozTy0A-1 Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 35BEC85A5AA; Wed, 24 May 2023 10:48:13 +0000 (UTC) Received: from localhost (unknown [10.39.192.9]) by smtp.corp.redhat.com (Postfix) with ESMTPS id D2564492B0A; Wed, 24 May 2023 10:48:12 +0000 (UTC) From: Giuseppe Scrivano To: Gao Xiang Cc: Alexander Larsson , Mike Snitzer , Du Rui , dm-devel@redhat.com, linux-kernel@vger.kernel.org, Alasdair Kergon Subject: Re: dm overlaybd: targets mapping OverlayBD image References: <9505927dabc3b6695d62dfe1be371b12f5bdebf7.1684491648.git.durui@linux.alibaba.com> <87r0r6ywri.fsf@redhat.com> <02524ece-956f-f5d8-fb21-adc4e5617dc6@linux.alibaba.com> Date: Wed, 24 May 2023 12:48:11 +0200 In-Reply-To: <02524ece-956f-f5d8-fb21-adc4e5617dc6@linux.alibaba.com> (Gao Xiang's message of "Wed, 24 May 2023 16:26:25 +0800") Message-ID: <87mt1uyphw.fsf@redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Scanned-By: MIMEDefang 3.1 on 10.11.54.10 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Gao Xiang writes: > Hi Giuseppe, > > On 2023/5/24 01:11, Giuseppe Scrivano wrote: >> Gao Xiang writes: >> > > ... > >>> Agreed, I hope you guys could actually sit down and evaluate a proper >>> solution on the next OCI v2, currently I know there are: >>> >>> - Composefs >>> - (e)stargz https://github.com/containerd/stargz-snapshotter >>> - Nydus https://github.com/containerd/nydus-snapshotter >>> - OverlayBD https://github.com/containerd/accelerated-container-image >>> - SOCI https://github.com/awslabs/soci-snapshotter >>> - Tarfs >>> - (maybe even more..) >>> >>> Honestly, I do think OSTree/Composefs is the best approach for now for >>> deduplication and page cache sharing (due to kernel limitation of page >>> cache sharing and overlayfs copyup limitation). I'm too tired of >>> container image stuffs honestly. Too much unnecessary manpower waste. >> for a file-based storage model, I am not sure a new format would >> really >> buy us much or it can be significantly different. >> Without a proper support from the kernel, a new format would still >> need >> to create the layout overlay expects, so it won't be much different than >> what we have now. > > I've seen lot efforts on this, for example, > https://docs.google.com/presentation/d/1lBKVrYzm9JEYuw-gIEsrcePSK0jL1Boe/edit#slide=id.p22 > > Merging the writable layer and read-only layers with overlayfs is > feasible. I mean, at least for composefs model on backing XFS/btrfs, we > could merge these layers with overlayfs so that I guess reflink could > be done to avoid full copyup as well? I do think that's a net win. > >> The current OCI format, with some tweaks like (e)stargz or >> zstd:chunked, >> already make its content addressable and a client can retrieve only the >> subset of the files that are needed. At the same time we maintain the >> simplicity of a tarball and it won't break existing clients. > > (e)stargz or zstd:chunked still needs to be converted by the publisher > and not all exist OCI images are stored in this way. But apart from > detailed comparsion, disk mapping image approaches seems really a > drawback at least on my side. these images can be treated as if all their files are missing and the checksum is calculated on the receiver side. They will still be stored locally indexed by their checksum. We lose the possibility to pull only the missing files but we maintain the other advantages at runtime. In this way moving to a new format can be done incrementally without breaking what we have now. > Anyway, I think it's what OCIv2 would like to eventually address > anyway. > >> IMO, the most interesting problem is how to store these images >> locally >> and how the kernel can help with that. > > I think composefs model can do both sides. But I'm not sure the final > conclusion, I tend to leave it to the OCI guys. > >> The idea behind composefs is to replace the existing storage model >> used >> for overlay, where each layer has its own directory, with a single >> directory where all the files are stored by their checksum. The >> expected layout then is recreated at runtime. > > Yes, what I'd like to say, without finer page cache sharing mechanism, > the composefs way sounds better to me honestly to the whole system. > > Thanks, > Gao Xiang