aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Lu <chrislusf@users.noreply.github.com>2021-03-24 09:29:38 -0700
committerGitHub <noreply@github.com>2021-03-24 09:29:38 -0700
commit26657f1d7253c61e1346177e43d2d761749901a1 (patch)
tree175951241589154a820c445008c5937097dfe176
parenta801332b0dc44ea3239e437b845e210c840e125e (diff)
parent9ce82a9cd288dc010354cfcf89bc3f0729a5272c (diff)
downloadseaweedfs-26657f1d7253c61e1346177e43d2d761749901a1.tar.xz
seaweedfs-26657f1d7253c61e1346177e43d2d761749901a1.zip
Merge pull request #1943 from kmlebedev/maxCPUs
GOMAXPROCS use defaults to the value of runtime.NumCPU
-rw-r--r--weed/command/master.go2
-rw-r--r--weed/command/server.go2
-rw-r--r--weed/command/volume.go3
3 files changed, 0 insertions, 7 deletions
diff --git a/weed/command/master.go b/weed/command/master.go
index 82e33bae1..0f5e2156d 100644
--- a/weed/command/master.go
+++ b/weed/command/master.go
@@ -6,7 +6,6 @@ import (
"google.golang.org/grpc/reflection"
"net/http"
"os"
- "runtime"
"sort"
"strconv"
"strings"
@@ -86,7 +85,6 @@ func runMaster(cmd *Command, args []string) bool {
util.LoadConfiguration("security", false)
util.LoadConfiguration("master", false)
- runtime.GOMAXPROCS(runtime.NumCPU())
grace.SetupProfiling(*masterCpuProfile, *masterMemProfile)
parent, _ := util.FullPath(*m.metaFolder).DirAndName()
diff --git a/weed/command/server.go b/weed/command/server.go
index 7b184a329..aef61a93c 100644
--- a/weed/command/server.go
+++ b/weed/command/server.go
@@ -3,7 +3,6 @@ package command
import (
"fmt"
"os"
- "runtime"
"runtime/pprof"
"strings"
"time"
@@ -192,7 +191,6 @@ func runServer(cmd *Command, args []string) bool {
webdavOptions.filer = &filerAddress
msgBrokerOptions.filer = &filerAddress
- runtime.GOMAXPROCS(runtime.NumCPU())
go stats_collect.StartMetricsServer(*serverMetricsHttpPort)
folders := strings.Split(*volumeDataFolders, ",")
diff --git a/weed/command/volume.go b/weed/command/volume.go
index 7fd31665f..b75af0f71 100644
--- a/weed/command/volume.go
+++ b/weed/command/volume.go
@@ -6,7 +6,6 @@ import (
"net/http"
httppprof "net/http/pprof"
"os"
- "runtime"
"runtime/pprof"
"strconv"
"strings"
@@ -111,8 +110,6 @@ func runVolume(cmd *Command, args []string) bool {
util.LoadConfiguration("security", false)
- runtime.GOMAXPROCS(runtime.NumCPU())
-
// If --pprof is set we assume the caller wants to be able to collect
// cpu and memory profiles via go tool pprof
if !*v.pprof {