]> git.proxmox.com Git - proxmox-backup.git/blame - README.rst
ui: sync view: increase default width of 'Max. Depth' column
[proxmox-backup.git] / README.rst
CommitLineData
1d3b2537
TL
1
2Build & Release Notes
3*********************
4
933687d9
DM
5``rustup`` Toolchain
6====================
7
51697c28
DM
8We normally want to build with the ``rustc`` Debian package. To do that
9you can set the following ``rustup`` configuration:
933687d9
DM
10
11 # rustup toolchain link system /usr
51697c28 12 # rustup default system
933687d9
DM
13
14
0eaa4a78
FG
15Versioning of proxmox helper crates
16===================================
17
18To use current git master code of the proxmox* helper crates, add::
19
dd76eba7 20 git = "git://git.proxmox.com/git/proxmox"
0eaa4a78 21
88625f20
FG
22or::
23
24 path = "../proxmox/proxmox"
25
0eaa4a78
FG
26to the proxmox dependency, and update the version to reflect the current,
27pre-release version number (e.g., "0.1.1-dev.1" instead of "0.1.0").
28
b0b00c4a 29
88625f20
FG
30Local cargo config
31==================
0eaa4a78 32
88625f20
FG
33This repository ships with a ``.cargo/config`` that replaces the crates.io
34registry with packaged crates located in ``/usr/share/cargo/registry``.
0eaa4a78 35
88625f20
FG
36A similar config is also applied building with dh_cargo. Cargo.lock needs to be
37deleted when switching between packaged crates and crates.io, since the
0eaa4a78 38checksums are not compatible.
88625f20
FG
39
40To reference new dependencies (or updated versions) that are not yet packaged,
41the dependency needs to point directly to a path or git source (e.g., see
42example for proxmox crate above).
b0b00c4a
HL
43
44
45Build
46=====
9294ed64 47on Debian 12 Bookworm
b0b00c4a
HL
48
49Setup:
1300994a
TL
50 1. # echo 'deb http://download.proxmox.com/debian/devel/ bookworm main' | sudo tee /etc/apt/sources.list.d/proxmox-devel.list
51 2. # sudo wget https://enterprise.proxmox.com/debian/proxmox-release-bookworm.gpg -O /etc/apt/trusted.gpg.d/proxmox-release-bookworm.gpg
dd76eba7
TL
52 3. # sudo apt update
53 4. # sudo apt install devscripts debcargo clang
54 5. # git clone git://git.proxmox.com/git/proxmox-backup.git
1d3b2537 55 6. # cd proxmox-backup; sudo mk-build-deps -ir
dd76eba7
TL
56
57Note: 2. may be skipped if you already added the PVE or PBS package repository
b0b00c4a 58
1d3b2537 59You are now able to build using the Makefile or cargo itself, e.g.::
60e6ee46 60
9294ed64 61 # make deb
1d3b2537
TL
62 # # or for a non-package build
63 # cargo build --all --release
60e6ee46
DM
64
65Design Notes
1d3b2537 66************
60e6ee46
DM
67
68Here are some random thought about the software design (unless I find a better place).
69
70
71Large chunk sizes
1d3b2537 72=================
60e6ee46 73
1d3b2537
TL
74It is important to notice that large chunk sizes are crucial for performance.
75We have a multi-user system, where different people can do different operations
76on a datastore at the same time, and most operation involves reading a series
77of chunks.
60e6ee46 78
1d3b2537
TL
79So what is the maximal theoretical speed we can get when reading a series of
80chunks? Reading a chunk sequence need the following steps:
60e6ee46 81
1d3b2537 82- seek to the first chunk's start location
60e6ee46 83- read the chunk data
1d3b2537 84- seek to the next chunk's start location
60e6ee46
DM
85- read the chunk data
86- ...
87
88Lets use the following disk performance metrics:
89
90:AST: Average Seek Time (second)
91:MRS: Maximum sequential Read Speed (bytes/second)
92:ACS: Average Chunk Size (bytes)
93
94The maximum performance you can get is::
95
96 MAX(ACS) = ACS /(AST + ACS/MRS)
97
98Please note that chunk data is likely to be sequential arranged on disk, but
99this it is sort of a best case assumption.
100
101For a typical rotational disk, we assume the following values::
102
103 AST: 10ms
104 MRS: 170MB/s
105
106 MAX(4MB) = 115.37 MB/s
107 MAX(1MB) = 61.85 MB/s;
108 MAX(64KB) = 6.02 MB/s;
109 MAX(4KB) = 0.39 MB/s;
110 MAX(1KB) = 0.10 MB/s;
111
112Modern SSD are much faster, lets assume the following::
113
114 max IOPS: 20000 => AST = 0.00005
115 MRS: 500Mb/s
116
117 MAX(4MB) = 474 MB/s
118 MAX(1MB) = 465 MB/s;
119 MAX(64KB) = 354 MB/s;
120 MAX(4KB) = 67 MB/s;
121 MAX(1KB) = 18 MB/s;
37f1b7dd
DM
122
123
124Also, the average chunk directly relates to the number of chunks produced by
125a backup::
126
127 CHUNK_COUNT = BACKUP_SIZE / ACS
128
129Here are some staticics from my developer worstation::
130
131 Disk Usage: 65 GB
132 Directories: 58971
133 Files: 726314
134 Files < 64KB: 617541
135
136As you see, there are really many small files. If we would do file
137level deduplication, i.e. generate one chunk per file, we end up with
138more than 700000 chunks.
139
140Instead, our current algorithm only produce large chunks with an
141average chunks size of 4MB. With above data, this produce about 15000
142chunks (factor 50 less chunks).