public inbox for pbs-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: "Fabian Grünbichler" <f.gruenbichler@proxmox.com>
To: Proxmox Backup Server development discussion
	<pbs-devel@lists.proxmox.com>
Subject: Re: [pbs-devel] [PATCH proxmox-backup] backup/verify: improve speed by sorting chunks by inode
Date: Wed, 14 Apr 2021 15:24:48 +0200	[thread overview]
Message-ID: <1618404441.noyvv5e419.astroid@nora.none> (raw)
In-Reply-To: <20210413143536.19004-1-d.csapak@proxmox.com>

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.
> 
> this can have a very positive impact on read speed on spinning disks,
> even with the additional stat'ing of the chunks.
> 
> 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)
> 
> two small benchmarks (single spinner, ext4) here showed an improvement from
> ~430 seconds to ~330 seconds for a 32GiB fixed index
> and from
> ~160 seconds to ~120 seconds for a 10GiB dynamic index
> 
> Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
> ---
> 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 results

zfs with single spinner + fast special device, with a (not counted ;)) 
warmup run and everything fitting into cache:

Benchmark #1: stock
  Time (mean ± σ):     21.407 s ±  0.819 s    [User: 20.1 ms, System: 15.2 ms]
  Range (min … max):   21.070 s … 23.078 s    6 runs

Benchmark #2: patched
  Time (mean ± σ):     47.119 s ±  0.018 s    [User: 29.5 ms, System: 15.1 ms]
  Range (min … max):   47.107 s … 47.154 s    6 runs

Summary
  'stock' ran
    2.20 ± 0.08 times faster than 'patched'

same setup, but ARC reduced so that verified data > ARC and we start 
bottle-necking on the spinner:

Benchmark #1: stock
  Time (mean ± σ):     367.821 s ±  0.801 s    [User: 195.9 ms, System: 80.0 ms]
  Range (min … max):   366.840 s … 368.802 s    4 runs

Benchmark #2: patched
  Time (mean ± σ):     406.391 s ±  1.304 s    [User: 188.3 ms, System: 100.8 ms]
  Range (min … max):   404.891 s … 407.919 s    4 runs

Summary
  'stock' ran
    1.10 ± 0.00 times faster than 'patched'

both benchmarks for verifying a datastore with ~12G of on-disk chunk 
data.




  reply	other threads:[~2021-04-14 13:25 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-13 14:35 Dominik Csapak
2021-04-14 13:24 ` Fabian Grünbichler [this message]
2021-04-14 15:42 ` [pbs-devel] applied: " Thomas Lamprecht
2021-04-14  7:17 [pbs-devel] " Dietmar Maurer
2021-04-14 16:44 Dietmar Maurer
2021-04-15  7:19 ` Fabian Grünbichler

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=1618404441.noyvv5e419.astroid@nora.none \
    --to=f.gruenbichler@proxmox.com \
    --cc=pbs-devel@lists.proxmox.com \
    /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
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal