diff options
author | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2016-04-07 22:31:57 +0900 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2016-04-07 22:31:57 +0900 |
commit | 938c4ca45300bef32517c0b694a955b44057332b (patch) | |
tree | 68bc9b5b4842bf47ad1765dd0aab26d75e60aab4 | |
parent | 4f000d78206a3ea926e616d6ea2b50f5d8b2e04c (diff) |
grpc: disable tracing to avoid consuming massive memory
By default, grpc traces rpc events. GoBGP sends a load of data
(e.g. showing global rib, injecting via mrt, etc). As a result, GoBGP
consumes huge memory if you send/receive data via RPC. Let's disable
tracing.
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
-rw-r--r-- | gobgp/main.go | 2 | ||||
-rw-r--r-- | server/grpc_server.go | 1 |
2 files changed, 3 insertions, 0 deletions
diff --git a/gobgp/main.go b/gobgp/main.go index 87ad3b17..ce4abf96 100644 --- a/gobgp/main.go +++ b/gobgp/main.go @@ -17,8 +17,10 @@ package main import ( "github.com/osrg/gobgp/gobgp/cmd" + "google.golang.org/grpc" ) func main() { + grpc.EnableTracing = false cmd.NewRootCmd().Execute() } diff --git a/server/grpc_server.go b/server/grpc_server.go index 73d0ba01..cff759ff 100644 --- a/server/grpc_server.go +++ b/server/grpc_server.go @@ -483,6 +483,7 @@ func (r *GrpcResponse) Err() error { } func NewGrpcServer(port int, bgpServerCh chan *GrpcRequest) *Server { + grpc.EnableTracing = false grpcServer := grpc.NewServer() server := &Server{ grpcServer: grpcServer, |