From 954b2266abb9d11ba3e7693ecb4dfdd7ff642b6c Mon Sep 17 00:00:00 2001 From: voidlizard Date: Fri, 18 Oct 2024 10:27:28 +0300 Subject: [PATCH] download tuned for low MTU values, needs investigation --- hbs2-core/lib/HBS2/Defaults.hs | 6 +++--- hbs2-peer/app/BlockDownload.hs | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/hbs2-core/lib/HBS2/Defaults.hs b/hbs2-core/lib/HBS2/Defaults.hs index 99906951..94dc4027 100644 --- a/hbs2-core/lib/HBS2/Defaults.hs +++ b/hbs2-core/lib/HBS2/Defaults.hs @@ -16,11 +16,11 @@ defBurstMax :: Integral a => a defBurstMax = 128 defBurst :: Integral a => a -defBurst = defBurstMax `div` 8 +defBurst = defBurstMax `div` 4 -- defChunkSize :: Integer defChunkSize :: Integral a => a -defChunkSize = 1400 +defChunkSize = 1024 -- defChunkSize = 480 defBlockSize :: Integer @@ -36,7 +36,7 @@ defBlockDownloadQ :: Integral a => a defBlockDownloadQ = 65536*10 defBlockDownloadThreshold :: Integral a => a -defBlockDownloadThreshold = 2 +defBlockDownloadThreshold = 1 -- typical block hash 530+ chunks * parallel wip blocks amount defProtoPipelineSize :: Int diff --git a/hbs2-peer/app/BlockDownload.hs b/hbs2-peer/app/BlockDownload.hs index d730ac0f..d7e7fc0a 100644 --- a/hbs2-peer/app/BlockDownload.hs +++ b/hbs2-peer/app/BlockDownload.hs @@ -665,8 +665,8 @@ blockDownloadLoop env0 = do updateRates e rates nonces = withPeerM e do let wRtt = 5 - let wUdp = 1.75 - let wTcp = 1.0 + let wUdp = 1.5 + let wTcp = 1.1 let wS = 1.5 let eps = 1e-8