mirror of
https://github.com/TeaOSLab/EdgeNode.git
synced 2026-04-18 22:45:20 +08:00
降低默认的CPU线程数(经测试,有约20%的性能提升)
This commit is contained in:
@@ -962,7 +962,7 @@ func (this *Node) onReload(config *nodeconfigs.NodeConfig, reloadAll bool) {
|
||||
runtime.GOMAXPROCS(int(config.MaxCPU))
|
||||
remotelogs.Println("NODE", "[CPU]set max cpu to '"+types.String(config.MaxCPU)+"'")
|
||||
} else {
|
||||
var threads = runtime.NumCPU() * 4
|
||||
var threads = runtime.NumCPU()
|
||||
runtime.GOMAXPROCS(threads)
|
||||
remotelogs.Println("NODE", "[CPU]set max cpu to '"+types.String(threads)+"'")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user