Increase default mdp timeout & make it configurable

This commit is contained in:
Jeremy Lakeman 2013-11-04 12:12:58 +10:30
parent 62cd8c7555
commit 1681abd620
3 changed files with 3 additions and 2 deletions

View File

@ -430,6 +430,7 @@ ATOM(bool_t, external_blobs, 0, boolean,, "Store rhizome bundles
ATOM(uint64_t, rhizome_mdp_block_size, 512, uint64_scaled,, "Rhizome MDP block size.") ATOM(uint64_t, rhizome_mdp_block_size, 512, uint64_scaled,, "Rhizome MDP block size.")
ATOM(uint64_t, idle_timeout, RHIZOME_IDLE_TIMEOUT, uint64_scaled,, "Rhizome transfer timeout if no data received.") ATOM(uint64_t, idle_timeout, RHIZOME_IDLE_TIMEOUT, uint64_scaled,, "Rhizome transfer timeout if no data received.")
ATOM(uint64_t, mdp_stall_timeout, 1000, uint64_scaled,, "Timeout to request more data via mdp.")
ATOM(uint32_t, fetch_delay_ms, 50, uint32_nonzero,, "Delay from receiving first bundle advert to initiating fetch") ATOM(uint32_t, fetch_delay_ms, 50, uint32_nonzero,, "Delay from receiving first bundle advert to initiating fetch")
SUB_STRUCT(rhizome_direct, direct,) SUB_STRUCT(rhizome_direct, direct,)
SUB_STRUCT(rhizome_api, api,) SUB_STRUCT(rhizome_api, api,)

View File

@ -1065,7 +1065,7 @@ static int rhizome_fetch_mdp_touch_timeout(struct rhizome_fetch_slot *slot)
// For now, we will just make the timeout 1 second from the time of the last // For now, we will just make the timeout 1 second from the time of the last
// received block. // received block.
unschedule(&slot->alarm); unschedule(&slot->alarm);
slot->alarm.alarm=gettime_ms()+1000; slot->alarm.alarm=gettime_ms()+config.rhizome.mdp_stall_timeout;
slot->alarm.deadline=slot->alarm.alarm+500; slot->alarm.deadline=slot->alarm.alarm+500;
schedule(&slot->alarm); schedule(&slot->alarm);
return 0; return 0;

View File

@ -704,7 +704,7 @@ start_radio_instance() {
set debug.throttling on \ set debug.throttling on \
set debug.radio_link on \ set debug.radio_link on \
set rhizome.advertise.interval 5000 \ set rhizome.advertise.interval 5000 \
set rhizome.rhizome_mdp_block_size 350 \ set rhizome.rhizome_mdp_block_size 375 \
set log.console.level debug \ set log.console.level debug \
set log.console.show_pid on \ set log.console.show_pid on \
set log.console.show_time on \ set log.console.show_time on \