Skip to content
This repository has been archived by the owner on Dec 8, 2021. It is now read-only.

Commit

Permalink
mydump: set read block buffer size to BlockSize * 5
Browse files Browse the repository at this point in the history
  • Loading branch information
lonng committed Dec 30, 2018
1 parent eb011cd commit 79efc70
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lightning/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ func NewConfig() *Config {
App: Lightning{
RegionConcurrency: runtime.NumCPU(),
TableConcurrency: 8,
IOConcurrency: 2,
IOConcurrency: 5,
CheckRequirements: true,
},
TiDB: DBStore{
Expand Down
2 changes: 1 addition & 1 deletion lightning/mydump/parser.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ type Row struct {
func NewChunkParser(reader io.Reader, blockBufSize int64, ioWorkers *worker.RestoreWorkerPool) *ChunkParser {
return &ChunkParser{
reader: reader,
blockBuf: make([]byte, blockBufSize),
blockBuf: make([]byte, blockBufSize*5),
remainBuf: &bytes.Buffer{},
appendBuf: &bytes.Buffer{},
ioWorkers: ioWorkers,
Expand Down
2 changes: 1 addition & 1 deletion tidb-lightning.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ table-concurrency = 8
# region-concurrency default to runtime.NumCPU()
# region-concurrency =
# io-concurrency controls the maximum io concurrent
# io-concurrency = 2
# io-concurrency = 5

# logging
level = "info"
Expand Down

0 comments on commit 79efc70

Please sign in to comment.