From 471cf829052945a7f65524c61f64b6a503f7d222 Mon Sep 17 00:00:00 2001 From: Yicheng Qin Date: Fri, 5 Jun 2015 17:25:40 -0700 Subject: [PATCH] docs: document maximal OS threads --- Documentation/admin_guide.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Documentation/admin_guide.md b/Documentation/admin_guide.md index d5b53f800..d8ab2dabb 100644 --- a/Documentation/admin_guide.md +++ b/Documentation/admin_guide.md @@ -209,3 +209,11 @@ If the request times out, it indicates two possibilities: 2. the majority of the cluster is not functioning. If timeout happens several times continuously, administrators should check status of cluster and resolve it as soon as possible. + +### Best Practices + +#### Maximal OS threads + +By default, etcd uses the default configuration of the Go 1.4 runtime, which means that at most one operating system thread will be used to execute code simultaneously. (Note that this default behavior [may change in Go 1.5](https://docs.google.com/document/d/1At2Ls5_fhJQ59kDK2DFVhFu3g5mATSXqqV5QrxinasI/edit)). + +When using etcd in heavy-load scenarios on machines with multiple cores it will usually be desirable to increase the number of threads that etcd can utilize. To do this, simply set the environment variable `GOMAXPROCS` to the desired number when starting etcd. For more information on this variable, see the Go [runtime](https://golang.org/pkg/runtime) documentation.