Skip to content

Commit 1e7c8e3

Browse files
reduce concurrency (#181)
1 parent 98a227b commit 1e7c8e3

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

p2p/kademlia/dht.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1697,7 +1697,7 @@ func (s *DHT) IterateBatchStore(ctx context.Context, values [][]byte, typ int, i
16971697

16981698
func (s *DHT) batchStoreNetwork(ctx context.Context, values [][]byte, nodes map[string]*Node, storageMap map[string][]int, typ int) chan *MessageWithError {
16991699
responses := make(chan *MessageWithError, len(nodes))
1700-
maxStore := 48
1700+
maxStore := 16
17011701
if ln := len(nodes); ln < maxStore {
17021702
maxStore = ln
17031703
}

p2p/kademlia/network.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -627,7 +627,7 @@ func (s *Network) Call(ctx context.Context, request *Message, isLong bool) (*Mes
627627
// ---- retryable RPC helpers -------------------------------------------------
628628

629629
func (s *Network) rpcOnceWrapper(ctx context.Context, cw *connWrapper, remoteAddr string, data []byte, timeout time.Duration, msgType int) (*Message, error) {
630-
writeDL := calcWriteDeadline(timeout, len(data), 2.0) // target ~2 MB/s
630+
writeDL := calcWriteDeadline(timeout, len(data), 1.0) // target ~2 MB/s
631631

632632
retried := false
633633
for {

supernode/services/cascade/adaptors/p2p.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import (
2020
)
2121

2222
const (
23-
loadSymbolsBatchSize = 3000
23+
loadSymbolsBatchSize = 2500
2424
// Minimum first-pass coverage to store before returning from Register (percent)
2525
storeSymbolsPercent = 18
2626

0 commit comments

Comments
 (0)