mirror of
https://github.com/tendermint/tendermint.git
synced 2026-09-19 14:34:17 +00:00
p2p: reduce buffering on channels (#6609)
Having smaller buffers in each reactor/channel will mean that there will be fewer stale messages.
This commit is contained in:
@@ -33,11 +33,11 @@ var (
|
||||
MsgType: new(tmcons.Message),
|
||||
Descriptor: &p2p.ChannelDescriptor{
|
||||
ID: byte(StateChannel),
|
||||
Priority: 6,
|
||||
SendQueueCapacity: 100,
|
||||
Priority: 8,
|
||||
SendQueueCapacity: 64,
|
||||
RecvMessageCapacity: maxMsgSize,
|
||||
|
||||
MaxSendBytes: 12000,
|
||||
RecvBufferCapacity: 128,
|
||||
MaxSendBytes: 12000,
|
||||
},
|
||||
},
|
||||
DataChannel: {
|
||||
@@ -47,36 +47,33 @@ var (
|
||||
// stuff. Once we gossip the whole block there is nothing left to send
|
||||
// until next height or round.
|
||||
ID: byte(DataChannel),
|
||||
Priority: 10,
|
||||
SendQueueCapacity: 100,
|
||||
RecvBufferCapacity: 50 * 4096,
|
||||
Priority: 12,
|
||||
SendQueueCapacity: 64,
|
||||
RecvBufferCapacity: 512,
|
||||
RecvMessageCapacity: maxMsgSize,
|
||||
|
||||
MaxSendBytes: 40000,
|
||||
MaxSendBytes: 40000,
|
||||
},
|
||||
},
|
||||
VoteChannel: {
|
||||
MsgType: new(tmcons.Message),
|
||||
Descriptor: &p2p.ChannelDescriptor{
|
||||
ID: byte(VoteChannel),
|
||||
Priority: 7,
|
||||
SendQueueCapacity: 100,
|
||||
RecvBufferCapacity: 100 * 100,
|
||||
Priority: 10,
|
||||
SendQueueCapacity: 64,
|
||||
RecvBufferCapacity: 128,
|
||||
RecvMessageCapacity: maxMsgSize,
|
||||
|
||||
MaxSendBytes: 150,
|
||||
MaxSendBytes: 150,
|
||||
},
|
||||
},
|
||||
VoteSetBitsChannel: {
|
||||
MsgType: new(tmcons.Message),
|
||||
Descriptor: &p2p.ChannelDescriptor{
|
||||
ID: byte(VoteSetBitsChannel),
|
||||
Priority: 1,
|
||||
SendQueueCapacity: 2,
|
||||
RecvBufferCapacity: 1024,
|
||||
Priority: 5,
|
||||
SendQueueCapacity: 8,
|
||||
RecvBufferCapacity: 128,
|
||||
RecvMessageCapacity: maxMsgSize,
|
||||
|
||||
MaxSendBytes: 50,
|
||||
MaxSendBytes: 50,
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user