diff --git a/cabal.project b/cabal.project index b147e7fb..d182df83 100644 --- a/cabal.project +++ b/cabal.project @@ -10,6 +10,6 @@ constraints: , http-client >=0.7.16 && <0.8 -- executable-static: True -profiling: True +-- profiling: True --library-profiling: False diff --git a/hbs2-core/lib/HBS2/Defaults.hs b/hbs2-core/lib/HBS2/Defaults.hs index e25fd041..fa26e486 100644 --- a/hbs2-core/lib/HBS2/Defaults.hs +++ b/hbs2-core/lib/HBS2/Defaults.hs @@ -70,18 +70,18 @@ defBlockWipTimeout :: TimeSpec defBlockWipTimeout = defCookieTimeout defBlockInfoTimeout :: Timeout 'Seconds -defBlockInfoTimeout = 2 +defBlockInfoTimeout = 5 defBlockInfoTimeoutSpec :: TimeSpec defBlockInfoTimeoutSpec = toTimeSpec defBlockInfoTimeout -- how much time wait for block from peer? defBlockWaitMax :: Timeout 'Seconds -defBlockWaitMax = 30 :: Timeout 'Seconds +defBlockWaitMax = 60 :: Timeout 'Seconds -- how much time wait for block from peer? defChunkWaitMax :: Timeout 'Seconds -defChunkWaitMax = 10 :: Timeout 'Seconds +defChunkWaitMax = 5 :: Timeout 'Seconds defSweepTimeout :: Timeout 'Seconds defSweepTimeout = 60 -- FIXME: only for debug! diff --git a/hbs2-peer/app/BlockDownload.hs b/hbs2-peer/app/BlockDownload.hs index bd70a2b4..190cfe8b 100644 --- a/hbs2-peer/app/BlockDownload.hs +++ b/hbs2-peer/app/BlockDownload.hs @@ -677,8 +677,8 @@ blockDownloadLoop env0 = do updateRates e rates nonces = withPeerM e do let wRtt = 5 - let wUdp = 1.75 - let wTcp = 0.95 + let wUdp = 1.5 + let wTcp = 1.1 let wS = 1.5 let eps = 1e-8 diff --git a/hbs2-storage-simple/lib/HBS2/Storage/Simple.hs b/hbs2-storage-simple/lib/HBS2/Storage/Simple.hs index 1e657f16..b862ab84 100644 --- a/hbs2-storage-simple/lib/HBS2/Storage/Simple.hs +++ b/hbs2-storage-simple/lib/HBS2/Storage/Simple.hs @@ -183,7 +183,7 @@ simpleStorageWorker ss@SimpleStorage{..} = do flip runContT pure do ContT $ withAsync $ forever $ liftIO do - pause @'Seconds 10 + pause @'Seconds 20 probe <- readTVarIO _storageProbe values <- atomically do mmapedSize <- readTVar _storageMMaped <&> HashMap.size @@ -222,7 +222,7 @@ simpleStorageWorker ss@SimpleStorage{..} = do ContT $ withAsync $ do forever $ do - pause ( 10 :: Timeout 'Seconds ) -- FIXME: setting + pause ( 60 :: Timeout 'Seconds ) -- FIXME: setting purgeExpired _storageSizeCache -- now <- getTimeCoarse -- let notExpired t0 = not (expired timeout (now - t0))