From: Brian Warner Date: Tue, 11 Mar 2008 03:39:55 +0000 (-0700) Subject: mutable: increase max segsize to 3.5MB, to allow dirnodes with about 10k entries X-Git-Tag: allmydata-tahoe-0.9.0~27 X-Git-Url: https://git.rkrishnan.org/somewhere?a=commitdiff_plain;h=2464899f9a47fb23c98c88c354b33d155490e565;p=tahoe-lafs%2Ftahoe-lafs.git mutable: increase max segsize to 3.5MB, to allow dirnodes with about 10k entries --- diff --git a/src/allmydata/mutable.py b/src/allmydata/mutable.py index 03725f58..8647b8c0 100644 --- a/src/allmydata/mutable.py +++ b/src/allmydata/mutable.py @@ -1362,7 +1362,17 @@ class Publish: started = now # now apply FEC - self.MAX_SEGMENT_SIZE = 1024*1024 + + # we limit the segment size as usual to constrain our memory + # footprint. The max segsize is higher for mutable files, because we + # want to support dirnodes with up to 10k children, and each child + # uses about 330 bytes. If you actually put that much into a + # directory you'll be using a footprint of around 14MB, which is + # higher than we'd like, but it is more important right now to + # support large directories than to make memory usage small when you + # use them. Once we implement MDMF (with multiple segments), we will + # drop this back down, probably to 128KiB. + self.MAX_SEGMENT_SIZE = 3500000 data_length = len(crypttext) segment_size = min(self.MAX_SEGMENT_SIZE, len(crypttext))