set default parallel to 64

v4
vinllen 6 years ago
parent b3bd61aef9
commit 41cb6cfe63
  1. 4
      conf/redis-shake.conf
  2. 2
      src/redis-shake/main/main.go

@ -16,8 +16,8 @@ http_profile = 9320
# runtime.GOMAXPROCS, 0 means use cpu core number: runtime.NumCPU() # runtime.GOMAXPROCS, 0 means use cpu core number: runtime.NumCPU()
ncpu = 0 ncpu = 0
# parallel routines number used in RDB file syncing. # parallel routines number used in RDB file syncing. default is 64.
parallel = 4 parallel = 32
# input RDB file. read from stdin, default is stdin ('/dev/stdin'). # input RDB file. read from stdin, default is stdin ('/dev/stdin').
# used in `decode` and `restore`. # used in `decode` and `restore`.

@ -178,7 +178,7 @@ func sanitizeOptions(tp string) error {
} }
if conf.Options.Parallel == 0 { // not set if conf.Options.Parallel == 0 { // not set
conf.Options.Parallel = 1 conf.Options.Parallel = 64 // default is 64
} else if conf.Options.Parallel > 1024 { } else if conf.Options.Parallel > 1024 {
return fmt.Errorf("parallel[%v] should in (0, 1024]", conf.Options.Parallel) return fmt.Errorf("parallel[%v] should in (0, 1024]", conf.Options.Parallel)
} else { } else {

Loading…
Cancel
Save