Skip to content

Commit

Permalink
*: Add tidb flags document
Browse files Browse the repository at this point in the history
  • Loading branch information
shenli committed Jul 23, 2016
1 parent 0870e83 commit b575b81
Showing 1 changed file with 50 additions and 0 deletions.
50 changes: 50 additions & 0 deletions tidb/configuration.md
Original file line number Diff line number Diff line change
@@ -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

This comment has been minimized.

Copy link
@QueenyJin

QueenyJin Jul 23, 2016

Contributor

the 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.

This comment has been minimized.

Copy link
@QueenyJin

QueenyJin Jul 23, 2016

Contributor

++ 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).

This comment has been minimized.

Copy link
@QueenyJin

QueenyJin Jul 23, 2016

Contributor

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

This comment has been minimized.

Copy link
@QueenyJin

QueenyJin Jul 23, 2016

Contributor

Move this previously.


### -L
+ Log level

This comment has been minimized.

Copy link
@QueenyJin

QueenyJin Jul 23, 2016

Contributor

the log level

+ default: "debug"
+ You can choose from debug, info, warn, error, fatal.

This comment has been minimized.

Copy link
@QueenyJin

QueenyJin Jul 23, 2016

Contributor

You can choose from debug, info, warn, error, or fatal.


### -P
+ TiDB server listening port.

This comment has been minimized.

Copy link
@QueenyJin

QueenyJin Jul 23, 2016

Contributor

the listening port for TiDB server

+ default: "4000"
+ TiDB server will accept MySQL client request from this port.

This comment has been minimized.

Copy link
@QueenyJin

QueenyJin Jul 23, 2016

Contributor

client request ->requests


### --status
+ TiDB server status report port.

This comment has been minimized.

Copy link
@QueenyJin

QueenyJin Jul 23, 2016

Contributor

the status report port for TiDB server

+ default: "10080"
+ This is used for get server status.

This comment has been minimized.

Copy link
@QueenyJin

QueenyJin Jul 23, 2016

Contributor

for -> to


### --lease
+ Schema lease time in second.

This comment has been minimized.

Copy link
@QueenyJin

QueenyJin Jul 23, 2016

Contributor

the schema lease time in seconds

+ 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 comment has been minimized.

Copy link
@QueenyJin

QueenyJin Jul 23, 2016

Contributor

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.

This comment has been minimized.

Copy link
@QueenyJin

QueenyJin Jul 23, 2016

Contributor

the socket file for connection

+ default: ""
+ example: "/tmp/tidb.sock"

This comment has been minimized.

Copy link
@QueenyJin

QueenyJin Jul 23, 2016

Contributor

You can use the "/tmp/tidb.sock" file.


### --perfschema
+ Enable(1) or disable(0) performance schema.

This comment has been minimized.

Copy link
@QueenyJin

QueenyJin Jul 23, 2016

Contributor

the performance schema

+ default: "0"
+ If set this to 1, it will affect performance.

This comment has been minimized.

Copy link
@QueenyJin

QueenyJin Jul 23, 2016

Contributor

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

This comment has been minimized.

Copy link
@QueenyJin

QueenyJin Jul 23, 2016

Contributor

$TIDB_PPROF

+ Enable runtime profiling data via HTTP server. Address is at client URL + "/debug/pprof/"

This comment has been minimized.

Copy link
@QueenyJin

QueenyJin Jul 23, 2016

Contributor

++ an environment variable that is used to enable or disable the runtime profiling data via the HTTP server. The address is in the following format: client URL + "/debug/pprof/". (Please also give an example.)

This comment has been minimized.

Copy link
@QueenyJin

QueenyJin Jul 23, 2016

Contributor

++ default: "0"

This comment has been minimized.

Copy link
@shenli

shenli Jul 23, 2016

Author Member

default is empty, not 0

+ If set $TIDB_PPROF to 0, TiDB will disable pprof. Otherwise TiDB will enable pprof.

This comment has been minimized.

Copy link
@QueenyJin

QueenyJin Jul 23, 2016

Contributor

The value can be (1) or (0). (1) is to enable and (0) is to disable. If the value is set to be (0), TiDB will disable the runtime profiling data.

0 comments on commit b575b81

Please sign in to comment.