##// END OF EJS Templates
sparse-revlog: set max delta chain length to on thousand...
Boris Feld -
r39542:b66ea3fc default
parent child Browse files
Show More
@@ -665,7 +665,7 b" coreconfigitem('format', 'manifestcaches"
665 default=None,
665 default=None,
666 )
666 )
667 coreconfigitem('format', 'maxchainlen',
667 coreconfigitem('format', 'maxchainlen',
668 default=None,
668 default=dynamicdefault,
669 )
669 )
670 coreconfigitem('format', 'obsstore-version',
670 coreconfigitem('format', 'obsstore-version',
671 default=None,
671 default=None,
@@ -70,6 +70,10 b' from .utils import ('
70 stringutil,
70 stringutil,
71 )
71 )
72
72
73 from .revlogutils import (
74 constants as revlogconst,
75 )
76
73 release = lockmod.release
77 release = lockmod.release
74 urlerr = util.urlerr
78 urlerr = util.urlerr
75 urlreq = util.urlreq
79 urlreq = util.urlreq
@@ -658,10 +662,6 b' class localrepository(object):'
658 chunkcachesize = self.ui.configint('format', 'chunkcachesize')
662 chunkcachesize = self.ui.configint('format', 'chunkcachesize')
659 if chunkcachesize is not None:
663 if chunkcachesize is not None:
660 self.svfs.options['chunkcachesize'] = chunkcachesize
664 self.svfs.options['chunkcachesize'] = chunkcachesize
661 # experimental config: format.maxchainlen
662 maxchainlen = self.ui.configint('format', 'maxchainlen')
663 if maxchainlen is not None:
664 self.svfs.options['maxchainlen'] = maxchainlen
665 # experimental config: format.manifestcachesize
665 # experimental config: format.manifestcachesize
666 manifestcachesize = self.ui.configint('format', 'manifestcachesize')
666 manifestcachesize = self.ui.configint('format', 'manifestcachesize')
667 if manifestcachesize is not None:
667 if manifestcachesize is not None:
@@ -689,6 +689,13 b' class localrepository(object):'
689 self.svfs.options['sparse-revlog'] = sparserevlog
689 self.svfs.options['sparse-revlog'] = sparserevlog
690 if sparserevlog:
690 if sparserevlog:
691 self.svfs.options['generaldelta'] = True
691 self.svfs.options['generaldelta'] = True
692 maxchainlen = None
693 if sparserevlog:
694 maxchainlen = revlogconst.SPARSE_REVLOG_MAX_CHAIN_LENGTH
695 # experimental config: format.maxchainlen
696 maxchainlen = self.ui.configint('format', 'maxchainlen', maxchainlen)
697 if maxchainlen is not None:
698 self.svfs.options['maxchainlen'] = maxchainlen
692
699
693 for r in self.requirements:
700 for r in self.requirements:
694 if r.startswith('exp-compression-'):
701 if r.startswith('exp-compression-'):
@@ -41,3 +41,6 b' REVIDX_FLAGS_ORDER = ['
41 REVIDX_KNOWN_FLAGS = util.bitsfrom(REVIDX_FLAGS_ORDER)
41 REVIDX_KNOWN_FLAGS = util.bitsfrom(REVIDX_FLAGS_ORDER)
42 # bitmark for flags that could cause rawdata content change
42 # bitmark for flags that could cause rawdata content change
43 REVIDX_RAWTEXT_CHANGING_FLAGS = REVIDX_ISCENSORED | REVIDX_EXTSTORED
43 REVIDX_RAWTEXT_CHANGING_FLAGS = REVIDX_ISCENSORED | REVIDX_EXTSTORED
44
45 SPARSE_REVLOG_MAX_CHAIN_LENGTH = 1000
46
@@ -25,6 +25,7 b' repeatedly while some of it changes rare'
25 $ cat >> $HGRCPATH << EOF
25 $ cat >> $HGRCPATH << EOF
26 > [format]
26 > [format]
27 > sparse-revlog = yes
27 > sparse-revlog = yes
28 > maxchainlen = 15
28 > [storage]
29 > [storage]
29 > revlog.optimize-delta-parent-choice = yes
30 > revlog.optimize-delta-parent-choice = yes
30 > EOF
31 > EOF
@@ -77,7 +78,7 b' repeatedly while some of it changes rare'
77
78
78
79
79 $ f -s .hg/store/data/*.d
80 $ f -s .hg/store/data/*.d
80 .hg/store/data/_s_p_a_r_s_e-_r_e_v_l_o_g-_t_e_s_t-_f_i_l_e.d: size=59230936
81 .hg/store/data/_s_p_a_r_s_e-_r_e_v_l_o_g-_t_e_s_t-_f_i_l_e.d: size=63002924
81 $ hg debugrevlog *
82 $ hg debugrevlog *
82 format : 1
83 format : 1
83 flags : generaldelta
84 flags : generaldelta
@@ -89,45 +90,45 b' repeatedly while some of it changes rare'
89 empty : 0 ( 0.00%)
90 empty : 0 ( 0.00%)
90 text : 0 (100.00%)
91 text : 0 (100.00%)
91 delta : 0 (100.00%)
92 delta : 0 (100.00%)
92 snapshot : 176 ( 3.52%)
93 snapshot : 374 ( 7.48%)
93 lvl-0 : 3 ( 0.06%)
94 lvl-0 : 4 ( 0.08%)
94 lvl-1 : 17 ( 0.34%)
95 lvl-1 : 23 ( 0.46%)
95 lvl-2 : 45 ( 0.90%)
96 lvl-2 : 63 ( 1.26%)
96 lvl-3 : 56 ( 1.12%)
97 lvl-3 : 118 ( 2.36%)
97 lvl-4 : 55 ( 1.10%)
98 lvl-4 : 166 ( 3.32%)
98 deltas : 4825 (96.48%)
99 deltas : 4627 (92.52%)
99 revision size : 59230936
100 revision size : 63002924
100 snapshot : 5770371 ( 9.74%)
101 snapshot : 9888099 (15.69%)
101 lvl-0 : 602962 ( 1.02%)
102 lvl-0 : 804262 ( 1.28%)
102 lvl-1 : 1534153 ( 2.59%)
103 lvl-1 : 1561380 ( 2.48%)
103 lvl-2 : 1604445 ( 2.71%)
104 lvl-2 : 2096696 ( 3.33%)
104 lvl-3 : 1218174 ( 2.06%)
105 lvl-3 : 2749539 ( 4.36%)
105 lvl-4 : 810637 ( 1.37%)
106 lvl-4 : 2676222 ( 4.25%)
106 deltas : 53460565 (90.26%)
107 deltas : 53114825 (84.31%)
107
108
108 chunks : 5001
109 chunks : 5001
109 0x78 (x) : 5001 (100.00%)
110 0x78 (x) : 5001 (100.00%)
110 chunks size : 59230936
111 chunks size : 63002924
111 0x78 (x) : 59230936 (100.00%)
112 0x78 (x) : 63002924 (100.00%)
112
113
113 avg chain length : 17
114 avg chain length : 9
114 max chain length : 45
115 max chain length : 15
115 max chain reach : 25326012
116 max chain reach : 28907121
116 compression ratio : 29
117 compression ratio : 27
117
118
118 uncompressed data size (min/max/avg) : 346468 / 346472 / 346471
119 uncompressed data size (min/max/avg) : 346468 / 346472 / 346471
119 full revision size (min/max/avg) : 200897 / 201050 / 200987
120 full revision size (min/max/avg) : 201008 / 201141 / 201065
120 inter-snapshot size (min/max/avg) : 11598 / 171990 / 29869
121 inter-snapshot size (min/max/avg) : 11601 / 157413 / 24550
121 level-1 (min/max/avg) : 14037 / 171990 / 90244
122 level-1 (min/max/avg) : 13061 / 157413 / 67886
122 level-2 (min/max/avg) : 11632 / 84456 / 35654
123 level-2 (min/max/avg) : 11674 / 85631 / 33280
123 level-3 (min/max/avg) : 11598 / 41486 / 21753
124 level-3 (min/max/avg) : 11602 / 42957 / 23301
124 level-4 (min/max/avg) : 11618 / 19913 / 14738
125 level-4 (min/max/avg) : 11601 / 21475 / 16121
125 delta size (min/max/avg) : 10649 / 105209 / 11079
126 delta size (min/max/avg) : 10649 / 105465 / 11479
126
127
127 deltas against prev : 4156 (86.13%)
128 deltas against prev : 3966 (85.71%)
128 where prev = p1 : 4120 (99.13%)
129 where prev = p1 : 3922 (98.89%)
129 where prev = p2 : 0 ( 0.00%)
130 where prev = p2 : 0 ( 0.00%)
130 other : 36 ( 0.87%)
131 other : 44 ( 1.11%)
131 deltas against p1 : 646 (13.39%)
132 deltas against p1 : 611 (13.21%)
132 deltas against p2 : 23 ( 0.48%)
133 deltas against p2 : 50 ( 1.08%)
133 deltas against other : 0 ( 0.00%)
134 deltas against other : 0 ( 0.00%)
General Comments 0
You need to be logged in to leave comments. Login now