mirror of
https://github.com/tailscale/tailscale.git
synced 2025-04-19 05:02:34 +00:00
tailscaled: no longer tune gcpercent
Usage of userspace-networking is increasing, and the aggressive GC tuning causes a significant reduction in performance in that mode. Signed-off-by: James Tucker <james@tailscale.com>
This commit is contained in:
parent
4f1d6c53cb
commit
8de7f9bff7
@ -25,7 +25,6 @@ import (
|
|||||||
"os/signal"
|
"os/signal"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
"runtime"
|
"runtime"
|
||||||
"runtime/debug"
|
|
||||||
"strings"
|
"strings"
|
||||||
"syscall"
|
"syscall"
|
||||||
"time"
|
"time"
|
||||||
@ -130,14 +129,6 @@ var subCommands = map[string]*func([]string) error{
|
|||||||
}
|
}
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
// We aren't very performance sensitive, and the parts that are
|
|
||||||
// performance sensitive (wireguard) try hard not to do any memory
|
|
||||||
// allocations. So let's be aggressive about garbage collection,
|
|
||||||
// unless the user specifically overrides it in the usual way.
|
|
||||||
if _, ok := os.LookupEnv("GOGC"); !ok {
|
|
||||||
debug.SetGCPercent(10)
|
|
||||||
}
|
|
||||||
|
|
||||||
printVersion := false
|
printVersion := false
|
||||||
flag.IntVar(&args.verbose, "verbose", 0, "log verbosity level; 0 is default, 1 or higher are increasingly verbose")
|
flag.IntVar(&args.verbose, "verbose", 0, "log verbosity level; 0 is default, 1 or higher are increasingly verbose")
|
||||||
flag.BoolVar(&args.cleanup, "cleanup", false, "clean up system state and exit")
|
flag.BoolVar(&args.cleanup, "cleanup", false, "clean up system state and exit")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user