From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id SDrWC0wKk2T+wQAASxT56A (envelope-from ) for ; Wed, 21 Jun 2023 16:33:48 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id SFqnC0wKk2QTMwEA9RJhRA (envelope-from ) for ; Wed, 21 Jun 2023 16:33:48 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 0939DC40A for ; Wed, 21 Jun 2023 16:33:48 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qBytN-0002Lz-Hi; Wed, 21 Jun 2023 10:33:05 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qBytG-0002LT-Mx for guix-devel@gnu.org; Wed, 21 Jun 2023 10:33:03 -0400 Received: from mail-40136.proton.ch ([185.70.40.136]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qBytE-0004W8-13 for guix-devel@gnu.org; Wed, 21 Jun 2023 10:32:58 -0400 Date: Wed, 21 Jun 2023 14:32:33 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lendvai.name; s=protonmail3; t=1687357967; x=1687617167; bh=QMHxA3boHoZovmxgt/Al0izvFoPZXomK31wjSHFpHV0=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID:BIMI-Selector; b=CTjWr49fOSHSlWyDq2P//xGQWsWdmvD2GdlbXbWcQrlGmAugdNoSVFsCeFh155hBc vOYAauOmNdDVjQ7xFvwNL2RBTiNeyM5WNVeXFMAsQTZQhRqsVEeH81zBTjD3faW8Ru uXi7H+5YIPpJvCZdCjNU5MJncME99uknN/wFysYsYOA4ISCOUohYASdh9zUKEsLQRG acKJX1AKiYBYEBj0wNXPlRSOW0H6Mj6ts2XHXji1Ij3wkk2+mN1fzCiB8C28FJdhkR TFUrtaA2QleeoXZ6QH01e9rYQv0xiEKxDHaZoDg+Sueq76Es6Cca49z1+EYgN/987w 6j09o+LBmpNdA== To: Csepp From: Attila Lendvai Cc: guix-devel@gnu.org, pukkamustard Subject: Re: distributed substitutes: file slicing Message-ID: In-Reply-To: <87jzvxoicg.fsf@riseup.net> References: <87jzvxoicg.fsf@riseup.net> Feedback-ID: 28384833:user:proton MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=185.70.40.136; envelope-from=attila@lendvai.name; helo=mail-40136.proton.ch X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: guix-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: guix-devel-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN ARC-Seal: i=1; s=key1; d=yhetil.org; t=1687358028; a=rsa-sha256; cv=none; b=ZkDplf9ncbUl2jS5O5lr//l8z1aecICYcTY8pTUtizOr+fW56a/nyVtzObqvwcl4B0Bkht RdIq+0J5KTLkRH8PDJ1E610EClisNe/jZ3OoMHUbhUcZykiOoj2zb68mQhJatCZU4eg0Wf JrQnDwwYRPrABrr/LfHB/Rl1sf0ZKWR6MBfaqrToUMKi3ldt60q5jDjK+VHKuYLvoI2ySW Ms4mzcjZJMbf7CeL/SdZkapQyWUOSGEeItzCgnM3ziSPIiGKhTk2Mt04McNvuFejoi0xJs BItulnO1fx7wXR4DilczWbp2e5Tduyl7ueQtqeoBEa0EMk+y+3asDZUKSTKMSg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=lendvai.name header.s=protonmail3 header.b=CTjWr49f; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1687358028; h=from:from:sender:sender: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:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=QMHxA3boHoZovmxgt/Al0izvFoPZXomK31wjSHFpHV0=; b=NnxIBSv2fws24O7CstDAj7p2Sg/FwqL3s8zNkSxqu1Z6ylS505BJNXfXGgEX8u7nQ3Of2v 9dORE2OaVE8yw71hmjAPjF3LLaatYFDUz0iNppT7PriHjXK8MwCB9WlyuXsyz1YnHW5wBJ HGaTbtja7c/zMg9wHR/NLLgjPqlPqdUQqhGikr6t8E9qyP6S7Bfxg7Dj/vbVu8v9m9URnf /n3KU2Bf4g2VA2owGhKj1f3OoWK9HHUIJxRxqdtWT+fdTn0k35uj1rIrj3b/7mJmIxrAxd Q6m2YSRwyL8A2wTBvHtSLXtD4KxLgl8u+z4ZnHjInX+fkffYxupzYwe6HUPOjw== Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=lendvai.name header.s=protonmail3 header.b=CTjWr49f; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org" X-Migadu-Scanner: scn0.migadu.com X-Migadu-Spam-Score: -8.55 X-Spam-Score: -8.55 X-Migadu-Queue-Id: 0939DC40A X-TUID: V05q9O433p7q > I have a question / suggestion about the distributed substitutes > project: would downloads be split into uniformly sized chunks or could > the sizes vary? > Specifically, in an extreme case where an update introduced a single > extra byte at the beginning of a file, would that result in completely > new chunks? most (all?) distributed storage solutions have a chunker (including ERIS wi= th its 32k chunks, or Swarm with 4k chunks), and the chunks are content add= ressed, i.e. it also serves as deduplication at the chunk granularity. if the file doesn't just grow, but shifts away a couple of bytes somewhere = in the middle, then this chunk-level deduplication stops happening from tha= t point on. IIRC rar was the first archiver that introduced a very fast deduplication a= lgorithm that detected even the non-aligned duplicated blocks of varying si= zes. i don't think any distributed storage system has anything like that. > An alternative I've been thinking about is this: > find the store references in a file and split it along these references, > optionally apply further chunking to the non-reference blobs. chunking storage systems store only whole chunks, so too much splitting of = files can increase the wasted storage. more so with large chunks, less so w= ith smaller ones. > It's probably best to do this at the NAR level?? >=20 > Storing reference offsets is already something that we should be doing to > speed other operations up, so this could tie in nicely with that. if optimization of grafting is worth this amount of trouble, then maybe the= best is to extend the NAR format to store mutable references in a separate= table at the end of the file. that would speed up guix operations like gra= fting, and help any storage systems that have deduplication, which includes= some copy-on-write filesystems. --=20 =E2=80=A2 attila lendvai =E2=80=A2 PGP: 963F 5D5F 45C7 DFCD 0A39 -- =E2=80=9CIf you shut up truth and bury it under the ground, it will but gro= w, and gather to itself such explosive power that the day it bursts through= it will knock down everything that stands in its way.=E2=80=9D =09=E2=80=94 =C3=89mile Zola (1840=E2=80=931902)