Skip to content

Commit

Permalink
address comments
Browse files Browse the repository at this point in the history
Signed-off-by: Neil Shen <overvenus@gmail.com>
  • Loading branch information
overvenus authored and ti-chi-bot committed Sep 2, 2021
1 parent 5c05d65 commit ca269fa
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions cdc/kv/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,16 @@ import (
const (
dialTimeout = 10 * time.Second
tikvRequestMaxBackoff = 20000 // Maximum total sleep time(in ms)

// TiCDC may open numerous gRPC streams,
// with 64KB window size, 10K streams takes about 27GB memory.
grpcInitialWindowSize = 65535 // 64 KB The value for initial window size on a stream
grpcInitialConnWindowSize = 1 << 23 // 8 MB The value for initial window size on a connection
grpcMaxCallRecvMsgSize = 1 << 28 // 256 MB The maximum message size the client can receive
// with 65535 bytes window size, 10K streams takes about 27GB memory.
//
// 65535 bytes, the initial window size in http2 spec.
grpcInitialWindowSize = (1 << 16) - 1
// 8 MB The value for initial window size on a connection
grpcInitialConnWindowSize = 1 << 23
// 256 MB The maximum message size the client can receive
grpcMaxCallRecvMsgSize = 1 << 28

// The threshold of warning a message is too large. TiKV split events into 6MB per-message.
warnRecvMsgSizeThreshold = 12 * 1024 * 1024
Expand Down

0 comments on commit ca269fa

Please sign in to comment.