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