mirror of
https://github.com/transmission/transmission
synced 2025-02-22 22:20:39 +00:00
(trunk libT) lessen evbuffer memory bloat when we have a lot of simultaneous peers
This commit is contained in:
parent
b6f3b15f0a
commit
8fa568d20b
1 changed files with 2 additions and 2 deletions
|
@ -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 );
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue