diff options
| author | Chris Lu <chris.lu@gmail.com> | 2019-06-23 03:08:27 -0700 |
|---|---|---|
| committer | Chris Lu <chris.lu@gmail.com> | 2019-06-23 03:08:27 -0700 |
| commit | f16375621f25995837868bd77e64a7d0da2ac68d (patch) | |
| tree | 823ec9a69dcfae7a60fc00cee48835c0a191fa9b /weed/command/volume.go | |
| parent | 6c01fb6d2d9986731c0d44b233b480c1bb47d219 (diff) | |
| download | seaweedfs-f16375621f25995837868bd77e64a7d0da2ac68d.tar.xz seaweedfs-f16375621f25995837868bd77e64a7d0da2ac68d.zip | |
big refactoring
Diffstat (limited to 'weed/command/volume.go')
| -rw-r--r-- | weed/command/volume.go | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/weed/command/volume.go b/weed/command/volume.go index c775ac5cf..3c1aa2b50 100644 --- a/weed/command/volume.go +++ b/weed/command/volume.go @@ -35,7 +35,6 @@ type VolumeServerOptions struct { masters *string pulseSeconds *int idleConnectionTimeout *int - maxCpu *int dataCenter *string rack *string whiteList []string @@ -57,7 +56,6 @@ func init() { v.masters = cmdVolume.Flag.String("mserver", "localhost:9333", "comma-separated master servers") v.pulseSeconds = cmdVolume.Flag.Int("pulseSeconds", 5, "number of seconds between heartbeats, must be smaller than or equal to the master's setting") v.idleConnectionTimeout = cmdVolume.Flag.Int("idleTimeout", 30, "connection idle seconds") - v.maxCpu = cmdVolume.Flag.Int("maxCpu", 0, "maximum number of CPUs. 0 means all available CPUs") v.dataCenter = cmdVolume.Flag.String("dataCenter", "", "current volume server's data center name") v.rack = cmdVolume.Flag.String("rack", "", "current volume server's rack name") v.indexType = cmdVolume.Flag.String("index", "memory", "Choose [memory|leveldb|leveldbMedium|leveldbLarge] mode for memory~performance balance.") @@ -86,10 +84,7 @@ func runVolume(cmd *Command, args []string) bool { util.LoadConfiguration("security", false) - if *v.maxCpu < 1 { - *v.maxCpu = runtime.NumCPU() - } - runtime.GOMAXPROCS(*v.maxCpu) + runtime.GOMAXPROCS(runtime.NumCPU()) util.SetupProfiling(*v.cpuProfile, *v.memProfile) v.startVolumeServer(*volumeFolders, *maxVolumeCounts, *volumeWhiteListOption) |
