commit
520bb74626
@ -19,7 +19,6 @@ import (
|
|||||||
"path/filepath"
|
"path/filepath"
|
||||||
"regexp"
|
"regexp"
|
||||||
"runtime"
|
"runtime"
|
||||||
"runtime/debug"
|
|
||||||
"runtime/pprof"
|
"runtime/pprof"
|
||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
@ -170,7 +169,11 @@ are mostly useful for developers. Use with care.
|
|||||||
STNOUPGRADE Disable automatic upgrades.
|
STNOUPGRADE Disable automatic upgrades.
|
||||||
|
|
||||||
GOMAXPROCS Set the maximum number of CPU cores to use. Defaults to all
|
GOMAXPROCS Set the maximum number of CPU cores to use. Defaults to all
|
||||||
available CPU cores.`
|
available CPU cores.
|
||||||
|
|
||||||
|
GOGC Percentage of heap growth at which to trigger GC. Default is
|
||||||
|
100. Lower numbers keep peak memory usage down, at the price
|
||||||
|
of CPU usage (ie. performance).`
|
||||||
)
|
)
|
||||||
|
|
||||||
// Command line and environment options
|
// Command line and environment options
|
||||||
@ -368,10 +371,6 @@ func main() {
|
|||||||
func syncthingMain() {
|
func syncthingMain() {
|
||||||
var err error
|
var err error
|
||||||
|
|
||||||
if len(os.Getenv("GOGC")) == 0 {
|
|
||||||
debug.SetGCPercent(25)
|
|
||||||
}
|
|
||||||
|
|
||||||
if len(os.Getenv("GOMAXPROCS")) == 0 {
|
if len(os.Getenv("GOMAXPROCS")) == 0 {
|
||||||
runtime.GOMAXPROCS(runtime.NumCPU())
|
runtime.GOMAXPROCS(runtime.NumCPU())
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user