Block Size Estimation Tool - I Built a Tool, Looking for Testers

TL;DR

I wrote a tool to help accurately determine the proper --block-size and --dblock-size values for Duplicati backups based on a system’s actual file configuration, not estimation or guesswork. I’m looking for people to review and test it out. Full info can be found on GitHub (repo installation not required) at GitHub - HandyGuySoftware/duplicati-estimator: Recommends optimal --block-size and --dblock-size values for a Duplicati backup job, based on your actual data and where you're backing it up to. · GitHub . All feedback is welcome.

The Full Story

Hi all,

As I have stated in other posts, I am currently reviewing and updating my entire Duplicati backup fleet (15 machines, ~30 backup jobs). The current configuration was built up over several years and the backup configurations were developed through guessing, trial, and error. Mostly error. I’ve read through all the Forum posts on the subject trying to come up with some type of consensus, but they all boiled down to one fact: the optimal settings depend entirely on the makeup of the files on your specific system. So I set out to create a tool that would analyze the files on a system, then use that information to recommend optimal --block-size and --dblock-size values for a backup job.

The tool runs in 2 parts:

  • For the first part you run a small piece of code on your local system (available in Python or PowerShell) to analyze the source files and directories to determine their sizes and composition. The code produces a small JSON file containing the system’s file size data.
  • The second part is a JavaScript-based web page where you upload the JSON file. The page analyzes the size data and calculates the optimal --block-size and --dblock-size sizes for those source files. It also shows statistical information about the file configuration and explains how it arrived at the recommended values.

The logic behind the tool is based on multiple Duplicati Forum posts, most notably “Choosing sizes in Duplicati” and related threads on block-size rules of thumb, cloud-volume convergence, and performance benchmarks, as well as the awesome Duplicati Storage Calculator from kees-z.

Privacy Concerns

The tool goes to great lengths to protect your privacy and keep information about your systems confidential.

  • The Python/PowerShell code that runs on your local system only collects file size information. It does not read any file data or any other system information.
  • The JSON file produced by the local tool contains only the aggregate file size information discovered during the directory scan. It does not contain any other identifying system or file information.
  • The web page is written entirely in standard JavaScript and CSS, meaning it runs locally on your browser. It does not store any information and does not transmit any data to any other systems.

The Ask

I am looking for people to review the tool, test it out on their own systems, and let me know what you think.

  • Does it produce what you would expect for recommended values?
  • Do the recommendations seem reasonable?
  • Do you have any suggested changes or improvement recommendations?

The goal is to produce a tool for the community that can provide reasonable suggestions for these parameters so new users can configure their backups correctly the first time. Any comments or advice anyone can provide would be helpful.

Full description and repo at GitHub - HandyGuySoftware/duplicati-estimator: Recommends optimal --block-size and --dblock-size values for a Duplicati backup job, based on your actual data and where you're backing it up to. · GitHub . The online version of the analyzer web page is at Duplicati Size Estimator . You can also download the code and run everything locally.

Example Outputs

To provide some sample outputs, here are the tool’s recommendations based on actual systems in my environment.

Laptop 1

Pattern: Normal

Size bucket Files Total bytes Share of files
<10 KB 32,421 62 MB 54.00%
10-100 KB 10,853 396 MB 18.10%
100 KB-1 MB 6,235 1.84 GB 10.40%
1-10 MB 5,928 31 GB 9.90%
10-100 MB 4,510 122 GB 7.50%
100 MB-1 GB 80 24 GB 0.10%
1-10 GB 27 75 GB <0.1%
>10 GB 0 0 B 0.00%

Recommended settings

Target --block-size --dblock-size
NAS 250kb 50mb
Cloud 250kb 500mb

DevServer

Pattern: Normal

Size bucket Files Total bytes Share of files
<10 KB 44,288 159 MB 83.30%
10-100 KB 8,118 158 MB 15.30%
100 KB-1 MB 638 170 MB 1.20%
1-10 MB 77 224 MB 0.10%
10-100 MB 20 825 MB <0.1%
100 MB-1 GB 2 272 MB <0.1%
1-10 GB 0 0 B 0.00%
>10 GB 0 0 B 0.00%

Recommended settings

Target --block-size --dblock-size
NAS 100kb 50mb
Cloud 100kb 500mb

MediaServer 1

Pattern: Normal

