From 8fa568d20bb0a07257a236f4634bd562edc63089 Mon Sep 17 00:00:00 2001 From: Charles Kerr Date: Wed, 3 Jun 2009 22:52:08 +0000 Subject: [PATCH] (trunk libT) lessen evbuffer memory bloat when we have a lot of simultaneous peers --- libtransmission/peer-io.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libtransmission/peer-io.c b/libtransmission/peer-io.c index ccd2f4489..7602f983b 100644 --- a/libtransmission/peer-io.c +++ b/libtransmission/peer-io.c @@ -640,8 +640,8 @@ getDesiredOutputBufferSize( const tr_peerIo * io, uint64_t now ) * It's okay to tweak this as needed */ const double maxBlockSize = 16 * 1024; /* 16 KiB is from BT spec */ const double currentSpeed = tr_bandwidthGetPieceSpeed( &io->bandwidth, now, TR_UP ); - const double period = 20; /* arbitrary */ - const double numBlocks = 5.5; /* the 5 is arbitrary; the .5 is to leave room for messages */ + const double period = 15; /* arbitrary */ + const double numBlocks = 3.5; /* the 3 is arbitrary; the .5 is to leave room for messages */ return MAX( maxBlockSize*numBlocks, currentSpeed*1024*period ); } -- 2.40.0