Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4B013C54EED for ; Wed, 25 Jan 2023 10:17:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235390AbjAYKQ6 (ORCPT ); Wed, 25 Jan 2023 05:16:58 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55692 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235306AbjAYKQ5 (ORCPT ); Wed, 25 Jan 2023 05:16:57 -0500 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 EB1C32B291 for ; Wed, 25 Jan 2023 02:16:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1674641764; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=o5qeGFKBSRr+kwZlDb48jnVzaPiHRNkZlEPfgWj2/lw=; b=T7SE9BPhzokN2DhET+RJNkHxyaq/dYev3n0Z/TDfhi3RbCNkm064lKVsij4O6Kj4uOJJNr bxAef/NFT/L7bilUdCDUBeshpuTyBg+/E4tv2UPOmaQOgeB0Tlbg7llrYofKvYWCSYiXAx /AkfKqSWejLfwuxVawcEsNjfwtLnDgk= Received: from mail-ed1-f71.google.com (mail-ed1-f71.google.com [209.85.208.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-612-WSqBFc98O-a4uhfH7dYCpg-1; Wed, 25 Jan 2023 05:16:02 -0500 X-MC-Unique: WSqBFc98O-a4uhfH7dYCpg-1 Received: by mail-ed1-f71.google.com with SMTP id g14-20020a056402090e00b0046790cd9082so12751486edz.21 for ; Wed, 25 Jan 2023 02:16:02 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:cc:to:from:subject:message-id:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=o5qeGFKBSRr+kwZlDb48jnVzaPiHRNkZlEPfgWj2/lw=; b=yxtm1X/OOJecWTnFPfrFJ7gHDH6ewBUVZkHSTb+uxOuVGunBTG9b/Ul+lMGj46tCC+ ITUNBf59BOTv4CAGkurVasjE5twpTLXZLp7TCaILwH/MFz79ogbopkxSCpM2K4wdSHlx 7ELoSwePm0Yqxz8ZMkepJGHO15KK8kzUs5xQzoAypLka2f4DjqtwGkSCqta2oOINgscD 6bv/P7cHU6H3tiQHg9QaybAg81afEiMFzZdNBtUla9lMwtAT1awC+dlZQt9KviItYD3X 4z/V7fqFLDd06BW2p6Wce0CStVb2/JQKHxFYYGuksvvCQs86b9hZ8XyJMEy3iUpr7tJg EObA== X-Gm-Message-State: AFqh2kpngM3+OuZpY+BvdJT0UZhT2nsDul/PeHUvBjQ1stgffcv5M6HF PguLhSeImKumhaE/YO+qy3+a5Wcksv5sXJ4oi/lpekzPrtdqfCLdss3a1X43J2Gbw5Nf/EPjj2R jJm8U9esRug9MRcympi9l7UOb X-Received: by 2002:a17:906:ced0:b0:870:5ed6:74b4 with SMTP id si16-20020a170906ced000b008705ed674b4mr32453482ejb.61.1674641761449; Wed, 25 Jan 2023 02:16:01 -0800 (PST) X-Google-Smtp-Source: AMrXdXsz/EIskzfmm3gedIZzqyypQVO/xKGeWVH2p8YM0BX8XO8y15Ts7QahD4qr5ZRrSyziktbNww== X-Received: by 2002:a17:906:ced0:b0:870:5ed6:74b4 with SMTP id si16-20020a170906ced000b008705ed674b4mr32453475ejb.61.1674641761274; Wed, 25 Jan 2023 02:16:01 -0800 (PST) Received: from greebo.mooo.com (c-e6a5e255.022-110-73746f36.bbcust.telenor.se. [85.226.165.230]) by smtp.gmail.com with ESMTPSA id vk6-20020a170907cbc600b0084c62b7b7d8sm2121300ejc.187.2023.01.25.02.16.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 25 Jan 2023 02:16:00 -0800 (PST) Message-ID: <2ef122849d6f35712b56ffbcc95805672980e185.camel@redhat.com> Subject: Re: [PATCH v3 0/6] Composefs: an opportunistically sharing verified image filesystem From: Alexander Larsson To: Gao Xiang , Amir Goldstein Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, gscrivan@redhat.com, david@fromorbit.com, brauner@kernel.org, viro@zeniv.linux.org.uk, Vivek Goyal , Miklos Szeredi Date: Wed, 25 Jan 2023 11:15:59 +0100 In-Reply-To: References: <1ea88c8d1e666b85342374ed7c0ddf7d661e0ee1.camel@redhat.com> <5fb32a1297821040edd8c19ce796fc0540101653.camel@redhat.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.46.2 (3.46.2-1.fc37) MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 2023-01-25 at 18:05 +0800, Gao Xiang wrote: >=20 >=20 > On 2023/1/25 17:37, Alexander Larsson wrote: > > On Tue, 2023-01-24 at 21:06 +0200, Amir Goldstein wrote: > > > On Tue, Jan 24, 2023 at 3:13 PM Alexander Larsson > > > >=20 > ... >=20 > > > >=20 > > > > They are all strictly worse than squashfs in the above testing. > > > >=20 > > >=20 > > > It's interesting to know why and if an optimized mkfs.erofs > > > mkfs.ext4 would have done any improvement. > >=20 > > Even the non-loopback mounted (direct xfs backed) version performed > > worse than the squashfs one. I'm sure a erofs with sparse files > > would > > do better due to a more compact file, but I don't really see how it > > would perform significantly different than the squashfs code. Yes, > > squashfs lookup is linear in directory length, while erofs is > > log(n), > > but the directories are not so huge that this would dominate the > > runtime. > >=20 > > To get an estimate of this I made a broken version of the erofs > > image, > > where the metacopy files are actually 0 byte size rather than > > sparse. > > This made the erofs file 18M instead, and gained 10% in the cold > > cache > > case. This, while good, is not near enough to matter compared to > > the > > others. > >=20 > > I don't think the base performance here is really much dependent on > > the > > backing filesystem. An ls -lR workload is just a measurement of the > > actual (i.e. non-dcache) performance of the filesystem > > implementation > > of lookup and iterate, and overlayfs just has more work to do here, > > especially in terms of the amount of i/o needed. >=20 > I will form a formal mkfs.erofs version in one or two days since > we're > cerebrating Lunar New year now. >=20 > Since you don't have more I/O traces for analysis, I have to do > another > wild guess. >=20 > Could you help benchmark your v2 too? I'm not sure if such > performance also exists in v2.=C2=A0 The reason why I guess as this is > that it seems that you read all dir inode pages when doing the first > lookup, it can benefit to seq dir access. >=20 > I'm not sure if EROFS can make a similar number by doing forcing > readahead on dirs to read all dir data at once as well. >=20 > Apart from that I don't see significant difference, at least > personally > I'd like to know where it could have such huge difference.=C2=A0 I don't > think that is all because of read-only on-disk format differnce. I think the performance difference between v2 and v3 would be rather minor in this case, because I don't think a lot of the directories are large enough to be split in chunks. I also don't believe erofs and composefs should fundamentally differ much in performance here, given that both use a compact binary searchable layout for dirents. However, the full comparison is "composefs" vs "overlayfs + erofs", and in that case composefs wins. --=20 =3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D= -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- =3D-=3D-=3D Alexander Larsson Red Hat, Inc=20 alexl@redhat.com alexander.larsson@gmail.com=20 He's an obese Catholic messiah who knows the secret of the alien=20 invasion. She's a provocative Bolivian single mother living on borrowed time. They fight crime!=20