From 2464899f9a47fb23c98c88c354b33d155490e565 Mon Sep 17 00:00:00 2001 From: Brian Warner Date: Mon, 10 Mar 2008 20:39:55 -0700 Subject: [PATCH] mutable: increase max segsize to 3.5MB, to allow dirnodes with about 10k entries --- src/allmydata/mutable.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/allmydata/mutable.py b/src/allmydata/mutable.py index 03725f585..8647b8c00 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))