Browse Source

p2p: increase queue size to 16MB (#6588)

pull/6591/head
Callum Waters 3 years ago
committed by GitHub
parent
commit
25bb556fee
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 5 deletions
  1. +3
    -0
      internal/p2p/queue.go
  2. +0
    -2
      internal/p2p/wdrr_queue.go
  3. +3
    -3
      internal/statesync/reactor.go

+ 3
- 0
internal/p2p/queue.go View File

@ -4,6 +4,9 @@ import (
tmsync "github.com/tendermint/tendermint/internal/libs/sync"
)
// default capacity for the size of a queue
const defaultCapacity uint = 16e6 // ~16MB
// queue does QoS scheduling for Envelopes, enqueueing and dequeueing according
// to some policy. Queues are used at contention points, i.e.:
//


+ 0
- 2
internal/p2p/wdrr_queue.go View File

@ -10,8 +10,6 @@ import (
"github.com/tendermint/tendermint/libs/log"
)
const defaultCapacity uint = 1048576 // 1MB
// wrappedEnvelope wraps a p2p Envelope with its precomputed size.
type wrappedEnvelope struct {
envelope Envelope


+ 3
- 3
internal/statesync/reactor.go View File

@ -84,13 +84,13 @@ const (
recentSnapshots = 10
// snapshotMsgSize is the maximum size of a snapshotResponseMessage
snapshotMsgSize = int(4e6)
snapshotMsgSize = int(4e6) // ~4MB
// chunkMsgSize is the maximum size of a chunkResponseMessage
chunkMsgSize = int(16e6)
chunkMsgSize = int(16e6) // ~16MB
// lightBlockMsgSize is the maximum size of a lightBlockResponseMessage
lightBlockMsgSize = int(1e7)
lightBlockMsgSize = int(1e7) // ~10MB
// lightBlockResponseTimeout is how long the dispatcher waits for a peer to
// return a light block


Loading…
Cancel
Save