mirror of https://github.com/voidlizard/hbs2
tune
This commit is contained in:
parent
4fb9c948be
commit
e1c071f86e
|
@ -70,14 +70,14 @@ defBlockWipTimeout :: TimeSpec
|
|||
defBlockWipTimeout = defCookieTimeout
|
||||
|
||||
defBlockInfoTimeout :: Timeout 'Seconds
|
||||
defBlockInfoTimeout = 5
|
||||
defBlockInfoTimeout = 2
|
||||
|
||||
defBlockInfoTimeoutSpec :: TimeSpec
|
||||
defBlockInfoTimeoutSpec = toTimeSpec defBlockInfoTimeout
|
||||
|
||||
-- how much time wait for block from peer?
|
||||
defBlockWaitMax :: Timeout 'Seconds
|
||||
defBlockWaitMax = 60 :: Timeout 'Seconds
|
||||
defBlockWaitMax = 30 :: Timeout 'Seconds
|
||||
|
||||
-- how much time wait for block from peer?
|
||||
defChunkWaitMax :: Timeout 'Seconds
|
||||
|
|
|
@ -51,7 +51,7 @@ import Streaming.Prelude qualified as S
|
|||
-- FIXME: control-recv-capacity-to-avoid-leaks
|
||||
|
||||
outMessageQLen :: Natural
|
||||
outMessageQLen = 256
|
||||
outMessageQLen = 1024*32
|
||||
|
||||
-- | TCP Messaging environment
|
||||
data MessagingTCP =
|
||||
|
@ -106,7 +106,7 @@ newMessagingTCP pa = liftIO do
|
|||
<*> newTVarIO mempty
|
||||
<*> newTVarIO mempty
|
||||
<*> newTQueueIO
|
||||
<*> newTBQueueIO outMessageQLen
|
||||
<*> newTBQueueIO (10 * outMessageQLen)
|
||||
<*> newTVarIO mempty
|
||||
<*> newTVarIO 0
|
||||
<*> newTVarIO mempty
|
||||
|
|
|
@ -320,8 +320,8 @@ blockDownloadLoop env0 = do
|
|||
e <- ask
|
||||
sto <- getStorage
|
||||
|
||||
let downT = 8
|
||||
let sizeT = 1
|
||||
let downT = 16
|
||||
let sizeT = 16
|
||||
|
||||
inQ <- withDownload env0 $ asks (view blockInQ)
|
||||
checkQ <- withDownload env0 $ asks (view blockCheckQ)
|
||||
|
@ -677,8 +677,8 @@ blockDownloadLoop env0 = do
|
|||
updateRates e rates nonces = withPeerM e do
|
||||
|
||||
let wRtt = 5
|
||||
let wUdp = 1.5
|
||||
let wTcp = 1.1
|
||||
let wUdp = 1.75
|
||||
let wTcp = 0.95
|
||||
let wS = 1.5
|
||||
let eps = 1e-8
|
||||
|
||||
|
|
|
@ -145,7 +145,7 @@ simpleStorageInit opts = liftIO $ do
|
|||
<*> TV.newTVarIO False
|
||||
<*> TV.newTVarIO mempty
|
||||
<*> TV.newTVarIO mempty
|
||||
<*> Cache.newCache (Just (toTimeSpec (10 :: Timeout 'Seconds)))
|
||||
<*> Cache.newCache (Just (toTimeSpec (60 :: Timeout 'Seconds)))
|
||||
|
||||
createDirectoryIfMissing True (stor ^. storageBlocks)
|
||||
createDirectoryIfMissing True (stor ^. storageTemp)
|
||||
|
|
Loading…
Reference in New Issue