mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2024-12-23 14:52:26 +00:00
misc/sizes.py: update to match current defaults: 128KiB segsize, 3-of-10
This commit is contained in:
parent
4f07d96667
commit
5afc26f1d1
@ -37,15 +37,15 @@ PiB=1024*TiB
|
|||||||
|
|
||||||
class Sizes:
|
class Sizes:
|
||||||
def __init__(self, mode, file_size, arity=2):
|
def __init__(self, mode, file_size, arity=2):
|
||||||
MAX_SEGSIZE = 2*MiB
|
MAX_SEGSIZE = 128*KiB
|
||||||
self.mode = mode
|
self.mode = mode
|
||||||
self.file_size = file_size
|
self.file_size = file_size
|
||||||
self.seg_size = seg_size = 1.0 * min(MAX_SEGSIZE, file_size)
|
self.seg_size = seg_size = 1.0 * min(MAX_SEGSIZE, file_size)
|
||||||
self.num_segs = num_segs = math.ceil(file_size / seg_size)
|
self.num_segs = num_segs = math.ceil(file_size / seg_size)
|
||||||
self.num_blocks = num_blocks = num_segs
|
self.num_blocks = num_blocks = num_segs
|
||||||
|
|
||||||
self.num_shares = num_shares = 100
|
self.num_shares = num_shares = 10
|
||||||
self.shares_needed = shares_needed = 25
|
self.shares_needed = shares_needed = 3
|
||||||
|
|
||||||
self.block_size = block_size = seg_size / shares_needed
|
self.block_size = block_size = seg_size / shares_needed
|
||||||
self.share_size = share_size = block_size * num_blocks
|
self.share_size = share_size = block_size * num_blocks
|
||||||
|
Loading…
Reference in New Issue
Block a user