mirror of https://github.com/voidlizard/hbs2
tune
This commit is contained in:
parent
e1c071f86e
commit
5b03bdd05b
|
@ -10,6 +10,6 @@ constraints:
|
||||||
, http-client >=0.7.16 && <0.8
|
, http-client >=0.7.16 && <0.8
|
||||||
|
|
||||||
-- executable-static: True
|
-- executable-static: True
|
||||||
profiling: True
|
-- profiling: True
|
||||||
--library-profiling: False
|
--library-profiling: False
|
||||||
|
|
||||||
|
|
|
@ -70,18 +70,18 @@ defBlockWipTimeout :: TimeSpec
|
||||||
defBlockWipTimeout = defCookieTimeout
|
defBlockWipTimeout = defCookieTimeout
|
||||||
|
|
||||||
defBlockInfoTimeout :: Timeout 'Seconds
|
defBlockInfoTimeout :: Timeout 'Seconds
|
||||||
defBlockInfoTimeout = 2
|
defBlockInfoTimeout = 5
|
||||||
|
|
||||||
defBlockInfoTimeoutSpec :: TimeSpec
|
defBlockInfoTimeoutSpec :: TimeSpec
|
||||||
defBlockInfoTimeoutSpec = toTimeSpec defBlockInfoTimeout
|
defBlockInfoTimeoutSpec = toTimeSpec defBlockInfoTimeout
|
||||||
|
|
||||||
-- how much time wait for block from peer?
|
-- how much time wait for block from peer?
|
||||||
defBlockWaitMax :: Timeout 'Seconds
|
defBlockWaitMax :: Timeout 'Seconds
|
||||||
defBlockWaitMax = 30 :: Timeout 'Seconds
|
defBlockWaitMax = 60 :: Timeout 'Seconds
|
||||||
|
|
||||||
-- how much time wait for block from peer?
|
-- how much time wait for block from peer?
|
||||||
defChunkWaitMax :: Timeout 'Seconds
|
defChunkWaitMax :: Timeout 'Seconds
|
||||||
defChunkWaitMax = 10 :: Timeout 'Seconds
|
defChunkWaitMax = 5 :: Timeout 'Seconds
|
||||||
|
|
||||||
defSweepTimeout :: Timeout 'Seconds
|
defSweepTimeout :: Timeout 'Seconds
|
||||||
defSweepTimeout = 60 -- FIXME: only for debug!
|
defSweepTimeout = 60 -- FIXME: only for debug!
|
||||||
|
|
|
@ -677,8 +677,8 @@ blockDownloadLoop env0 = do
|
||||||
updateRates e rates nonces = withPeerM e do
|
updateRates e rates nonces = withPeerM e do
|
||||||
|
|
||||||
let wRtt = 5
|
let wRtt = 5
|
||||||
let wUdp = 1.75
|
let wUdp = 1.5
|
||||||
let wTcp = 0.95
|
let wTcp = 1.1
|
||||||
let wS = 1.5
|
let wS = 1.5
|
||||||
let eps = 1e-8
|
let eps = 1e-8
|
||||||
|
|
||||||
|
|
|
@ -183,7 +183,7 @@ simpleStorageWorker ss@SimpleStorage{..} = do
|
||||||
|
|
||||||
flip runContT pure do
|
flip runContT pure do
|
||||||
ContT $ withAsync $ forever $ liftIO do
|
ContT $ withAsync $ forever $ liftIO do
|
||||||
pause @'Seconds 10
|
pause @'Seconds 20
|
||||||
probe <- readTVarIO _storageProbe
|
probe <- readTVarIO _storageProbe
|
||||||
values <- atomically do
|
values <- atomically do
|
||||||
mmapedSize <- readTVar _storageMMaped <&> HashMap.size
|
mmapedSize <- readTVar _storageMMaped <&> HashMap.size
|
||||||
|
@ -222,7 +222,7 @@ simpleStorageWorker ss@SimpleStorage{..} = do
|
||||||
|
|
||||||
ContT $ withAsync $ do
|
ContT $ withAsync $ do
|
||||||
forever $ do
|
forever $ do
|
||||||
pause ( 10 :: Timeout 'Seconds ) -- FIXME: setting
|
pause ( 60 :: Timeout 'Seconds ) -- FIXME: setting
|
||||||
purgeExpired _storageSizeCache
|
purgeExpired _storageSizeCache
|
||||||
-- now <- getTimeCoarse
|
-- now <- getTimeCoarse
|
||||||
-- let notExpired t0 = not (expired timeout (now - t0))
|
-- let notExpired t0 = not (expired timeout (now - t0))
|
||||||
|
|
Loading…
Reference in New Issue