X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=src%2Ffs%2Fgnunet-service-fs_cp.h;h=e3c7cd2278259a8525aece2f1dfc30c062483bfd;hb=1f09f4f7716db5939ec1c9a278b5661616dd72d6;hp=8923513c7c6a108e9f6d4399d4fe9aca380fbf30;hpb=f44c0036572d5557d2496748a4190a61e40e61ff;p=oweals%2Fgnunet.git diff --git a/src/fs/gnunet-service-fs_cp.h b/src/fs/gnunet-service-fs_cp.h index 8923513c7..e3c7cd227 100644 --- a/src/fs/gnunet-service-fs_cp.h +++ b/src/fs/gnunet-service-fs_cp.h @@ -30,6 +30,36 @@ #include "gnunet-service-fs.h" +/** + * Maximum number of outgoing messages we queue per peer. + * + * Performance measurements for 2 peer setup for 50 MB file + * (with MAX_DATASTORE_QUEUE = 1 and RETRY_PROBABILITY_INV = 1): + * + * 2: 1700 kb/s, 1372 kb/s + * 8: 2117 kb/s, 1284 kb/s, 1112 kb/s + * 16: 3500 kb/s, 3200 kb/s, 3388 kb/s + * 32: 3441 kb/s, 3163 kb/s, 3277 kb/s + * 128: 1700 kb/s; 2010 kb/s, 3383 kb/s, 1156 kb/s + * + * Conclusion: 16 seems to be a pretty good value (stable + * and high performance, no excessive memory use). + */ +#define MAX_QUEUE_PER_PEER 16 + +/** + * Length of the P2P success tracker. Note that having a very long + * list can also hurt performance. + */ +#define P2P_SUCCESS_LIST_SIZE 8 + +/** + * Length of the CS-2-P success tracker. Note that + * having a very long list can also hurt performance. + */ +#define CS2P_SUCCESS_LIST_SIZE 8 + + /** * Performance data kept for a peer. */ @@ -62,6 +92,13 @@ struct GSF_PeerPerformanceData */ struct GNUNET_TIME_Relative avg_reply_delay; + /** + * If we get content we already have from this peer, for how + * long do we block him? Adjusted based on the fraction of + * redundant data we receive, between 1s and 1h. + */ + struct GNUNET_TIME_Relative migration_delay; + /** * Point in time until which this peer does not want us to migrate content * to it. @@ -110,10 +147,6 @@ struct GSF_PeerPerformanceData */ unsigned int pending_replies; - /** - * How many of the last blocks from migration were duplicates? - */ - unsigned int migration_duplication; }; @@ -174,7 +207,7 @@ struct GSF_PeerTransmitHandle; struct GSF_ConnectedPeer * GSF_peer_connect_handler_ (const struct GNUNET_PeerIdentity *peer, const struct GNUNET_ATS_Information *atsi, - unsigned int atsi_count); + unsigned int atsi_count); /** @@ -270,9 +303,8 @@ int GSF_handle_p2p_migration_stop_ (void *cls, const struct GNUNET_PeerIdentity *other, const struct GNUNET_MessageHeader *message, - const struct GNUNET_ATS_Information - *atsi, - unsigned int atsi_count); + const struct GNUNET_ATS_Information *atsi, + unsigned int atsi_count); /** @@ -310,7 +342,7 @@ GSF_get_peer_performance_data_ (struct GSF_ConnectedPeer *cp); */ void GSF_block_peer_migration_ (struct GSF_ConnectedPeer *cp, - struct GNUNET_TIME_Relative block_time); + struct GNUNET_TIME_Absolute block_time); /**