comparison tests/test-upgrade-repo.t @ 40918:3764330f76a6

sparse-revlog: enabled by default The feature provides large benefits. It now seems mature enough to be enabled by default. * It solves catastrophic issues regarding delta storage in revlog, * It allows for shorter delta chain in all repositories, improving performances. Running benchmark of a wide range of operation did not reveal problematic impact. Performance gains are observed where expected. The format is supported by Mercurial version 4.7. So it seems safe to enable it by default now. Here is a reminder of key numbers regarding this delta strategy effect on repository size and performance. Effect on Size: =============== For repositories with a lot of branches, sparse-revlog significantly improve size, fixing limitation associated with the span of a delta chain. In addition, sparse-revlog, deal well with limitations of the delta chain length. For large repositories, this allows for a stiff reduction of the delta chain without a problematic impact on the repository size. This delta chain length improvement helps all repositories, not just the ones with many branches. As a reminder, here are the default chain limits for each "format": * no-sparse: none * sparse: 1000 Mercurial --------- Manifest Size: limit | none | 1000 ------------|-------------|------------ no-sparse | 6 143 044 | 6 269 496 sparse | 5 798 796 | 5 827 025 Manifest Chain length data limit || none || 1000 value || average | max || average | max ------------||---------|---------||---------|--------- no-sparse || 429 | 1 397 || 397 | 1 000 sparse || 326 | 1 290 || 313 | 1 000 Full Store Size limit | none | 1000 ------------|-------------|------------ no-sparse | 46 944 775 | 47 166 129 sparse | 46 622 445 | 46 723 774 pypy ---- Manifest Size: limit | none | 1000 ------------|-------------|------------ no-sparse | 52 941 760 | 56 200 970 sparse | 26 348 229 | 27 384 133 Manifest Chain length data limit || none || 1000 value || average | max || average | max ------------||---------|---------||---------|--------- no-sparse || 769 | 3 889 || 390 | 1 000 sparse || 1 223 | 3 846 || 495 | 1 000 Full Store Size limit | none | 1000 ------------|-------------|------------ no-sparse | 336 050 203 | 339 309 413 sparse | 338 673 985 | 339 709 889 Mozilla ------- Manifest Size: limit | none | 1000 ------------|----------------|--------------- no-sparse | 215 096 339 | 1 708 853 525 sparse | 188 947 271 | 278 894 170 Manifest Chain length data limit || none || 1000 value || average | max || average | max ------------||---------|---------||---------|-------- no-sparse || 20 454 | 59 562 || 491 | 1 000 sparse || 23 509 | 69 891 || 489 | 1 000 Full Store Size limit | none | 1000 ------------|----------------|--------------- no-sparse | 2 377 578 715 | 3 876 258 798 sparse | 2 441 677 137 | 2 535 997 381 Netbeans -------- Manifest Size: limit | none | 1000 ------------|----------------|--------------- no-sparse | 130 088 982 | 741 590 565 sparse | 118 836 887 | 159 161 207 Manifest Chain length data limit || none || 1000 value || average | max || average | max ------------||---------|---------||---------|--------- no-sparse || 19 321 | 61 397 || 510 | 1 000 sparse || 21 240 | 61 583 || 503 | 1 000 Full Store Size limit | none | 1000 ------------|----------------|--------------- no-sparse | 1 160 013 008 | 1 771 514 591 sparse | 1 164 959 988 | 1 205 284 308 Private repo #1 --------------- Manifest Size: limit | none | 1000 ------------|-----------------|--------------- no-sparse | 33 725 285 081 | 33 724 834 190 sparse | 350 542 420 | 423 470 579 Manifest Chain length data limit || none || 1000 value || average | max || average | max ------------||---------|---------||---------|--------- no-sparse || 282 | 8 885 || 113 | 1 000 snapshot || 3 655 | 8 951 || 530 | 1 000 Full Store Size limit | none | 1000 ------------|----------------|--------------- no-sparse | 41 544 149 652 | 41 543 698 761 sparse | 8 448 037 300 | 8 520 965 459 Effect on speed: ================ Performances are strongly impacted by the delta chain length. Longer chain results in slower revision restoration. For this reason, the 1000 chain limit introduced by sparse-revlog helps repository with previously large chains a lot. In our corpus, this means `netbeans` and `mozilla-central` who suffered from unreasonable manifest delta chain length. Another way sparse revlog helps, is by producing better delta's. For repositories with many branches, the pathological patterns that resulted in many sub-optimal deltas are gone. Smaller delta help with operations where deltas are directly relevant, like bundle. However, the sparse-revlog logic introduces some extra processing and a more throughout testing of possible delta candidates. Adding an extra cost in some cases. This cost is usually counterbalanced by the other performance gain. However, for smaller repositories not affected by delta chain length issues or branching related issues, this might make things a bit slower. However, these are also repository where revlog performance is dwarfed by other costs. Below are the summary of some timing from the performance test suite running at `http://perf.octobus.net/` for a handful of key commands and operation. It is important to keep in mind that most of this command works on the tip part of the repository. The non-sparse and sparse version produce different delta chains and the tip revision can end up at an arbitrary point of these chains. This will impact some performance number listed in this summary. For the record: here is the delta chain length for the tip revision of manifest log in the benchmarked repository: | no-sparse | sparse | mercurial | 94 | 904 | pypy | 23 | 673 | netbeans | 4158 | 258 | mozilla | 63263 | 781 | As you can see, the chain length for mercurial and pypy turn out to be significantly longer. The netbeans and mozilla one get shorter because these repositories benefit from the maximum chain length. Timing for `hg commit`: ----------------------- The time taken by `hg commit` does not varies significantly, no drawback for using sparse here. | no-sparse | sparse | mercurial | 68.1ms | 66.7ms | pypy | 95.0ms | 94.1ms | netbeans | 614.0ms | 611.0ms | mozilla | 1340.0ms | 1.320.0ms | Check the final section for statistics on a wider array of write. Timing for bundling 10 000 changesets ------------------------------------- The repository that benefits from better delta see a good performance boost. The other ones are not significantly affected. | no-sparse | sparse | mercurial | 3.1s | 3.0s | pypy | 25.1s | 7.5s | netbeans | 24.2s | 17.0s | mozilla | 23.7s | 25.0s | Timing for unbundling 1 000 changesets -------------------------------------- Mercurial and mozilla are unaffected. The pypy repository benefit well from the better delta. However, the netbeans repository takes a visible hit. Digging that difference reveals that it comes from the sparse-revlog bundle having to deal with a snapshot that was re-encoded in the bundle. The slow path for adding new a revision had to be triggered for it, slowing things down. The Sparse versions do not have such snapshot to handle similar cases in the tested configuration. | no-sparse | sparse | mercurial | 519ms | 502ms | pypy | 1.270ms | 886ms | netbeans | 1.370ms | 2.250ms | mozilla | 3.230ms | 3.210ms | Netbeans benefits from the better deltas in other dimensions too. For example, the produced bundle is significantly smaller: * netbeans-no-sparse.hg: 2.3MB * netbeans-sparse.hg: 1.9MB Timing to restore the tip most manifest entry: ---------------------------------------------- Nothing surprising here. The timing for mercurial and pypy are within a small range where they won't affect performance much. In our tested case, they are slower as they use a longer chain. Timing for netbeans and mozilla improves a lot. Removing a significant amount of time. | no-sparse | sparse | mercurial | 1.09ms | 3.15ms | pypy | 4.11ms | 10.70ms | netbeans | 239.00ms | 112.00ms | mozilla | 688.00ms | 198.00ms | Reading 100 revision in descending order: ----------------------------------------- We see the same kind of effect when reading the last 100 revisions. Large boost for netbeans and mozilla, as they use much smaller delta chain. Mercurial and pypy longer chain means slower reads, but nothing gets out of control. | no-sparse | sparse | mercurial | 0.089s | 0.268s | pypy | 0.259s | 0.698s | netbeans | 125.000s | 20.600s | mozilla | 23.000s | 11.400s | Writing from full text: statistic for the last 30K revisions ------------------------------------------------------------ This benchmark adds revisions to revlog from their full text. This is similar to the work done during a commit, but for a large amount of revisions so that we get a more relevant view. We see better overall performances with sparse-revlog. The very worst case is usually slower with sparse-revlog, but does not gets out of control. For the vast majorities of the other writes, sparse-revlog is significantly faster for larger repositories. This is reflected in the accumulated rewrite time for netbeans and mozilla. The notable exception is the pypy repository where things get slower. The extra processing is not balanced by shorter delta chain. However, this is to be seen as a blocking issue. First, the overall time spend dealing with revlog for the repository pypy size is small compared to the other costs, so we get slower on operations that matter less than for other larger repository. Second, we still get nice size benefit from using sparse-revlog, smaller repo size brings other usability and speed benefit (eg: bundle size). max time | no-sparse | sparse | mercurial | 0.010143s | 0.045280s | pypy | 0.034924s | 0.243288s | netbeans | 0.605371s | 2.130876s | mozilla | 1.478342s | 3.424541s | 99% time | no-sparse | sparse | mercurial | 0.003774s | 0.003758s | pypy | 0.017387s | 0.025310s | netbeans | 0.576913s | 0.271195s | mozilla | 1.478342s | 0.449661s | 95% time | no-sparse | sparse | mercurial | 0.002069s | 0.002120s | pypy | 0.010141s | 0.014797s | netbeans | 0.540202s | 0.258644s | mozilla | 0.654830s | 0.243440s | full time | no-sparse | sparse | mercurial | 14.15s | 14.87s | pypy | 90.50s | 137.12s | netbeans | 6401.06s | 3411.14s | mozilla | 3086.89s | 1991.97s | Differential Revision: https://phab.mercurial-scm.org/D5345
author Boris Feld <boris.feld@octobus.net>
date Mon, 12 Nov 2018 01:22:38 +0100
parents e8cd688b2eb1
children 5608b5a6c323
comparison
equal deleted inserted replaced
40917:e8cd688b2eb1 40918:3764330f76a6
54 $ hg debugformat 54 $ hg debugformat
55 format-variant repo 55 format-variant repo
56 fncache: yes 56 fncache: yes
57 dotencode: yes 57 dotencode: yes
58 generaldelta: yes 58 generaldelta: yes
59 sparserevlog: no 59 sparserevlog: yes
60 plain-cl-delta: yes 60 plain-cl-delta: yes
61 compression: zlib 61 compression: zlib
62 $ hg debugformat --verbose 62 $ hg debugformat --verbose
63 format-variant repo config default 63 format-variant repo config default
64 fncache: yes yes yes 64 fncache: yes yes yes
65 dotencode: yes yes yes 65 dotencode: yes yes yes
66 generaldelta: yes yes yes 66 generaldelta: yes yes yes
67 sparserevlog: no no no 67 sparserevlog: yes yes yes
68 plain-cl-delta: yes yes yes 68 plain-cl-delta: yes yes yes
69 compression: zlib zlib zlib 69 compression: zlib zlib zlib
70 $ hg debugformat --verbose --config format.usefncache=no 70 $ hg debugformat --verbose --config format.usefncache=no
71 format-variant repo config default 71 format-variant repo config default
72 fncache: yes no yes 72 fncache: yes no yes
73 dotencode: yes no yes 73 dotencode: yes no yes
74 generaldelta: yes yes yes 74 generaldelta: yes yes yes
75 sparserevlog: no no no 75 sparserevlog: yes yes yes
76 plain-cl-delta: yes yes yes 76 plain-cl-delta: yes yes yes
77 compression: zlib zlib zlib 77 compression: zlib zlib zlib
78 $ hg debugformat --verbose --config format.usefncache=no --color=debug 78 $ hg debugformat --verbose --config format.usefncache=no --color=debug
79 format-variant repo config default 79 format-variant repo config default
80 [formatvariant.name.mismatchconfig|fncache: ][formatvariant.repo.mismatchconfig| yes][formatvariant.config.special| no][formatvariant.default| yes] 80 [formatvariant.name.mismatchconfig|fncache: ][formatvariant.repo.mismatchconfig| yes][formatvariant.config.special| no][formatvariant.default| yes]
81 [formatvariant.name.mismatchconfig|dotencode: ][formatvariant.repo.mismatchconfig| yes][formatvariant.config.special| no][formatvariant.default| yes] 81 [formatvariant.name.mismatchconfig|dotencode: ][formatvariant.repo.mismatchconfig| yes][formatvariant.config.special| no][formatvariant.default| yes]
82 [formatvariant.name.uptodate|generaldelta: ][formatvariant.repo.uptodate| yes][formatvariant.config.default| yes][formatvariant.default| yes] 82 [formatvariant.name.uptodate|generaldelta: ][formatvariant.repo.uptodate| yes][formatvariant.config.default| yes][formatvariant.default| yes]
83 [formatvariant.name.uptodate|sparserevlog: ][formatvariant.repo.uptodate| no][formatvariant.config.default| no][formatvariant.default| no] 83 [formatvariant.name.uptodate|sparserevlog: ][formatvariant.repo.uptodate| yes][formatvariant.config.default| yes][formatvariant.default| yes]
84 [formatvariant.name.uptodate|plain-cl-delta:][formatvariant.repo.uptodate| yes][formatvariant.config.default| yes][formatvariant.default| yes] 84 [formatvariant.name.uptodate|plain-cl-delta:][formatvariant.repo.uptodate| yes][formatvariant.config.default| yes][formatvariant.default| yes]
85 [formatvariant.name.uptodate|compression: ][formatvariant.repo.uptodate| zlib][formatvariant.config.default| zlib][formatvariant.default| zlib] 85 [formatvariant.name.uptodate|compression: ][formatvariant.repo.uptodate| zlib][formatvariant.config.default| zlib][formatvariant.default| zlib]
86 $ hg debugformat -Tjson 86 $ hg debugformat -Tjson
87 [ 87 [
88 { 88 {
102 "default": true, 102 "default": true,
103 "name": "generaldelta", 103 "name": "generaldelta",
104 "repo": true 104 "repo": true
105 }, 105 },
106 { 106 {
107 "config": false, 107 "config": true,
108 "default": false, 108 "default": true,
109 "name": "sparserevlog", 109 "name": "sparserevlog",
110 "repo": false 110 "repo": true
111 }, 111 },
112 { 112 {
113 "config": true, 113 "config": true,
114 "default": true, 114 "default": true,
115 "name": "plain-cl-delta", 115 "name": "plain-cl-delta",
125 $ hg debugupgraderepo 125 $ hg debugupgraderepo
126 (no feature deficiencies found in existing repository) 126 (no feature deficiencies found in existing repository)
127 performing an upgrade with "--run" will make the following changes: 127 performing an upgrade with "--run" will make the following changes:
128 128
129 requirements 129 requirements
130 preserved: dotencode, fncache, generaldelta, revlogv1, store 130 preserved: dotencode, fncache, generaldelta, revlogv1, sparserevlog, store
131 131
132 additional optimizations are available by specifying "--optimize <name>": 132 additional optimizations are available by specifying "--optimize <name>":
133 133
134 redeltaparent 134 redeltaparent
135 deltas within internal storage will be recalculated to choose an optimal base revision where this was not already done; the size of the repository may shrink and various operations may become faster; the first time this optimization is performed could slow down upgrade execution considerably; subsequent invocations should not run noticeably slower 135 deltas within internal storage will be recalculated to choose an optimal base revision where this was not already done; the size of the repository may shrink and various operations may become faster; the first time this optimization is performed could slow down upgrade execution considerably; subsequent invocations should not run noticeably slower
149 $ hg debugupgrade --optimize redeltaparent 149 $ hg debugupgrade --optimize redeltaparent
150 (no feature deficiencies found in existing repository) 150 (no feature deficiencies found in existing repository)
151 performing an upgrade with "--run" will make the following changes: 151 performing an upgrade with "--run" will make the following changes:
152 152
153 requirements 153 requirements
154 preserved: dotencode, fncache, generaldelta, revlogv1, store 154 preserved: dotencode, fncache, generaldelta, revlogv1, sparserevlog, store
155 155
156 redeltaparent 156 redeltaparent
157 deltas within internal storage will choose a new base revision if needed 157 deltas within internal storage will choose a new base revision if needed
158 158
159 additional optimizations are available by specifying "--optimize <name>": 159 additional optimizations are available by specifying "--optimize <name>":
186 $ hg debugformat --verbose 186 $ hg debugformat --verbose
187 format-variant repo config default 187 format-variant repo config default
188 fncache: no yes yes 188 fncache: no yes yes
189 dotencode: no yes yes 189 dotencode: no yes yes
190 generaldelta: no yes yes 190 generaldelta: no yes yes
191 sparserevlog: no no no 191 sparserevlog: no yes yes
192 plain-cl-delta: yes yes yes 192 plain-cl-delta: yes yes yes
193 compression: zlib zlib zlib 193 compression: zlib zlib zlib
194 $ hg debugformat --verbose --config format.usegeneraldelta=no 194 $ hg debugformat --verbose --config format.usegeneraldelta=no
195 format-variant repo config default 195 format-variant repo config default
196 fncache: no yes yes 196 fncache: no yes yes
197 dotencode: no yes yes 197 dotencode: no yes yes
198 generaldelta: no no yes 198 generaldelta: no no yes
199 sparserevlog: no no no 199 sparserevlog: no no yes
200 plain-cl-delta: yes yes yes 200 plain-cl-delta: yes yes yes
201 compression: zlib zlib zlib 201 compression: zlib zlib zlib
202 $ hg debugformat --verbose --config format.usegeneraldelta=no --color=debug 202 $ hg debugformat --verbose --config format.usegeneraldelta=no --color=debug
203 format-variant repo config default 203 format-variant repo config default
204 [formatvariant.name.mismatchconfig|fncache: ][formatvariant.repo.mismatchconfig| no][formatvariant.config.default| yes][formatvariant.default| yes] 204 [formatvariant.name.mismatchconfig|fncache: ][formatvariant.repo.mismatchconfig| no][formatvariant.config.default| yes][formatvariant.default| yes]
205 [formatvariant.name.mismatchconfig|dotencode: ][formatvariant.repo.mismatchconfig| no][formatvariant.config.default| yes][formatvariant.default| yes] 205 [formatvariant.name.mismatchconfig|dotencode: ][formatvariant.repo.mismatchconfig| no][formatvariant.config.default| yes][formatvariant.default| yes]
206 [formatvariant.name.mismatchdefault|generaldelta: ][formatvariant.repo.mismatchdefault| no][formatvariant.config.special| no][formatvariant.default| yes] 206 [formatvariant.name.mismatchdefault|generaldelta: ][formatvariant.repo.mismatchdefault| no][formatvariant.config.special| no][formatvariant.default| yes]
207 [formatvariant.name.uptodate|sparserevlog: ][formatvariant.repo.uptodate| no][formatvariant.config.default| no][formatvariant.default| no] 207 [formatvariant.name.mismatchdefault|sparserevlog: ][formatvariant.repo.mismatchdefault| no][formatvariant.config.special| no][formatvariant.default| yes]
208 [formatvariant.name.uptodate|plain-cl-delta:][formatvariant.repo.uptodate| yes][formatvariant.config.default| yes][formatvariant.default| yes] 208 [formatvariant.name.uptodate|plain-cl-delta:][formatvariant.repo.uptodate| yes][formatvariant.config.default| yes][formatvariant.default| yes]
209 [formatvariant.name.uptodate|compression: ][formatvariant.repo.uptodate| zlib][formatvariant.config.default| zlib][formatvariant.default| zlib] 209 [formatvariant.name.uptodate|compression: ][formatvariant.repo.uptodate| zlib][formatvariant.config.default| zlib][formatvariant.default| zlib]
210 $ hg debugupgraderepo 210 $ hg debugupgraderepo
211 repository lacks features recommended by current config options: 211 repository lacks features recommended by current config options:
212 212
217 storage of filenames beginning with a period or space may not work correctly 217 storage of filenames beginning with a period or space may not work correctly
218 218
219 generaldelta 219 generaldelta
220 deltas within internal storage are unable to choose optimal revisions; repository is larger and slower than it could be; interaction with other repositories may require extra network and CPU resources, making "hg push" and "hg pull" slower 220 deltas within internal storage are unable to choose optimal revisions; repository is larger and slower than it could be; interaction with other repositories may require extra network and CPU resources, making "hg push" and "hg pull" slower
221 221
222 sparserevlog
223 in order to limit disk reading and memory usage on older version, the span of a delta chain from its root to its end is limited, whatever the relevant data in this span. This can severly limit Mercurial ability to build good chain of delta resulting is much more storage space being taken and limit reusability of on disk delta during exchange.
224
222 225
223 performing an upgrade with "--run" will make the following changes: 226 performing an upgrade with "--run" will make the following changes:
224 227
225 requirements 228 requirements
226 preserved: revlogv1, store 229 preserved: revlogv1, store
227 added: dotencode, fncache, generaldelta 230 added: dotencode, fncache, generaldelta, sparserevlog
228 231
229 fncache 232 fncache
230 repository will be more resilient to storing certain paths and performance of certain operations should be improved 233 repository will be more resilient to storing certain paths and performance of certain operations should be improved
231 234
232 dotencode 235 dotencode
233 repository will be better able to store files beginning with a space or period 236 repository will be better able to store files beginning with a space or period
234 237
235 generaldelta 238 generaldelta
236 repository storage will be able to create optimal deltas; new repository data will be smaller and read times should decrease; interacting with other repositories using this storage model should require less network and CPU resources, making "hg push" and "hg pull" faster 239 repository storage will be able to create optimal deltas; new repository data will be smaller and read times should decrease; interacting with other repositories using this storage model should require less network and CPU resources, making "hg push" and "hg pull" faster
240
241 sparserevlog
242 Revlog supports delta chain with more unused data between payload. These gaps will be skipped at read time. This allows for better delta chains, making a better compression and faster exchange with server.
237 243
238 additional optimizations are available by specifying "--optimize <name>": 244 additional optimizations are available by specifying "--optimize <name>":
239 245
240 redeltaparent 246 redeltaparent
241 deltas within internal storage will be recalculated to choose an optimal base revision where this was not already done; the size of the repository may shrink and various operations may become faster; the first time this optimization is performed could slow down upgrade execution considerably; subsequent invocations should not run noticeably slower 247 deltas within internal storage will be recalculated to choose an optimal base revision where this was not already done; the size of the repository may shrink and various operations may become faster; the first time this optimization is performed could slow down upgrade execution considerably; subsequent invocations should not run noticeably slower
257 long and reserved filenames may not work correctly; repository performance is sub-optimal 263 long and reserved filenames may not work correctly; repository performance is sub-optimal
258 264
259 generaldelta 265 generaldelta
260 deltas within internal storage are unable to choose optimal revisions; repository is larger and slower than it could be; interaction with other repositories may require extra network and CPU resources, making "hg push" and "hg pull" slower 266 deltas within internal storage are unable to choose optimal revisions; repository is larger and slower than it could be; interaction with other repositories may require extra network and CPU resources, making "hg push" and "hg pull" slower
261 267
268 sparserevlog
269 in order to limit disk reading and memory usage on older version, the span of a delta chain from its root to its end is limited, whatever the relevant data in this span. This can severly limit Mercurial ability to build good chain of delta resulting is much more storage space being taken and limit reusability of on disk delta during exchange.
270
262 repository lacks features used by the default config options: 271 repository lacks features used by the default config options:
263 272
264 dotencode 273 dotencode
265 storage of filenames beginning with a period or space may not work correctly 274 storage of filenames beginning with a period or space may not work correctly
266 275
267 276
268 performing an upgrade with "--run" will make the following changes: 277 performing an upgrade with "--run" will make the following changes:
269 278
270 requirements 279 requirements
271 preserved: revlogv1, store 280 preserved: revlogv1, store
272 added: fncache, generaldelta 281 added: fncache, generaldelta, sparserevlog
273 282
274 fncache 283 fncache
275 repository will be more resilient to storing certain paths and performance of certain operations should be improved 284 repository will be more resilient to storing certain paths and performance of certain operations should be improved
276 285
277 generaldelta 286 generaldelta
278 repository storage will be able to create optimal deltas; new repository data will be smaller and read times should decrease; interacting with other repositories using this storage model should require less network and CPU resources, making "hg push" and "hg pull" faster 287 repository storage will be able to create optimal deltas; new repository data will be smaller and read times should decrease; interacting with other repositories using this storage model should require less network and CPU resources, making "hg push" and "hg pull" faster
288
289 sparserevlog
290 Revlog supports delta chain with more unused data between payload. These gaps will be skipped at read time. This allows for better delta chains, making a better compression and faster exchange with server.
279 291
280 additional optimizations are available by specifying "--optimize <name>": 292 additional optimizations are available by specifying "--optimize <name>":
281 293
282 redeltaparent 294 redeltaparent
283 deltas within internal storage will be recalculated to choose an optimal base revision where this was not already done; the size of the repository may shrink and various operations may become faster; the first time this optimization is performed could slow down upgrade execution considerably; subsequent invocations should not run noticeably slower 295 deltas within internal storage will be recalculated to choose an optimal base revision where this was not already done; the size of the repository may shrink and various operations may become faster; the first time this optimization is performed could slow down upgrade execution considerably; subsequent invocations should not run noticeably slower
299 $ hg init modern 311 $ hg init modern
300 $ hg -R modern debugupgraderepo --run 312 $ hg -R modern debugupgraderepo --run
301 upgrade will perform the following actions: 313 upgrade will perform the following actions:
302 314
303 requirements 315 requirements
304 preserved: dotencode, fncache, generaldelta, revlogv1, store 316 preserved: dotencode, fncache, generaldelta, revlogv1, sparserevlog, store
305 317
306 beginning upgrade... 318 beginning upgrade...
307 repository locked and read-only 319 repository locked and read-only
308 creating temporary repository to stage migrated data: $TESTTMP/modern/.hg/upgrade.* (glob) 320 creating temporary repository to stage migrated data: $TESTTMP/modern/.hg/upgrade.* (glob)
309 (it is safe to interrupt this process any time before data migration completes) 321 (it is safe to interrupt this process any time before data migration completes)
433 445
434 $ hg debugupgraderepo --run 446 $ hg debugupgraderepo --run
435 upgrade will perform the following actions: 447 upgrade will perform the following actions:
436 448
437 requirements 449 requirements
438 preserved: dotencode, fncache, generaldelta, revlogv1, store 450 preserved: dotencode, fncache, generaldelta, revlogv1, sparserevlog, store
439 451
440 beginning upgrade... 452 beginning upgrade...
441 repository locked and read-only 453 repository locked and read-only
442 creating temporary repository to stage migrated data: $TESTTMP/store-filenames/.hg/upgrade.* (glob) 454 creating temporary repository to stage migrated data: $TESTTMP/store-filenames/.hg/upgrade.* (glob)
443 (it is safe to interrupt this process any time before data migration completes) 455 (it is safe to interrupt this process any time before data migration completes)
464 the old repository will not be deleted; remove it to free up disk space once the upgraded repository is verified 476 the old repository will not be deleted; remove it to free up disk space once the upgraded repository is verified
465 $ hg debugupgraderepo --run --optimize redeltafulladd 477 $ hg debugupgraderepo --run --optimize redeltafulladd
466 upgrade will perform the following actions: 478 upgrade will perform the following actions:
467 479
468 requirements 480 requirements
469 preserved: dotencode, fncache, generaldelta, revlogv1, store 481 preserved: dotencode, fncache, generaldelta, revlogv1, sparserevlog, store
470 482
471 redeltafulladd 483 redeltafulladd
472 each revision will be added as new content to the internal storage; this will likely drastically slow down execution time, but some extensions might need it 484 each revision will be added as new content to the internal storage; this will likely drastically slow down execution time, but some extensions might need it
473 485
474 beginning upgrade... 486 beginning upgrade...
521 dotencode 533 dotencode
522 fncache 534 fncache
523 generaldelta 535 generaldelta
524 largefiles 536 largefiles
525 revlogv1 537 revlogv1
538 sparserevlog
526 store 539 store
527 540
528 $ hg debugupgraderepo --run 541 $ hg debugupgraderepo --run
529 upgrade will perform the following actions: 542 upgrade will perform the following actions:
530 543
531 requirements 544 requirements
532 preserved: dotencode, fncache, generaldelta, largefiles, revlogv1, store 545 preserved: dotencode, fncache, generaldelta, largefiles, revlogv1, sparserevlog, store
533 546
534 beginning upgrade... 547 beginning upgrade...
535 repository locked and read-only 548 repository locked and read-only
536 creating temporary repository to stage migrated data: $TESTTMP/largefilesrepo/.hg/upgrade.* (glob) 549 creating temporary repository to stage migrated data: $TESTTMP/largefilesrepo/.hg/upgrade.* (glob)
537 (it is safe to interrupt this process any time before data migration completes) 550 (it is safe to interrupt this process any time before data migration completes)
559 dotencode 572 dotencode
560 fncache 573 fncache
561 generaldelta 574 generaldelta
562 largefiles 575 largefiles
563 revlogv1 576 revlogv1
577 sparserevlog
564 store 578 store
565 579
566 $ cat << EOF >> .hg/hgrc 580 $ cat << EOF >> .hg/hgrc
567 > [extensions] 581 > [extensions]
568 > lfs = 582 > lfs =
579 593
580 $ hg debugupgraderepo --run 594 $ hg debugupgraderepo --run
581 upgrade will perform the following actions: 595 upgrade will perform the following actions:
582 596
583 requirements 597 requirements
584 preserved: dotencode, fncache, generaldelta, largefiles, lfs, revlogv1, store 598 preserved: dotencode, fncache, generaldelta, largefiles, lfs, revlogv1, sparserevlog, store
585 599
586 beginning upgrade... 600 beginning upgrade...
587 repository locked and read-only 601 repository locked and read-only
588 creating temporary repository to stage migrated data: $TESTTMP/largefilesrepo/.hg/upgrade.* (glob) 602 creating temporary repository to stage migrated data: $TESTTMP/largefilesrepo/.hg/upgrade.* (glob)
589 (it is safe to interrupt this process any time before data migration completes) 603 (it is safe to interrupt this process any time before data migration completes)
665 > maxchainlen = 9001 679 > maxchainlen = 9001
666 > EOF 680 > EOF
667 $ hg config format 681 $ hg config format
668 format.maxchainlen=9001 682 format.maxchainlen=9001
669 $ hg debugdeltachain file 683 $ hg debugdeltachain file
670 rev chain# chainlen prev delta size rawsize chainsize ratio lindist extradist extraratio 684 rev chain# chainlen prev delta size rawsize chainsize ratio lindist extradist extraratio readsize largestblk rddensity srchunks
671 0 1 1 -1 base 77 182 77 0.42308 77 0 0.00000 685 0 1 1 -1 base 77 182 77 0.42308 77 0 0.00000 77 77 1.00000 1
672 1 1 2 0 p1 21 191 98 0.51309 98 0 0.00000 686 1 1 2 0 p1 21 191 98 0.51309 98 0 0.00000 98 98 1.00000 1
673 2 2 1 -1 base 84 200 84 0.42000 84 0 0.00000 687 2 1 2 0 other 30 200 107 0.53500 128 21 0.19626 128 128 0.83594 1
674 688
675 $ hg debugupgraderepo --run --optimize redeltaall 689 $ hg debugupgraderepo --run --optimize redeltaall
676 upgrade will perform the following actions: 690 upgrade will perform the following actions:
677 691
678 requirements 692 requirements
679 preserved: dotencode, fncache, generaldelta, revlogv1, store 693 preserved: dotencode, fncache, generaldelta, revlogv1, sparserevlog, store
680 694
681 redeltaall 695 redeltaall
682 deltas within internal storage will be fully recomputed; this will likely drastically slow down execution time 696 deltas within internal storage will be fully recomputed; this will likely drastically slow down execution time
683 697
684 beginning upgrade... 698 beginning upgrade...
685 repository locked and read-only 699 repository locked and read-only
686 creating temporary repository to stage migrated data: $TESTTMP/localconfig/.hg/upgrade.* (glob) 700 creating temporary repository to stage migrated data: $TESTTMP/localconfig/.hg/upgrade.* (glob)
687 (it is safe to interrupt this process any time before data migration completes) 701 (it is safe to interrupt this process any time before data migration completes)
688 migrating 9 total revisions (3 in filelogs, 3 in manifests, 3 in changelog) 702 migrating 9 total revisions (3 in filelogs, 3 in manifests, 3 in changelog)
689 migrating 1.05 KB in store; 882 bytes tracked data 703 migrating 1019 bytes in store; 882 bytes tracked data
690 migrating 1 filelogs containing 3 revisions (374 bytes in store; 573 bytes tracked data) 704 migrating 1 filelogs containing 3 revisions (320 bytes in store; 573 bytes tracked data)
691 finished migrating 3 filelog revisions across 1 filelogs; change in size: -63 bytes 705 finished migrating 3 filelog revisions across 1 filelogs; change in size: -9 bytes
692 migrating 1 manifests containing 3 revisions (333 bytes in store; 138 bytes tracked data) 706 migrating 1 manifests containing 3 revisions (333 bytes in store; 138 bytes tracked data)
693 finished migrating 3 manifest revisions across 1 manifests; change in size: 0 bytes 707 finished migrating 3 manifest revisions across 1 manifests; change in size: 0 bytes
694 migrating changelog containing 3 revisions (366 bytes in store; 171 bytes tracked data) 708 migrating changelog containing 3 revisions (366 bytes in store; 171 bytes tracked data)
695 finished migrating 3 changelog revisions; change in size: 0 bytes 709 finished migrating 3 changelog revisions; change in size: 0 bytes
696 finished migrating 9 total revisions; total change in store size: -63 bytes 710 finished migrating 9 total revisions; total change in store size: -9 bytes
697 copying phaseroots 711 copying phaseroots
698 data fully migrated to temporary repository 712 data fully migrated to temporary repository
699 marking source repository as being upgraded; clients will be unable to read from repository 713 marking source repository as being upgraded; clients will be unable to read from repository
700 starting in-place swap of repository data 714 starting in-place swap of repository data
701 replaced files will be backed up at $TESTTMP/localconfig/.hg/upgradebackup.* (glob) 715 replaced files will be backed up at $TESTTMP/localconfig/.hg/upgradebackup.* (glob)
704 finalizing requirements file and making repository readable again 718 finalizing requirements file and making repository readable again
705 removing temporary repository $TESTTMP/localconfig/.hg/upgrade.* (glob) 719 removing temporary repository $TESTTMP/localconfig/.hg/upgrade.* (glob)
706 copy of old repository backed up at $TESTTMP/localconfig/.hg/upgradebackup.* (glob) 720 copy of old repository backed up at $TESTTMP/localconfig/.hg/upgradebackup.* (glob)
707 the old repository will not be deleted; remove it to free up disk space once the upgraded repository is verified 721 the old repository will not be deleted; remove it to free up disk space once the upgraded repository is verified
708 $ hg debugdeltachain file 722 $ hg debugdeltachain file
709 rev chain# chainlen prev delta size rawsize chainsize ratio lindist extradist extraratio 723 rev chain# chainlen prev delta size rawsize chainsize ratio lindist extradist extraratio readsize largestblk rddensity srchunks
710 0 1 1 -1 base 77 182 77 0.42308 77 0 0.00000 724 0 1 1 -1 base 77 182 77 0.42308 77 0 0.00000 77 77 1.00000 1
711 1 1 2 0 p1 21 191 98 0.51309 98 0 0.00000 725 1 1 2 0 p1 21 191 98 0.51309 98 0 0.00000 98 98 1.00000 1
712 2 1 3 1 p1 21 200 119 0.59500 119 0 0.00000 726 2 1 3 1 p1 21 200 119 0.59500 119 0 0.00000 119 119 1.00000 1
713 $ cd .. 727 $ cd ..
714 728
715 $ cat << EOF >> $HGRCPATH 729 $ cat << EOF >> $HGRCPATH
716 > [format] 730 > [format]
717 > maxchainlen = 9001 731 > maxchainlen = 9001