From b575b8188d3086ff1e2fea0b7c6cd6485b9c0e25 Mon Sep 17 00:00:00 2001 From: shenli Date: Sat, 23 Jul 2016 10:44:30 +0800 Subject: [PATCH 1/8] *: Add tidb flags document --- tidb/configuration.md | 50 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 tidb/configuration.md diff --git a/tidb/configuration.md b/tidb/configuration.md new file mode 100644 index 0000000000000..b51f92ae1e10c --- /dev/null +++ b/tidb/configuration.md @@ -0,0 +1,50 @@ +# Configuration flags + +TiDB is configurable through command-line flags and environment variables. + +The official TiDB ports are 4000 for client requests and 10080 for status report. + +### --store ++ Storage type ++ Human-readable name for this member. ++ default: "goleveldb" ++ You can choose from memory, goleveldb, boltdb and tikv. The first three are all local storage. TiKV is a distributed storage. + +### --path ++ Path to the data directory for local storage (goleveldb, boltdb, memory). DSN to the distributed storage (TiKV). ++ default: "/tmp/tidb" ++ If use TiKV, the path should be in this format: $Host:$Port/pd?cluster=$ClusterID + +### -L ++ Log level ++ default: "debug" ++ You can choose from debug, info, warn, error, fatal. + +### -P ++ TiDB server listening port. ++ default: "4000" ++ TiDB server will accept MySQL client request from this port. + +### --status ++ TiDB server status report port. ++ default: "10080" ++ This is used for get server status. + +### --lease ++ Schema lease time in second. ++ default: "1" ++ It is schema lease time used in online schema change. Its value will affact DDL statement running time. It is very dangerous to change it if you don't understand the internal mechanism. + +### --socket ++ The socket file to use for connection. ++ default: "" ++ example: "/tmp/tidb.sock" + +### --perfschema ++ Enable(1) or disable(0) performance schema. ++ default: "0" ++ If set this to 1, it will affect performance. + +### TIDB_PPROF environment variable ++ Enable runtime profiling data via HTTP server. Address is at client URL + "/debug/pprof/" ++ If set $TIDB_PPROF to 0, TiDB will disable pprof. Otherwise TiDB will enable pprof. From 5e9ac82dddd27d144a37e1c6059179ee8b8343d4 Mon Sep 17 00:00:00 2001 From: shenli Date: Sat, 23 Jul 2016 11:04:01 +0800 Subject: [PATCH 2/8] op-guide: Add configuration docs in op-guide --- {tidb => op-guide}/configuration.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {tidb => op-guide}/configuration.md (100%) diff --git a/tidb/configuration.md b/op-guide/configuration.md similarity index 100% rename from tidb/configuration.md rename to op-guide/configuration.md From 8f422345371d105150041c8efa15a14b7f0d7fe5 Mon Sep 17 00:00:00 2001 From: shenli Date: Sat, 23 Jul 2016 11:07:24 +0800 Subject: [PATCH 3/8] op-guide: Address comment --- op-guide/configuration.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/op-guide/configuration.md b/op-guide/configuration.md index b51f92ae1e10c..4cc416e5794a6 100644 --- a/op-guide/configuration.md +++ b/op-guide/configuration.md @@ -1,6 +1,9 @@ # Configuration flags -TiDB is configurable through command-line flags and environment variables. +TiDB/TiKV/PD are configurable through command-line flags and environment variables. + + +##TiDB The official TiDB ports are 4000 for client requests and 10080 for status report. From 75868b9cc66096cd8efd09b30a8db3a8ff851f29 Mon Sep 17 00:00:00 2001 From: shenli Date: Sat, 23 Jul 2016 14:23:02 +0800 Subject: [PATCH 4/8] *: Address comment --- op-guide/configuration.md | 35 +++++++++++++++++------------------ 1 file changed, 17 insertions(+), 18 deletions(-) diff --git a/op-guide/configuration.md b/op-guide/configuration.md index 4cc416e5794a6..6069f8237036b 100644 --- a/op-guide/configuration.md +++ b/op-guide/configuration.md @@ -5,49 +5,48 @@ TiDB/TiKV/PD are configurable through command-line flags and environment variabl ##TiDB -The official TiDB ports are 4000 for client requests and 10080 for status report. +The default TiDB ports are 4000 for client requests and 10080 for status report. ### --store -+ Storage type ++ Storage engine type + Human-readable name for this member. + default: "goleveldb" -+ You can choose from memory, goleveldb, boltdb and tikv. The first three are all local storage. TiKV is a distributed storage. ++ You can choose from "memory", "goleveldb", "BoltDB" or "TiKV". The first three are all local storage engines. TiKV is a distributed storage engine. ### --path -+ Path to the data directory for local storage (goleveldb, boltdb, memory). DSN to the distributed storage (TiKV). ++ The path to the data directory for local storage engines like goleveldb, BoltDB, or memory or the DSN for the distributed storage engine like TiKV. If you use TiKV, specify the path in the following format: $Host:$Port/pd?cluster=$ClusterID. + default: "/tmp/tidb" -+ If use TiKV, the path should be in this format: $Host:$Port/pd?cluster=$ClusterID ### -L -+ Log level ++ The log level + default: "debug" -+ You can choose from debug, info, warn, error, fatal. ++ You can choose from debug, info, warn, error, or fatal. ### -P -+ TiDB server listening port. ++ The listening port for TiDB server. + default: "4000" + TiDB server will accept MySQL client request from this port. ### --status -+ TiDB server status report port. ++ The status report port for TiDB server + default: "10080" -+ This is used for get server status. ++ This is used to get server status. ### --lease -+ Schema lease time in second. ++ The schema lease time in second. + default: "1" -+ It is schema lease time used in online schema change. Its value will affact DDL statement running time. It is very dangerous to change it if you don't understand the internal mechanism. ++ This is the schema lease time that is used in online schema changes. The value will affect the DDL statement running time. You cannot change it unless you understand the internal mechanism. ### --socket -+ The socket file to use for connection. ++ The socket file for connection. + default: "" -+ example: "/tmp/tidb.sock" ++ You can use the "/tmp/tidb.sock" file. ### --perfschema -+ Enable(1) or disable(0) performance schema. ++ Enable(1) or disable(0) the performance schema. + default: "0" -+ If set this to 1, it will affect performance. ++ The value can be (1) or (0). (1) is to enable and (0) is to disable. If the value is set to be (1), the performance will be affected. -### TIDB_PPROF environment variable -+ Enable runtime profiling data via HTTP server. Address is at client URL + "/debug/pprof/" +### $TIDB_PPROF environment variable ++ An environment variable that is used to enable or disable the runtime profiling data via the HTTP server. . Address is at client URL + "/debug/pprof/". + If set $TIDB_PPROF to 0, TiDB will disable pprof. Otherwise TiDB will enable pprof. From 9ee0ec3789b15abae8e0a13e8133ae50a056afc8 Mon Sep 17 00:00:00 2001 From: shenli Date: Sat, 23 Jul 2016 22:34:14 +0800 Subject: [PATCH 5/8] *: address comment --- op-guide/configuration.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/op-guide/configuration.md b/op-guide/configuration.md index 6069f8237036b..2884c82dbe75a 100644 --- a/op-guide/configuration.md +++ b/op-guide/configuration.md @@ -33,7 +33,7 @@ The default TiDB ports are 4000 for client requests and 10080 for status report. + This is used to get server status. ### --lease -+ The schema lease time in second. ++ The schema lease time in seconds. + default: "1" + This is the schema lease time that is used in online schema changes. The value will affect the DDL statement running time. You cannot change it unless you understand the internal mechanism. @@ -48,5 +48,5 @@ The default TiDB ports are 4000 for client requests and 10080 for status report. + The value can be (1) or (0). (1) is to enable and (0) is to disable. If the value is set to be (1), the performance will be affected. ### $TIDB_PPROF environment variable -+ An environment variable that is used to enable or disable the runtime profiling data via the HTTP server. . Address is at client URL + "/debug/pprof/". ++ An environment variable that is used to enable or disable the runtime profiling data via the HTTP server. The Address is at client URL + "/debug/pprof/". + If set $TIDB_PPROF to 0, TiDB will disable pprof. Otherwise TiDB will enable pprof. From 5ed4fe89525dc9a27b399e2b9c2030f9a62e2e0b Mon Sep 17 00:00:00 2001 From: shenli Date: Mon, 25 Jul 2016 14:34:06 +0800 Subject: [PATCH 6/8] *: Address comments --- op-guide/configuration.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/op-guide/configuration.md b/op-guide/configuration.md index 2884c82dbe75a..6d2467ae1541b 100644 --- a/op-guide/configuration.md +++ b/op-guide/configuration.md @@ -8,7 +8,7 @@ TiDB/TiKV/PD are configurable through command-line flags and environment variabl The default TiDB ports are 4000 for client requests and 10080 for status report. ### --store -+ Storage engine type ++ the storage engine type + Human-readable name for this member. + default: "goleveldb" + You can choose from "memory", "goleveldb", "BoltDB" or "TiKV". The first three are all local storage engines. TiKV is a distributed storage engine. @@ -18,34 +18,34 @@ The default TiDB ports are 4000 for client requests and 10080 for status report. + default: "/tmp/tidb" ### -L -+ The log level ++ the log level + default: "debug" + You can choose from debug, info, warn, error, or fatal. ### -P -+ The listening port for TiDB server. ++ the listening port for TiDB server + default: "4000" + TiDB server will accept MySQL client request from this port. ### --status -+ The status report port for TiDB server ++ the status report port for TiDB server + default: "10080" + This is used to get server status. ### --lease -+ The schema lease time in seconds. ++ the schema lease time in seconds + default: "1" + This is the schema lease time that is used in online schema changes. The value will affect the DDL statement running time. You cannot change it unless you understand the internal mechanism. ### --socket -+ The socket file for connection. ++ the socket file for connection + default: "" + You can use the "/tmp/tidb.sock" file. ### --perfschema -+ Enable(1) or disable(0) the performance schema. ++ enable(1) or disable(0) the performance schema + default: "0" -+ The value can be (1) or (0). (1) is to enable and (0) is to disable. If the value is set to be (1), the performance will be affected. ++ The value can be (1) or (0). (1) is to enable and (0) is to disable. The Performance Schema provides a way to inspect internal execution of the server at runtime. See [performance schema](http://dev.mysql.com/doc/refman/5.7/en/performance-schema.html) for more information. If enable performance schema, the performance will be affected. ### $TIDB_PPROF environment variable + An environment variable that is used to enable or disable the runtime profiling data via the HTTP server. The Address is at client URL + "/debug/pprof/". From 6584a40d5a35b931af405abf64b2998a55228a2a Mon Sep 17 00:00:00 2001 From: shenli Date: Mon, 25 Jul 2016 14:43:48 +0800 Subject: [PATCH 7/8] op-guid: Address comment --- op-guide/configuration.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/op-guide/configuration.md b/op-guide/configuration.md index 6d2467ae1541b..845e3eecd1efa 100644 --- a/op-guide/configuration.md +++ b/op-guide/configuration.md @@ -45,7 +45,7 @@ The default TiDB ports are 4000 for client requests and 10080 for status report. ### --perfschema + enable(1) or disable(0) the performance schema + default: "0" -+ The value can be (1) or (0). (1) is to enable and (0) is to disable. The Performance Schema provides a way to inspect internal execution of the server at runtime. See [performance schema](http://dev.mysql.com/doc/refman/5.7/en/performance-schema.html) for more information. If enable performance schema, the performance will be affected. ++ The value can be (1) or (0). (1) is to enable and (0) is to disable. The Performance Schema provides a way to inspect internal execution of the server at runtime. See [performance schema](http://dev.mysql.com/doc/refman/5.7/en/performance-schema.html) for more information. If you enable the performance schema, the performance will be affected. ### $TIDB_PPROF environment variable + An environment variable that is used to enable or disable the runtime profiling data via the HTTP server. The Address is at client URL + "/debug/pprof/". From aef27281a51d02e5bc9723388998c342ba6bb65b Mon Sep 17 00:00:00 2001 From: shenli Date: Mon, 25 Jul 2016 15:03:11 +0800 Subject: [PATCH 8/8] *: Address comment --- op-guide/configuration.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/op-guide/configuration.md b/op-guide/configuration.md index 845e3eecd1efa..27a2c516e640f 100644 --- a/op-guide/configuration.md +++ b/op-guide/configuration.md @@ -35,7 +35,7 @@ The default TiDB ports are 4000 for client requests and 10080 for status report. ### --lease + the schema lease time in seconds + default: "1" -+ This is the schema lease time that is used in online schema changes. The value will affect the DDL statement running time. You cannot change it unless you understand the internal mechanism. ++ This is the schema lease time that is used in online schema changes. The value will affect the DDL statement running time. Do not change it unless you understand the internal mechanism. ### --socket + the socket file for connection