reconfigure
This commit is contained in:
@@ -6,6 +6,7 @@ import (
|
||||
"net/http"
|
||||
"os"
|
||||
"os/signal"
|
||||
"runtime"
|
||||
"syscall"
|
||||
"time"
|
||||
|
||||
@@ -44,13 +45,15 @@ func main() {
|
||||
}
|
||||
}
|
||||
|
||||
log.Debugf("Initializing chunk manager, cores: %d", runtime.NumCPU())
|
||||
// 64kb request size
|
||||
chunkMgr, err := chunk.NewManager(
|
||||
"",
|
||||
524288, // 1MB
|
||||
4, // 4 threads
|
||||
4, // 4 threads
|
||||
4, // 4 threads
|
||||
4, // 4 chunks (4MB)
|
||||
524288, // 512kb
|
||||
1, // 1 chunk - load ahead (1MB total)
|
||||
max(runtime.NumCPU()/2, 1), // check threads
|
||||
max(runtime.NumCPU()/2, 1), // load threads
|
||||
runtime.NumCPU()*2, // max chunks
|
||||
config)
|
||||
if nil != err {
|
||||
log.Panicf("Failed to initialize chunk manager: %v", err)
|
||||
|
||||
Reference in New Issue
Block a user