1 |
-----BEGIN PGP SIGNED MESSAGE----- |
2 |
Hash: SHA1 |
3 |
|
4 |
On 01/28/2014 07:49 AM, Michał Górny wrote: |
5 |
> Hello, |
6 |
> |
7 |
> (I'm CC-ing mirror admins since this may impact space consumption |
8 |
> on mirrors, and gentoo-project to keep it public) |
9 |
> |
10 |
> As you may have noticed, I was playing with providing and efficiently |
11 |
> updating SquashFS images for our users. A few notes of what has been |
12 |
> decided so far: |
13 |
> |
14 |
> 1. the SquashFS images would be LZO-compressed (with LZ4 switch planned |
15 |
> when the kernels with it are spread enough), since it provides very |
16 |
> good compression with great decompression speed and low requirements, |
17 |
|
18 |
I would suggest XZ over both LZO and LZ4 (and even LZ4HC). Compression |
19 |
time isn't really a major concern (imho) and the resulting files are |
20 |
much smaller yet easy to decompress and with (reasonably) low ram |
21 |
requirement for doing so. |
22 |
|
23 |
- -Zero |
24 |
|
25 |
PS> If for whatever reason you choose to use lz4 I have support for it |
26 |
in mksquashfs in my overlay and I would be happy to move it into gentoo |
27 |
if there is a call for it. |
28 |
> |
29 |
> 2. the images would be updated through binary deltas made using |
30 |
> xdelta3. |
31 |
> |
32 |
> 3. since the deltas are quite space-inefficient, we won't be downloading |
33 |
> a few day-to-day patches but instead a single combined patch for each |
34 |
> supported day back. IOW, we would have: |
35 |
> |
36 |
> squashfs-20140127-20140128.delta |
37 |
> squashfs-20140126-20140128.delta |
38 |
> squashfs-20140125-20140128.delta |
39 |
> squashfs-20140124-20140128.delta |
40 |
> (...) |
41 |
> |
42 |
> Just to be clear, I don't want to replace the current snapshot+patch |
43 |
> since it's more space-efficient. However, I'd like to provide |
44 |
> an alternative for users for whom bandwidth is not a concern, but |
45 |
> memory and/or time is. |
46 |
> |
47 |
> More details can be found in my article on SquashFS deltas [1]. |
48 |
> |
49 |
> |
50 |
> I'd like to raise the following questions: |
51 |
> |
52 |
> 1. Is infra@ ok with building the snapshots & deltas? |
53 |
> |
54 |
> 2. Do our mirror admins have any concerns wrt this? |
55 |
> |
56 |
> 3. How many days old snapshots do we want to support? That is, after |
57 |
> how many days of not updating the user is supposed to download |
58 |
> the whole new image rather than a patch? |
59 |
> |
60 |
> |
61 |
> Now for the numbers: |
62 |
> |
63 |
> 1) build server use: |
64 |
> |
65 |
> a) disk space: |
66 |
> |
67 |
> ~100M for each snapshot (we need to keep the past snapshots |
68 |
> for delta updates) |
69 |
> |
70 |
> 6M-20M for early deltas, up to 40M for month-old delta |
71 |
> |
72 |
> likely no extra space requirements if we hack the update in .tar |
73 |
> generation |
74 |
> |
75 |
> for 30 days backlog, I suspect around 3G for snapshots |
76 |
> + 1G for deltas |
77 |
> |
78 |
> b) memory: |
79 |
> |
80 |
> no noticeable impact |
81 |
> |
82 |
> c) CPU: |
83 |
> |
84 |
> LZO compression has relatively small impact |
85 |
> |
86 |
> around 7s heavy CPU use for xdelta3 (on i3 1.8 GHz) |
87 |
> |
88 |
> d) time: |
89 |
> |
90 |
> about 1 minute to build SquashFS |
91 |
> |
92 |
> for delta gen: ceil(n / c) * 7 seconds, |
93 |
> where n = number of days, c = number of CPUs |
94 |
> |
95 |
> e) uplink bandwidth: |
96 |
> |
97 |
> mirrors will have to download all the deltas during sync, |
98 |
> e.g. 1G every day |
99 |
> |
100 |
> 2) mirror use: |
101 |
> |
102 |
> a) disk space: |
103 |
> |
104 |
> ~100M for the snapshot (it's enough to mirror the latest one) |
105 |
> |
106 |
> 6M-20M for early deltas, up to 40M for month-old delta |
107 |
> |
108 |
> for 30 days of backlog, I suspect around 1G |
109 |
> |
110 |
> b) uplink bandwidth: |
111 |
> |
112 |
> every switching user will download ~100M initial image |
113 |
> |
114 |
> users who sync daily will dl 6-10M every day |
115 |
> |
116 |
> users who sync often will dl 20-40M a week |
117 |
> |
118 |
> users who sync rarely will dl 40M-80M a month |
119 |
> |
120 |
> c) downlink bandwidth: |
121 |
> |
122 |
> depending on the no of days supported, for 30 days ~1G every day |
123 |
> |
124 |
> 3) client impact |
125 |
> |
126 |
> a) disk space: |
127 |
> |
128 |
> ~100M for current SquashFS (that is used by the package manager) |
129 |
> |
130 |
> during update, 10M-40M for the delta (depending on how outdated |
131 |
> the image is) |
132 |
> |
133 |
> b) downlink bandwidth: |
134 |
> |
135 |
> 10M-40M for the delta (for each update) |
136 |
> |
137 |
> c) memory & CPU: |
138 |
> |
139 |
> negligible |
140 |
> |
141 |
> d) time: |
142 |
> |
143 |
> fetching time + around 5 s for the update |
144 |
> |
145 |
> |
146 |
> [1]:http://dev.gentoo.org/~mgorny/articles/using-deltas-to-speed-up-squashfs-ebuild-repository-updates.pdf |
147 |
> |
148 |
|
149 |
-----BEGIN PGP SIGNATURE----- |
150 |
Version: GnuPG v2.0.22 (GNU/Linux) |
151 |
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ |
152 |
|
153 |
iQIcBAEBAgAGBQJS6BR9AAoJEKXdFCfdEflKO84P/jffUBF5OcVNNNfpmPRuE36J |
154 |
x5voPKDRWxJ5WwRB4cBt9yWKxqegrTIiFQV9v0i19zJR5JVsdRDb5zOGeDwOPZW/ |
155 |
x7pmDTM5WVoFefmVPBeENAjCMmxikenMBGiDjkkyYInbsIw87tThVFMJTm89hXdi |
156 |
gvDQW5rgfc8eaBhRZH9V5WGEE/vvionCr20oMv+DbDlUNQxJ/+Ldf5v1wbejJEey |
157 |
wwZBDbP/NwDsxn6G3ymya4+o/e89YaTq76Yk3Oaacm26Jq/oUWwMio90lkQPmKAp |
158 |
LGYOKjjE9bVgJomklWgSKh2RKKNNPXy2KjTUl6TtRteVhFMYkSlYSNonUgoT6/iC |
159 |
FlsjUQclIGtwRbPPUeveOD6jxhWHpXfFYd3lQL8NU0948hq7FTZSnS3zzEU2sw0Y |
160 |
bCRS3pJNfOZbHgDr2Pv4BhG2wBCji7oudhQFd9fn78DrwNk32/wKP7GvUzEvdgWr |
161 |
1R0JRJNcZVTbxiRiVFpox2+pxHdc7vMH4IHAsNJ2SG7BTJKZEduco0zAR50igNd8 |
162 |
+tgM2SQh5eht4/tR/1syyXfjYAq+rZTHklhSt6nQ1n+OlEaPnNnt6Q8TJlrMGBeR |
163 |
ZNpiggnCUPq8Vtbaj6WqLsPZuV6lOsRPt/mh9r5QN3JYsjlpxaMlKm4tOiOhABZJ |
164 |
TUyYNn7VB6CgAO9vQG/k |
165 |
=fLkA |
166 |
-----END PGP SIGNATURE----- |