reconfigure

This commit is contained in:
Ben Sarmiento
2023-11-06 21:29:52 +01:00
parent ada66f47f4
commit 6be49d8843

View File

@@ -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)