From c394b41a2ffb7e987864fa64fd583017c717703b Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Wed, 17 Aug 2016 17:29:11 -0400 Subject: allow configuring N and M User has to remember they did this and use the same configuration on restore. --- Tunables.hs | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'Tunables.hs') diff --git a/Tunables.hs b/Tunables.hs index f4f74a4..2e8d43b 100644 --- a/Tunables.hs +++ b/Tunables.hs @@ -33,9 +33,7 @@ knownTunings = map (\t -> (nameGenerationHash (nameGenerationTunable t), t)) -- So, every parameter that can be tuned is configured in this data -- structure. data Tunables = Tunables - { shardParams :: [ShardParams] - -- ^ multiple ShardParams may be supported, with the user - -- allowed to choose between them + { shardParams :: ShardParams , objectSize :: Int -- ^ a StorableObject is exactly this many bytes in size -- (must be a multiple of AES block size 16) @@ -82,7 +80,7 @@ data EncryptionTunable = UseAES256 defaultTunables :: Tunables defaultTunables = Tunables - { shardParams = [ShardParams { totalObjects = 3, neededObjects = 2 }] + { shardParams = ShardParams { totalObjects = 3, neededObjects = 2 } , objectSize = 1024*64 -- 64 kb -- The nameGenerationHash was benchmarked at 661 seconds CPU time -- on a 2 core Intel(R) Core(TM) i5-4210Y CPU @ 1.50GHz. @@ -114,7 +112,7 @@ defaultTunables = Tunables -- Not for production use! testModeTunables :: Tunables testModeTunables = Tunables - { shardParams = [ShardParams { totalObjects = 3, neededObjects = 2 }] + { shardParams = ShardParams { totalObjects = 3, neededObjects = 2 } , objectSize = 1024*64 , nameGenerationTunable = NameGenerationTunable { nameGenerationHash = weakargon2 (CPUCost (Seconds (2*600))) -- cgit v1.2.3