Size bucket Files Total bytes Share of files
<10 KB 100 460 KB 22.10%
10-100 KB 17 596 KB 3.80%
100 KB-1 MB 2 652 KB 0.40%
1-10 MB 3 5.4 MB 0.70%
10-100 MB 3 199 MB 0.70%
100 MB-1 GB 118 74 GB 26.00%
1-10 GB 208 654 GB 45.90%
>10 GB 2 59 GB 0.40%

Recommended settings

Target --block-size --dblock-size
NAS 750kb 150mb
Cloud LAN Only LAN Only

MediaServer 2

Pattern: Archival

Size bucket Files Total bytes Share of files
<10 KB 2,991 16 MB 15.20%
10-100 KB 2,771 109 MB 14.10%
100 KB-1 MB 405 178 MB 2.10%
1-10 MB 11,281 57 GB 57.30%
10-100 MB 1,271 18 GB 6.50%
100 MB-1 GB 818 389 GB 4.20%
1-10 GB 157 430 GB 0.80%
>10 GB 5 135 GB <0.1%

Recommended settings

Target --block-size --dblock-size
NAS 1500kb 200mb
Cloud LAN Only LAN Only

MediaServer 3

Pattern: Archival

Size bucket Files Total bytes Share of files
<10 KB 13,526 53 MB 13.20%
10-100 KB 1,667 92 MB 1.60%
100 KB-1 MB 11,424 6.46 GB 11.10%
1-10 MB 67,875 250 GB 66.20%
10-100 MB 7,298 150 GB 7.10%
100 MB-1 GB 660 195 GB 0.60%
1-10 GB 95 195 GB <0.1%
>10 GB 2 38 GB <0.1%

Recommended settings

Target --block-size --dblock-size
NAS 1000kb 150mb
Cloud 1000kb 500mb

MediaServer 4

Pattern: Normal

Size bucket Files Total bytes Share of files
<10 KB 2,148 6.5 MB 67.80%
10-100 KB 905 23 MB 28.60%
100 KB-1 MB 87 23 MB 2.70%
1-10 MB 24 62 MB 0.80%
10-100 MB 4 191 MB 0.10%
100 MB-1 GB 0 0 B 0.00%
1-10 GB 0 0 B 0.00%
>10 GB 0 0 B 0.00%

Recommended settings

Target --block-size --dblock-size
NAS 100kb 50mb
Cloud 100kb 500mb

NasServer

Pattern: Normal

Size bucket Files Total bytes Share of files
<10 KB 8,478 60 MB 83.40%
10-100 KB 1,240 17 MB 12.20%
100 KB-1 MB 314 62 MB 3.10%
1-10 MB 105 643 MB 1.00%
10-100 MB 22 634 MB 0.20%
100 MB-1 GB 0 0 B 0.00%
1-10 GB 1 1.65 GB <0.1%
>10 GB 0 0 B 0.00%

Recommended settings

Target --block-size --dblock-size
NAS 100kb 50mb
Cloud 100kb 500mb

Laptop 2

Pattern: Normal

Size bucket Files Total bytes Share of files
<10 KB 1,790 2.5 MB 49.80%
10-100 KB 1,280 51 MB 35.60%
100 KB-1 MB 327 86 MB 9.10%
1-10 MB 184 567 MB 5.10%
10-100 MB 13 413 MB 0.40%
100 MB-1 GB 0 0 B 0.00%
1-10 GB 0 0 B 0.00%
>10 GB 0 0 B 0.00%

Recommended settings

Target --block-size --dblock-size
NAS Cloud Only Cloud Only
Cloud 100kb 500mb

Laptop 3

Pattern: Normal

Size bucket Files Total bytes Share of files
<10 KB 14,723 16 MB 46.90%
10-100 KB 5,294 264 MB 16.90%
100 KB-1 MB 6,117 2.27 GB 19.50%
1-10 MB 4,919 14 GB 15.70%
10-100 MB 268 13 GB 0.90%
100 MB-1 GB 35 6.80 GB 0.10%
1-10 GB 2 7.17 GB <0.1%
>10 GB 2 30 GB <0.1%

Recommended settings

Target --block-size --dblock-size
NAS 100kb 50mb
Cloud 100kb 500mb

Looks very nice!

There is also an auto tuning tool included in Duplicati, but it does not cover this particular aspect.