From: Christian Grothoff Date: Fri, 8 Oct 2010 16:22:34 +0000 (+0000) Subject: done X-Git-Tag: initial-import-from-subversion-38251~20095 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=3de15479a56c5c9c3cb7423807f019d4e5c18c1b;p=oweals%2Fgnunet.git done --- diff --git a/TODO b/TODO index fd1280bae..f87b24fb2 100644 --- a/TODO +++ b/TODO @@ -1,6 +1,5 @@ 0.9.0pre2: FS: - - measure latencies (core, datastore) => trust economy - FS performance benchmarking * DHT: [Nate] - track paths content travels (PUT, reply-to-get) in messages, diff --git a/src/fs/gnunet-service-fs.c b/src/fs/gnunet-service-fs.c index 0f603651e..180becb80 100644 --- a/src/fs/gnunet-service-fs.c +++ b/src/fs/gnunet-service-fs.c @@ -24,7 +24,6 @@ * @author Christian Grothoff * * TODO: - * - introduce random latency in processing * - more statistics */ #include "platform.h" @@ -2235,7 +2234,7 @@ test_put_load_too_high (uint32_t priority) if (GNUNET_LOAD_get_average (datastore_put_load) < 50) return GNUNET_NO; /* very fast */ ld = GNUNET_LOAD_get_load (datastore_put_load); - if ( (ld < 1) || (ld < priority) ) + if (ld < 2.0 * (1 + priority)) return GNUNET_NO; GNUNET_STATISTICS_update (stats, gettext_noop ("# storage requests dropped due to high load"), @@ -3408,7 +3407,7 @@ handle_p2p_put (void *cls, putl = GNUNET_LOAD_get_load (datastore_put_load); if ( (GNUNET_NO == prq.request_found) && ( (GNUNET_YES != active_migration) || - (putl > 2.0) ) ) + (putl > 2.5 * (1 + prq.priority)) ) ) { cp = GNUNET_CONTAINER_multihashmap_get (connected_peers, &other->hashPubKey); @@ -3892,7 +3891,7 @@ handle_p2p_get (void *cls, pr->namespace = (GNUNET_HashCode*) &pr[1]; memcpy (&pr[1], &opt[bits++], sizeof (GNUNET_HashCode)); } - if ( (GNUNET_LOAD_get_load (cp->transmission_delay) > 3) || + if ( (GNUNET_LOAD_get_load (cp->transmission_delay) > 3 * (1 + priority)) || (GNUNET_LOAD_get_average (cp->transmission_delay) > GNUNET_CONSTANTS_MAX_CORK_DELAY.value * 2 + GNUNET_LOAD_get_average (rt_entry_lifetime)) ) {