From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by lists.proxmox.com (Postfix) with ESMTPS id 15C4072FA5 for ; Wed, 14 Apr 2021 15:25:31 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 0172EF223 for ; Wed, 14 Apr 2021 15:25:01 +0200 (CEST) Received: from proxmox-new.maurer-it.com (proxmox-new.maurer-it.com [212.186.127.180]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by firstgate.proxmox.com (Proxmox) with ESMTPS id 818DAF217 for ; Wed, 14 Apr 2021 15:24:56 +0200 (CEST) Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1]) by proxmox-new.maurer-it.com (Proxmox) with ESMTP id 4BD1E45A9E for ; Wed, 14 Apr 2021 15:24:56 +0200 (CEST) Date: Wed, 14 Apr 2021 15:24:48 +0200 From: Fabian =?iso-8859-1?q?Gr=FCnbichler?= To: Proxmox Backup Server development discussion References: <20210413143536.19004-1-d.csapak@proxmox.com> In-Reply-To: <20210413143536.19004-1-d.csapak@proxmox.com> MIME-Version: 1.0 User-Agent: astroid/0.15.0 (https://github.com/astroidmail/astroid) Message-Id: <1618404441.noyvv5e419.astroid@nora.none> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-SPAM-LEVEL: Spam detection results: 0 AWL 0.026 Adjusted score from AWL reputation of From: address KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment RCVD_IN_DNSWL_MED -2.3 Sender listed at https://www.dnswl.org/, medium trust SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Subject: Re: [pbs-devel] [PATCH proxmox-backup] backup/verify: improve speed by sorting chunks by inode X-BeenThere: pbs-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox Backup Server development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Apr 2021 13:25:31 -0000 On April 13, 2021 4:35 pm, Dominik Csapak wrote: > before reading the chunks from disk in the order of the index file, > stat them first and sort them by inode number. >=20 > this can have a very positive impact on read speed on spinning disks, > even with the additional stat'ing of the chunks. >=20 > memory footprint should be tolerable, for 1_000_000 chunks > we need about ~16MiB of memory (Vec of 64bit position + 64bit inode) > (assuming 4MiB Chunks, such an index would reference 4TiB of data) >=20 > two small benchmarks (single spinner, ext4) here showed an improvement fr= om > ~430 seconds to ~330 seconds for a 32GiB fixed index > and from > ~160 seconds to ~120 seconds for a 10GiB dynamic index >=20 > Signed-off-by: Dominik Csapak > --- > it would be great if other people could also benchmark this patch on > different setups a little (in addition to me), to verify or disprove my r= esults zfs with single spinner + fast special device, with a (not counted ;))=20 warmup run and everything fitting into cache: Benchmark #1: stock Time (mean =C2=B1 =CF=83): 21.407 s =C2=B1 0.819 s [User: 20.1 ms= , System: 15.2 ms] Range (min =E2=80=A6 max): 21.070 s =E2=80=A6 23.078 s 6 runs Benchmark #2: patched Time (mean =C2=B1 =CF=83): 47.119 s =C2=B1 0.018 s [User: 29.5 ms= , System: 15.1 ms] Range (min =E2=80=A6 max): 47.107 s =E2=80=A6 47.154 s 6 runs Summary 'stock' ran 2.20 =C2=B1 0.08 times faster than 'patched' same setup, but ARC reduced so that verified data > ARC and we start=20 bottle-necking on the spinner: Benchmark #1: stock Time (mean =C2=B1 =CF=83): 367.821 s =C2=B1 0.801 s [User: 195.9 = ms, System: 80.0 ms] Range (min =E2=80=A6 max): 366.840 s =E2=80=A6 368.802 s 4 runs Benchmark #2: patched Time (mean =C2=B1 =CF=83): 406.391 s =C2=B1 1.304 s [User: 188.3 = ms, System: 100.8 ms] Range (min =E2=80=A6 max): 404.891 s =E2=80=A6 407.919 s 4 runs Summary 'stock' ran 1.10 =C2=B1 0.00 times faster than 'patched' both benchmarks for verifying a datastore with ~12G of on-disk chunk=20 data. =