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