diff options
author | Allen Zhong | 2019-02-11 14:59:40 +0800 |
---|---|---|
committer | Allen Zhong | 2019-02-11 14:59:40 +0800 |
commit | 1a24197be619e6a6468705ffae64bcd028526a76 (patch) | |
tree | b5a6e07a993d0d728226c86cb3b84af9472aba2b | |
parent | 846ab3534ac86057e937078e5eb4b8f4b97b12ee (diff) | |
download | aur-1a24197be619e6a6468705ffae64bcd028526a76.tar.gz |
upgpkg: tidb-bin 2.1.3-1
* Use configs from tidb/tikv/tikv-pd packages
-rw-r--r-- | .SRCINFO | 43 | ||||
-rw-r--r-- | PKGBUILD | 59 | ||||
-rw-r--r-- | pd-sysusers.conf | 1 | ||||
-rw-r--r-- | pd-tmpfiles.conf | 1 | ||||
-rw-r--r-- | pd.service | 13 | ||||
-rw-r--r-- | pd.toml | 91 | ||||
-rw-r--r-- | tidb-sysusers.conf | 1 | ||||
-rw-r--r-- | tidb-tmpfiles.conf | 1 | ||||
-rw-r--r-- | tidb.service | 16 | ||||
-rw-r--r-- | tidb.sysusers | 1 | ||||
-rw-r--r-- | tidb.tmpfiles | 4 | ||||
-rw-r--r-- | tidb.toml | 241 | ||||
-rw-r--r-- | tikv-sysusers.conf | 1 | ||||
-rw-r--r-- | tikv-tmpfiles.conf | 1 | ||||
-rw-r--r-- | tikv.service | 16 | ||||
-rw-r--r-- | tikv.toml | 513 |
16 files changed, 977 insertions, 26 deletions
@@ -1,26 +1,51 @@ # Generated by mksrcinfo v8 -# Fri Dec 28 09:26:31 UTC 2018 +# Mon Feb 11 06:58:36 UTC 2019 pkgbase = tidb-bin pkgdesc = A distributed NewSQL database compatible with MySQL protocol - pkgver = 2.1.2 + pkgver = 2.1.3 pkgrel = 1 url = https://github.com/pingcap/tidb arch = x86_64 license = APACHE depends = gcc-libs conflicts = tidb-bin-nightly + conflicts = tidb + conflicts = tikv + conflicts = tikv-pd options = strip options = debug - source = https://download.pingcap.org/tidb-v2.1.2-linux-amd64.tar.gz - source = tidb.sysusers - source = tidb.tmpfiles - sha256sums = 80f8ce15ec2c95253c3db7c9903517b1eafbe81cc369ca9c1affaa829b4e7275 - sha256sums = 6fb6ae67a53c6cd054643542e76da6f16e000b029a98b34172972fcb505fc299 - sha256sums = 15f285782938b3ebbb8be60cc962a2cbf5ca349527c39d3a1138be1bf976feb9 + source = https://download.pingcap.org/tidb-v2.1.3-linux-amd64.tar.gz + source = pd.service + source = tidb.service + source = tikv.service + source = pd-sysusers.conf + source = pd-tmpfiles.conf + source = tidb-sysusers.conf + source = tidb-tmpfiles.conf + source = tikv-sysusers.conf + source = tikv-tmpfiles.conf + source = pd.toml + source = tidb.toml + source = tikv.toml + sha256sums = 95f6322f7a5724bde75a5f3d950602e0b0116768e52d9f49691c0fdc88f9b84d + sha256sums = b03d12f2f8d6eb2e9d654d6258ca39000225cdf1418840f7e35081631bc4d924 + sha256sums = 22318c19bb89ff5a0852df5186cc1496214cd49f2264192413a326d1e8c93dc9 + sha256sums = 870b8eaf83bc0d22b05b0f3a7890660e483cf77bb1d84bc50ad04fb23068cd8c + sha256sums = 5edd250ba9e70a4f8d27581ed658f0fbfeca58ca62429dec12bb5fffc0919b67 + sha256sums = 15633aaa2d7726375112a1b5af88105878f09c176a542cde6d0e5f0c4eee4495 + sha256sums = 2b147d80985e714d5f861baf76591104c07058b9b6fa573bf0676d675cf8fc20 + sha256sums = 30ce83fbec8f102c30e438282bb5b18c026d08480f2386d68f1116c12481bf66 + sha256sums = 744b252e29099b0099dc41e30bc3badd33b3d661c7126af8044faa4fc2df8927 + sha256sums = 935291bac6a216c6f880df9bfaec8900266413bb202ac483e79f291e1f28e9f1 + sha256sums = 11bc441dfd0327c56218f214a9869da20ccdf7e5265c2f5ffca45089ba8094db + sha256sums = a34a8ca1f13c965cc0e872fc671f377b64a80cc11225cd6359bf7415b4c86a06 + sha256sums = 248790d756d15322ed7af13f30525744c472190ac68a26b486c5eed24427abdf pkgname = tidb-bin install = tidb.install - provides = tidb=2.1.2 + provides = tidb=2.1.3 + provides = tikv=2.1.3 + provides = tikv-pd=2.1.3 pkgname = tidb-bin-utils optdepends = go-tools: provides goyacc @@ -1,8 +1,9 @@ # Maintainer: Allen Zhong <moeallenz@gmail.com> # Maintainer: Liqueur Librazy <im@librazy.org> # Contributor: Jian Zeng <anonymousknight96@gmail.com> +# Contributor: Xuanwo <xuanwo@archlinuxcn.org> pkgbase=tidb-bin -_basever=2.1.2 +_basever=2.1.3 #_relver=-prega #pkgver=$_basever.$_relver pkgver=$_basever @@ -13,25 +14,59 @@ arch=('x86_64') url="https://github.com/pingcap/tidb" license=('APACHE') depends=('gcc-libs') -conflicts=('tidb-bin-nightly') +conflicts=('tidb-bin-nightly' 'tidb' 'tikv' 'tikv-pd') options=('strip' 'debug') source=("https://download.pingcap.org/tidb-v$_basever$_relver-linux-amd64.tar.gz" - "tidb.sysusers" - "tidb.tmpfiles" - ) -sha256sums=('80f8ce15ec2c95253c3db7c9903517b1eafbe81cc369ca9c1affaa829b4e7275' - '6fb6ae67a53c6cd054643542e76da6f16e000b029a98b34172972fcb505fc299' - '15f285782938b3ebbb8be60cc962a2cbf5ca349527c39d3a1138be1bf976feb9') + pd.service + tidb.service + tikv.service + pd-sysusers.conf + pd-tmpfiles.conf + tidb-sysusers.conf + tidb-tmpfiles.conf + tikv-sysusers.conf + tikv-tmpfiles.conf + pd.toml + tidb.toml + tikv.toml) +sha256sums=('95f6322f7a5724bde75a5f3d950602e0b0116768e52d9f49691c0fdc88f9b84d' + 'b03d12f2f8d6eb2e9d654d6258ca39000225cdf1418840f7e35081631bc4d924' + '22318c19bb89ff5a0852df5186cc1496214cd49f2264192413a326d1e8c93dc9' + '870b8eaf83bc0d22b05b0f3a7890660e483cf77bb1d84bc50ad04fb23068cd8c' + '5edd250ba9e70a4f8d27581ed658f0fbfeca58ca62429dec12bb5fffc0919b67' + '15633aaa2d7726375112a1b5af88105878f09c176a542cde6d0e5f0c4eee4495' + '2b147d80985e714d5f861baf76591104c07058b9b6fa573bf0676d675cf8fc20' + '30ce83fbec8f102c30e438282bb5b18c026d08480f2386d68f1116c12481bf66' + '744b252e29099b0099dc41e30bc3badd33b3d661c7126af8044faa4fc2df8927' + '935291bac6a216c6f880df9bfaec8900266413bb202ac483e79f291e1f28e9f1' + '11bc441dfd0327c56218f214a9869da20ccdf7e5265c2f5ffca45089ba8094db' + 'a34a8ca1f13c965cc0e872fc671f377b64a80cc11225cd6359bf7415b4c86a06' + '248790d756d15322ed7af13f30525744c472190ac68a26b486c5eed24427abdf') _package() { - provides=("tidb=$_basever") + provides=("tidb=$_basever" "tikv=$_basever" "tikv-pd=$_basever") install='tidb.install' + cd "$srcdir" - install -Dm644 tidb.sysusers "$pkgdir"/usr/lib/sysusers.d/tidb.conf - install -Dm644 tidb.tmpfiles "$pkgdir"/usr/lib/tmpfiles.d/tidb.conf + + install -Dm644 pd-sysusers.conf "$pkgdir"/usr/lib/sysusers.d/pd.conf + install -Dm644 pd-tmpfiles.conf "$pkgdir"/usr/lib/tmpfiles.d/pd.conf + install -Dm644 tidb-sysusers.conf "$pkgdir"/usr/lib/sysusers.d/tidb.conf + install -Dm644 tidb-tmpfiles.conf "$pkgdir"/usr/lib/tmpfiles.d/tidb.conf + install -Dm644 tikv-sysusers.conf "$pkgdir"/usr/lib/sysusers.d/tikv.conf + install -Dm644 tikv-tmpfiles.conf "$pkgdir"/usr/lib/tmpfiles.d/tikv.conf + + install -Dm644 pd.service "$pkgdir/usr/lib/systemd/system/pd.service" + install -Dm644 tidb.service "$pkgdir/usr/lib/systemd/system/tidb.service" + install -Dm644 tikv.service "$pkgdir/usr/lib/systemd/system/tikv.service" + + install -Dm644 pd.toml "$pkgdir/etc/pd/pd.toml" + install -Dm644 tidb.toml "$pkgdir/etc/tidb/tidb.toml" + install -Dm644 tikv.toml "$pkgdir/etc/tikv/tikv.toml" cd "tidb-v$_basever$_relver-linux-amd64/bin" - install -dm755 "$pkgdir"/{etc/tidb,usr/bin} + install -dm755 "$pkgdir"/etc/{pd,tidb,tikv} + install -dm755 "$pkgdir"/usr/bin install -Dm755 *-server "$pkgdir"/usr/bin } diff --git a/pd-sysusers.conf b/pd-sysusers.conf new file mode 100644 index 000000000000..8683495c47d7 --- /dev/null +++ b/pd-sysusers.conf @@ -0,0 +1 @@ +u pd - "Placement driver for TiKV" / diff --git a/pd-tmpfiles.conf b/pd-tmpfiles.conf new file mode 100644 index 000000000000..c66e9ef6746c --- /dev/null +++ b/pd-tmpfiles.conf @@ -0,0 +1 @@ +d /var/lib/pd 0755 pd pd - diff --git a/pd.service b/pd.service new file mode 100644 index 000000000000..e6acde5a5394 --- /dev/null +++ b/pd.service @@ -0,0 +1,13 @@ +[Unit] +Description=Placement driver for TiKV +Documentation=https://github.com/pingcap/pd +After=network.target + +[Service] +User=pd +ExecStart=/usr/bin/pd-server --config=/etc/pd/pd.toml +ExecReload=/bin/kill -SIGUSR1 $MAINPID +Restart=on-failure + +[Install] +WantedBy=multi-user.target diff --git a/pd.toml b/pd.toml new file mode 100644 index 000000000000..808f40ede708 --- /dev/null +++ b/pd.toml @@ -0,0 +1,91 @@ +# PD Configuration. + +name = "pd" +data-dir = "/var/lib/pd" + +client-urls = "http://127.0.0.1:2379" +# if not set, use ${client-urls} +advertise-client-urls = "" + +peer-urls = "http://127.0.0.1:2380" +# if not set, use ${peer-urls} +advertise-peer-urls = "" + +initial-cluster = "pd=http://127.0.0.1:2380" +initial-cluster-state = "new" + +lease = 3 +tso-save-interval = "3s" + +namespace-classifier = "table" + +enable-prevote = true + +[security] +# Path of file that contains list of trusted SSL CAs. if set, following four settings shouldn't be empty +cacert-path = "" +# Path of file that contains X509 certificate in PEM format. +cert-path = "" +# Path of file that contains X509 key in PEM format. +key-path = "" + +[log] +level = "info" + +# log format, one of json, text, console +#format = "text" + +# disable automatic timestamps in output +#disable-timestamp = false + +# file logging +[log.file] +#filename = "" +# max log file size in MB +#max-size = 300 +# max log file keep days +#max-days = 28 +# maximum number of old log files to retain +#max-backups = 7 +# rotate log by day +#log-rotate = true + +[metric] +# prometheus client push interval, set "0s" to disable prometheus. +interval = "15s" +# prometheus pushgateway address, leaves it empty will disable prometheus. +address = "" + +[schedule] +max-merge-region-size = 0 +max-merge-region-keys = 0 +split-merge-interval = "1h" +max-snapshot-count = 3 +max-pending-peer-count = 16 +max-store-down-time = "30m" +leader-schedule-limit = 4 +region-schedule-limit = 4 +replica-schedule-limit = 8 +merge-schedule-limit = 8 +tolerant-size-ratio = 5.0 + +# customized schedulers, the format is as below +# if empty, it will use balance-leader, balance-region, hot-region as default +# [[schedule.schedulers]] +# type = "evict-leader" +# args = ["1"] + +[replication] +# The number of replicas for each region. +max-replicas = 3 +# The label keys specified the location of a store. +# The placement priorities is implied by the order of label keys. +# For example, ["zone", "rack"] means that we should place replicas to +# different zones first, then to different racks if we don't have enough zones. +location-labels = [] + +[label-property] +# Do not assign region leaders to stores that have these tags. +# [[label-property.reject-leader]] +# key = "zone" +# value = "cn1 diff --git a/tidb-sysusers.conf b/tidb-sysusers.conf new file mode 100644 index 000000000000..6e9bd7eaaa2f --- /dev/null +++ b/tidb-sysusers.conf @@ -0,0 +1 @@ +u tidb - "TiDB is a distributed HTAP database compatible with the MySQL protocol" / diff --git a/tidb-tmpfiles.conf b/tidb-tmpfiles.conf new file mode 100644 index 000000000000..95753f6fc615 --- /dev/null +++ b/tidb-tmpfiles.conf @@ -0,0 +1 @@ +d /var/lib/tidb 0755 tidb tidb - diff --git a/tidb.service b/tidb.service new file mode 100644 index 000000000000..ec8fba4ec4f3 --- /dev/null +++ b/tidb.service @@ -0,0 +1,16 @@ +[Unit] +Description=TiDB is a distributed HTAP database compatible with the MySQL protocol +Documentation=https://github.com/pingcap/tidb +Requires=tikv.service +After=tikv.service network.target + +[Service] +User=tidb +WorkingDirectory=/var/lib/tidb +LimitNOFILE=1048576 +ExecStart=/usr/bin/tidb-server --config=/etc/tidb/tidb.toml +ExecReload=/bin/kill -SIGUSR1 $MAINPID +Restart=on-failure + +[Install] +WantedBy=multi-user.target diff --git a/tidb.sysusers b/tidb.sysusers deleted file mode 100644 index 22f3fd22083b..000000000000 --- a/tidb.sysusers +++ /dev/null @@ -1 +0,0 @@ -u tidb - - /var/lib/tidb diff --git a/tidb.tmpfiles b/tidb.tmpfiles deleted file mode 100644 index 312bcc1a6602..000000000000 --- a/tidb.tmpfiles +++ /dev/null @@ -1,4 +0,0 @@ -d /var/lib/tidb 0755 tidb tidb -d /etc/tidb 0755 tidb tidb -x /var/lib/tidb/* -x /etc/tidb/* diff --git a/tidb.toml b/tidb.toml new file mode 100644 index 000000000000..1e02e45c5451 --- /dev/null +++ b/tidb.toml @@ -0,0 +1,241 @@ +# TiDB Configuration. + +# TiDB server host. +host = "0.0.0.0" + +# TiDB server port. +port = 4000 + +# Registered store name, [tikv, mocktikv] +store = "tikv" + +# TiDB storage path. +path = "127.0.0.1:2379" + +# The socket file to use for connection. +socket = "" + +# Run ddl worker on this tidb-server. +run-ddl = true + +# Schema lease duration, very dangerous to change only if you know what you do. +lease = "45s" + +# When create table, split a separated region for it. It is recommended to +# turn off this option if there will be a large number of tables created. +split-table = true + +# The limit of concurrent executed sessions. +token-limit = 1000 + +# Only print a log when out of memory quota. +# Valid options: ["log", "cancel"] +oom-action = "log" + +# Set the memory quota for a query in bytes. Default: 32GB +mem-quota-query = 34359738368 + +# Enable coprocessor streaming. +enable-streaming = false + +# Set system variable 'lower_case_table_names' +lower-case-table-names = 2 + +[log] +# Log level: debug, info, warn, error, fatal. +level = "info" + +# Log format, one of json, text, console. +format = "text" + +# Disable automatic timestamp in output +disable-timestamp = false + +# Stores slow query log into separated files. +slow-query-file = "" + +# Queries with execution time greater than this value will be logged. (Milliseconds) +slow-threshold = 300 + +# Queries with internal result greater than this value will be logged. +expensive-threshold = 10000 + +# Maximum query length recorded in log. +query-log-max-len = 2048 + +# File logging. +[log.file] +# Log file name. +filename = "" + +# Max log file size in MB (upper limit to 4096MB). +max-size = 300 + +# Max log file keep days. No clean up by default. +max-days = 0 + +# Maximum number of old log files to retain. No clean up by default. +max-backups = 0 + +# Rotate log by day +log-rotate = true + +[security] +# Path of file that contains list of trusted SSL CAs for connection with mysql client. +ssl-ca = "" + +# Path of file that contains X509 certificate in PEM format for connection with mysql client. +ssl-cert = "" + +# Path of file that contains X509 key in PEM format for connection with mysql client. +ssl-key = "" + +# Path of file that contains list of trusted SSL CAs for connection with cluster components. +cluster-ssl-ca = "" + +# Path of file that contains X509 certificate in PEM format for connection with cluster components. +cluster-ssl-cert = "" + +# Path of file that contains X509 key in PEM format for connection with cluster components. +cluster-ssl-key = "" + +[status] +# If enable status report HTTP service. +report-status = true + +# TiDB status port. +status-port = 10080 + +# Prometheus pushgateway address, leaves it empty will disable prometheus push. +metrics-addr = "" + +# Prometheus client push interval in second, set \"0\" to disable prometheus push. +metrics-interval = 15 + +[performance] +# Max CPUs to use, 0 use number of CPUs in the machine. +max-procs = 0 +# StmtCountLimit limits the max count of statement inside a transaction. +stmt-count-limit = 5000 + +# Set keep alive option for tcp connection. +tcp-keep-alive = true + +# The maximum number of retries when commit a transaction. +retry-limit = 10 + +# Whether support cartesian product. +cross-join = true + +# Stats lease duration, which influences the time of analyze and stats load. +stats-lease = "3s" + +# Run auto analyze worker on this tidb-server. +run-auto-analyze = true + +# Probability to use the query feedback to update stats, 0 or 1 for always false/true. +feedback-probability = 0.0 + +# The max number of query feedback that cache in memory. +query-feedback-limit = 1024 + +# Pseudo stats will be used if the ratio between the modify count and +# row count in statistics of a table is greater than it. +pseudo-estimate-ratio = 0.7 + +[proxy-protocol] +# PROXY protocol acceptable client networks. +# Empty string means disable PROXY protocol, * means all networks. +networks = "" + +# PROXY protocol header read timeout, unit is second +header-timeout = 5 + +[plan-cache] +enabled = false +capacity = 2560 +shards = 256 + +[prepared-plan-cache] +enabled = false +capacity = 100 + +[opentracing] +# Enable opentracing. +enable = false + +# Whether to enable the rpc metrics. +rpc-metrics = false + +[opentracing.sampler] +# Type specifies the type of the sampler: const, probabilistic, rateLimiting, or remote +type = "const" + +# Param is a value passed to the sampler. +# Valid values for Param field are: +# - for "const" sampler, 0 or 1 for always false/true respectively +# - for "probabilistic" sampler, a probability between 0 and 1 +# - for "rateLimiting" sampler, the number of spans per second +# - for "remote" sampler, param is the same as for "probabilistic" +# and indicates the initial sampling rate before the actual one +# is received from the mothership +param = 1.0 + +# SamplingServerURL is the address of jaeger-agent's HTTP sampling server +sampling-server-url = "" + +# MaxOperations is the maximum number of operations that the sampler +# will keep track of. If an operation is not tracked, a default probabilistic +# sampler will be used rather than the per operation specific sampler. +max-operations = 0 + +# SamplingRefreshInterval controls how often the remotely controlled sampler will poll +# jaeger-agent for the appropriate sampling strategy. +sampling-refresh-interval = 0 + +[opentracing.reporter] +# QueueSize controls how many spans the reporter can keep in memory before it starts dropping +# new spans. The queue is continuously drained by a background go-routine, as fast as spans +# can be sent out of process. +queue-size = 0 + +# BufferFlushInterval controls how often the buffer is force-flushed, even if it's not full. +# It is generally not useful, as it only matters for very low traffic services. +buffer-flush-interval = 0 + +# LogSpans, when true, enables LoggingReporter that runs in parallel with the main reporter +# and logs all submitted spans. Main Configuration.Logger must be initialized in the code +# for this option to have any effect. +log-spans = false + +# LocalAgentHostPort instructs reporter to send spans to jaeger-agent at this address +local-agent-host-port = "" + +[tikv-client] +# Max gRPC connections that will be established with each tikv-server. +grpc-connection-count = 16 + +# After a duration of this time in seconds if the client doesn't see any activity it pings +# the server to see if the transport is still alive. +grpc-keepalive-time = 10 + +# After having pinged for keepalive check, the client waits for a duration of Timeout in seconds +# and if no activity is seen even after that the connection is closed. +grpc-keepalive-timeout = 3 + +# max time for commit command, must be twice bigger than raft election timeout. +commit-timeout = "41s" + +[binlog] +# enable to write binlog. +enable = false + +# WriteTimeout specifies how long it will wait for writing binlog to pump. +write-timeout = "15s" + +# If IgnoreError is true, when writting binlog meets error, TiDB would stop writting binlog, +# but still provide service. +ignore-error = false + +# use socket file to write binlog, for compatible with kafka version tidb-binlog. +binlog-socket = "" diff --git a/tikv-sysusers.conf b/tikv-sysusers.conf new file mode 100644 index 000000000000..5ea267a2bbf5 --- /dev/null +++ b/tikv-sysusers.conf @@ -0,0 +1 @@ +u tikv - "Distributed transactional key-value database, originally created to complement TiDB" / diff --git a/tikv-tmpfiles.conf b/tikv-tmpfiles.conf new file mode 100644 index 000000000000..1d62f4fe901b --- /dev/null +++ b/tikv-tmpfiles.conf @@ -0,0 +1 @@ +d /var/lib/tikv 0755 tikv tikv - diff --git a/tikv.service b/tikv.service new file mode 100644 index 000000000000..21b7b8230499 --- /dev/null +++ b/tikv.service @@ -0,0 +1,16 @@ +[Unit] +Description=Distributed transactional key-value database, originally created to complement TiDB +Documentation=https://github.com/tikv/tikv +Requires=pd.service +After=pd.service network.target + +[Service] +User=tikv +WorkingDirectory=/var/lib/tikv +LimitNOFILE=1048576 +ExecStart=/usr/bin/tikv-server --config=/etc/tikv/tikv.toml +ExecReload=/bin/kill -SIGUSR1 $MAINPID +Restart=on-failure + +[Install] +WantedBy=multi-user.target diff --git a/tikv.toml b/tikv.toml new file mode 100644 index 000000000000..f685c4494d89 --- /dev/null +++ b/tikv.toml @@ -0,0 +1,513 @@ +# TiKV config template +# Human-readable big numbers: +# File size(based on byte): KB, MB, GB, TB, PB +# e.g.: 1_048_576 = "1MB" +# Time(based on ms): ms, s, m, h +# e.g.: 78_000 = "1.3m" + +# log level: trace, debug, info, warning, error, critical. +# Note that `debug` and `trace` are only available in development builds. +# log-level = "info" + +# file to store log, write to stderr if it's empty. +# log-file = "" + +# timespan between rotating the log files. +# Once this timespan passes the existing log file will have a timestamp appended to its name, +# and a new file will be created. +# log-rotation-timespan = "24h" + +[readpool.storage] +# size of thread pool for high-priority operations +# high-concurrency = 4 +# size of thread pool for normal-priority operations +# normal-concurrency = 4 +# size of thread pool for low-priority operations +# low-concurrency = 4 +# max running high-priority operations of each worker, reject if exceed +# max-tasks-per-worker-high = 2000 +# max running normal-priority operations of each worker, reject if exceed +# max-tasks-per-worker-normal = 2000 +# max running low-priority operations of each worker, reject if exceed +# max-tasks-per-worker-low = 2000 +# size of stack size for each thread pool +# stack-size = "10MB" + +[readpool.coprocessor] +# Notice: if CPU_NUM > 8, default thread pool size for coprocessors +# will be set to CPU_NUM * 0.8. + +# high-concurrency = 8 +# normal-concurrency = 8 +# low-concurrency = 8 +# max-tasks-per-worker-high = 2000 +# max-tasks-per-worker-normal = 2000 +# max-tasks-per-worker-low = 2000 +# stack-size = "10MB" + +[server] +# set listening address. +# addr = "127.0.0.1:20160" +# set advertise listening address for client communication, if not set, use addr instead. +# advertise-addr = "" + +# compression type for grpc channel, available values are none, deflate and gzip. +# grpc-compression-type = "none" +# size of thread pool for grpc server. +# grpc-concurrency = 4 +# The number of max concurrent streams/requests on a client connection. +# grpc-concurrent-stream = 1024 +# The number of connections with each tikv server to send raft messages. +# grpc-raft-conn-num = 10 +# Amount to read ahead on individual grpc streams. +# grpc-stream-initial-window-size = "2MB" +# Time to wait before sending out a ping to check if server is still alive. +# This is only for communications between tikv instances. +# grpc-keepalive-time = "10s" +# Time to wait before closing the connection without receiving keepalive ping +# ack. +# grpc-keepalive-timeout = "3s" + +# How many snapshots can be sent concurrently. +# concurrent-send-snap-limit = 32 +# How many snapshots can be recv concurrently. +# concurrent-recv-snap-limit = 32 + +# max recursion level allowed when decoding dag expression +# end-point-recursion-limit = 1000 + +# max time to handle coprocessor request before timeout +# end-point-request-max-handle-duration = "60s" + +# the max bytes that snapshot can be written to disk in one second, +# should be set based on your disk performance +# snap-max-write-bytes-per-sec = "100MB" + +# set attributes about this server, e.g. { zone = "us-west-1", disk = "ssd" }. +# labels = {} + +[storage] +# set the path to rocksdb directory. +data-dir = "/var/lib/tikv/store" + +# notify capacity of scheduler's channel +# scheduler-notify-capacity = 10240 + +# the number of slots in scheduler latches, concurrency control for write. +# scheduler-concurrency = 2048000 + +# scheduler's worker pool size, should increase it in heavy write cases, +# also should less than total cpu cores. +# scheduler-worker-pool-size = 4 + +# When the pending write bytes exceeds this threshold, +# the "scheduler too busy" error is displayed. +# scheduler-pending-write-threshold = "100MB" + +[pd] +# pd endpoints +endpoints = ["127.0.0.1:2379"] + +[metric] +# the Prometheus client push interval. Setting the value to 0s stops Prometheus client from pushing. +# interval = "15s" +# the Prometheus pushgateway address. Leaving it empty stops Prometheus client from pushing. +# address = "" +# the Prometheus client push job name. Note: A node id will automatically append, e.g., "tikv_1". +# job = "tikv" + +[raftstore] +# true (default value) for high reliability, this can prevent data loss when power failure. +# sync-log = true + +# minimizes disruption when a partitioned node rejoins the cluster by using a two phase election. +# prevote = true + +# set the path to raftdb directory, default value is data-dir/raft +# raftdb-path = "" + +# set store capacity, if no set, use disk capacity. +# capacity = 0 + +# notify capacity, 40960 is suitable for about 7000 regions. +# notify-capacity = 40960 + +# maximum number of messages can be processed in one tick. +# messages-per-tick = 4096 + +# Region heartbeat tick interval for reporting to pd. +# pd-heartbeat-tick-interval = "60s" +# Store heartbeat tick interval for reporting to pd. +# pd-store-heartbeat-tick-interval = "10s" + +# When region size changes exceeds region-split-check-diff, we should check +# whether the region should be split or not. +# region-split-check-diff = "6MB" + +# Interval to check region whether need to be split or not. +# split-region-check-tick-interval = "10s" + +# When raft entry exceed the max size, reject to propose the entry. +# raft-entry-max-size = "8MB" + +# Interval to gc unnecessary raft log. +# raft-log-gc-tick-interval = "10s" +# A threshold to gc stale raft log, must >= 1. +# raft-log-gc-threshold = 50 +# When entry count exceed this value, gc will be forced trigger. +# raft-log-gc-count-limit = 72000 +# When the approximate size of raft log entries exceed this value, gc will be forced trigger. +# It's recommanded to set it to 3/4 of region-split-size. +# raft-log-gc-size-limit = "72MB" + +# When a peer hasn't been active for max-peer-down-duration, +# we will consider this peer to be down and report it to pd. +# max-peer-down-duration = "5m" + +# Interval to check whether start manual compaction for a region, +# region-compact-check-interval = "5m" + +# Number of regions for each time to check. +# region-compact-check-step = 100 + +# The minimum number of delete tombstones to trigger manual compaction. +# region-compact-min-tombstones = 10000 + +# The minimum percentage of delete tombstones to trigger manual compaction. +# Should between 1 and 100. Manual compaction only triggered when the number +# of delete tombstones exceeds region-compact-min-tombstones and the percentage +# of delete tombstones exceeds region-compact-tombstones-percent. +# region-compact-tombstones-percent = 30 + +# Interval to check whether should start a manual compaction for lock column family, +# if written bytes reach lock-cf-compact-threshold for lock column family, will fire +# a manual compaction for lock column family. +# lock-cf-compact-interval = "10m" + +# lock-cf-compact-bytes-threshold = "256MB" + +# Interval (s) to check region whether the data are consistent. +# consistency-check-interval = 0 + +# Use delete range to drop a large number of continuous keys. +# use-delete-range = false + +# delay time before deleting a stale peer +# clean-stale-peer-delay = "10m" + +# Interval to cleanup import sst files. +# cleanup-import-sst-interval = "10m" + +[coprocessor] +# When it is true, it will try to split a region with table prefix if +# that region crosses tables. It is recommended to turn off this option +# if there will be a large number of tables created. +# split-region-on-table = true +# When the region's size exceeds region-max-size, we will split the region +# into two which the left region's size will be region-split-size or a little +# bit smaller. +# region-max-size = "144MB" +# region-split-size = "96MB" +# When the region's keys exceeds region-max-keys, we will split the region +# into two which the left region's keys will be region-split-keys or a little +# bit smaller. +# region-max-keys = 1440000 +# region-split-keys = 960000 + +[rocksdb] +# Maximum number of concurrent background jobs (compactions and flushes) +# max-background-jobs = 8 + +# This value represents the maximum number of threads that will concurrently perform a +# compaction job by breaking it into multiple, smaller ones that are run simultaneously. +# Default: 1 (i.e. no subcompactions) +# max-sub-compactions = 1 + +# Number of open files that can be used by the DB. You may need to +# increase this if your database has a large working set. Value -1 means +# files opened are always kept open. You can estimate number of files based +# on target_file_size_base and target_file_size_multiplier for level-based +# compaction. +# If max-open-files = -1, RocksDB will prefetch index and filter blocks into +# block cache at startup, so if your database has a large working set, it will +# take several minutes to open the db. +# max-open-files = 40960 + +# Max size of rocksdb's MANIFEST file. +# For detailed explanation please refer to https://github.com/facebook/rocksdb/wiki/MANIFEST +# max-manifest-file-size = "20MB" + +# If true, the database will be created if it is missing. +# create-if-missing = true + +# rocksdb wal recovery mode +# 0 : TolerateCorruptedTailRecords, tolerate incomplete record in trailing data on all logs; +# 1 : AbsoluteConsistency, We don't expect to find any corruption in the WAL; +# 2 : PointInTimeRecovery, Recover to point-in-time consistency; +# 3 : SkipAnyCorruptedRecords, Recovery after a disaster; +# wal-recovery-mode = 2 + +# rocksdb write-ahead logs dir path +# This specifies the absolute dir path for write-ahead logs (WAL). +# If it is empty, the log files will be in the same dir as data. +# When you set the path to rocksdb directory in memory like in /dev/shm, you may want to set +# wal-dir to a directory on a persistent storage. +# See https://github.com/facebook/rocksdb/wiki/How-to-persist-in-memory-RocksDB-database +# wal-dir = "/tmp/tikv/store" + +# The following two fields affect how archived write-ahead logs will be deleted. +# 1. If both set to 0, logs will be deleted asap and will not get into the archive. +# 2. If wal-ttl-seconds is 0 and wal-size-limit is not 0, +# WAL files will be checked every 10 min and if total size is greater +# then wal-size-limit, they will be deleted starting with the +# earliest until size_limit is met. All empty files will be deleted. +# 3. If wal-ttl-seconds is not 0 and wal-size-limit is 0, then +# WAL files will be checked every wal-ttl-seconds / 2 and those that +# are older than wal-ttl-seconds will be deleted. +# 4. If both are not 0, WAL files will be checked every 10 min and both +# checks will be performed with ttl being first. +# When you set the path to rocksdb directory in memory like in /dev/shm, you may want to set +# wal-ttl-seconds to a value greater than 0 (like 86400) and backup your db on a regular basis. +# See https://github.com/facebook/rocksdb/wiki/How-to-persist-in-memory-RocksDB-database +# wal-ttl-seconds = 0 +# wal-size-limit = 0 + +# rocksdb max total wal size +# max-total-wal-size = "4GB" + +# Rocksdb Statistics provides cumulative stats over time. +# Turn statistics on will introduce about 5%-10% overhead for RocksDB, +# but it is worthy to know the internal status of RocksDB. +# enable-statistics = true + +# Dump statistics periodically in information logs. +# Same as rocksdb's default value (10 min). +# stats-dump-period = "10m" + +# Due to Rocksdb FAQ: https://github.com/facebook/rocksdb/wiki/RocksDB-FAQ, +# If you want to use rocksdb on multi disks or spinning disks, you should set value at +# least 2MB; +# compaction-readahead-size = 0 + +# This is the maximum buffer size that is used by WritableFileWrite +# writable-file-max-buffer-size = "1MB" + +# Use O_DIRECT for both reads and writes in background flush and compactions +# use-direct-io-for-flush-and-compaction = false + +# Limit the disk IO of compaction and flush. Compaction and flush can cause +# terrible spikes if they exceed a certain threshold. Consider setting this to +# 50% ~ 80% of the disk throughput for a more stable result. However, in heavy +# write workload, limiting compaction and flush speed can cause write stalls too. +# rate-bytes-per-sec = 0 + +# Enable or disable the pipelined write +# enable-pipelined-write = true + +# Allows OS to incrementally sync files to disk while they are being +# written, asynchronously, in the background. +# bytes-per-sync = "1MB" + +# Allows OS to incrementally sync WAL to disk while it is being written. +# wal-bytes-per-sync = "512KB" + +# Specify the maximal size of the Rocksdb info log file. If the log file +# is larger than `max_log_file_size`, a new info log file will be created. +# If max_log_file_size == 0, all logs will be written to one log file. +# info-log-max-size = "1GB" + +# Time for the Rocksdb info log file to roll (in seconds). +# If specified with non-zero value, log file will be rolled +# if it has been active longer than `log_file_time_to_roll`. +# 0 means disabled. +# info-log-roll-time = "0" + +# Maximal Rocksdb info log files to be kept. +# info-log-keep-log-file-num = 10 + +# This specifies the Rocksdb info LOG dir. +# If it is empty, the log files will be in the same dir as data. +# If it is non empty, the log files will be in the specified dir, +# and the db data dir's absolute path will be used as the log file +# name's prefix. +# info-log-dir = "" + +# Column Family default used to store actual data of the database. +[rocksdb.defaultcf] +# compression method (if any) is used to compress a block. +# no: kNoCompression +# snappy: kSnappyCompression +# zlib: kZlibCompression +# bzip2: kBZip2Compression +# lz4: kLZ4Compression +# lz4hc: kLZ4HCCompression +# zstd: kZSTD + +# per level compression +# compression-per-level = ["no", "no", "lz4", "lz4", "lz4", "zstd", "zstd"] + +# Approximate size of user data packed per block. Note that the +# block size specified here corresponds to uncompressed data. +# block-size = "64KB" + +# If you're doing point lookups you definitely want to turn bloom filters on, We use +# bloom filters to avoid unnecessary disk reads. Default bits_per_key is 10, which +# yields ~1% false positive rate. Larger bits_per_key values will reduce false positive +# rate, but increase memory usage and space amplification. +# bloom-filter-bits-per-key = 10 + +# false means one sst file one bloom filter, true means evry block has a corresponding bloom filter +# block-based-bloom-filter = false + +# level0-file-num-compaction-trigger = 4 + +# Soft limit on number of level-0 files. We start slowing down writes at this point. +# level0-slowdown-writes-trigger = 20 + +# Maximum number of level-0 files. We stop writes at this point. +# level0-stop-writes-trigger = 36 + +# Amount of data to build up in memory (backed by an unsorted log +# on disk) before converting to a sorted on-disk file. +# write-buffer-size = "128MB" + +# The maximum number of write buffers that are built up in memory. +# max-write-buffer-number = 5 + +# The minimum number of write buffers that will be merged together +# before writing to storage. +# min-write-buffer-number-to-merge = 1 + +# Control maximum total data size for base level (level 1). +# max-bytes-for-level-base = "512MB" + +# Target file size for compaction. +# target-file-size-base = "8MB" + +# Max bytes for compaction.max_compaction_bytes +# max-compaction-bytes = "2GB" + +# There are four different algorithms to pick files to compact. +# 0 : ByCompensatedSize +# 1 : OldestLargestSeqFirst +# 2 : OldestSmallestSeqFirst +# 3 : MinOverlappingRatio +# compaction-pri = 3 + +# block-cache used to cache uncompressed blocks, big block-cache can speed up read. +# in normal cases should tune to 30%-50% system's total memory. +# block-cache-size = "1GB" + +# Indicating if we'd put index/filter blocks to the block cache. +# If not specified, each "table reader" object will pre-load index/filter block +# during table initialization. +# cache-index-and-filter-blocks = true + +# Pin level0 filter and index blocks in cache. +# pin-l0-filter-and-index-blocks = true + +# Enable read amplication statistics. +# value => memory usage (percentage of loaded blocks memory) +# 1 => 12.50 % +# 2 => 06.25 % +# 4 => 03.12 % +# 8 => 01.56 % +# 16 => 00.78 % +# read-amp-bytes-per-bit = 0 + +# Pick target size of each level dynamically. +# dynamic-level-bytes = true + +# Options for Column Family write +# Column Family write used to store commit informations in MVCC model +[rocksdb.writecf] +# compression-per-level = ["no", "no", "lz4", "lz4", "lz4", "zstd", "zstd"] +# block-size = "64KB" +# write-buffer-size = "128MB" +# max-write-buffer-number = 5 +# min-write-buffer-number-to-merge = 1 +# max-bytes-for-level-base = "512MB" +# target-file-size-base = "8MB" + +# in normal cases should tune to 10%-30% system's total memory. +# block-cache-size = "256MB" +# level0-file-num-compaction-trigger = 4 +# level0-slowdown-writes-trigger = 20 +# level0-stop-writes-trigger = 36 +# cache-index-and-filter-blocks = true +# pin-l0-filter-and-index-blocks = true +# compaction-pri = 3 +# read-amp-bytes-per-bit = 0 +# dynamic-level-bytes = true + +[rocksdb.lockcf] +# compression-per-level = ["no", "no", "no", "no", "no", "no", "no"] +# block-size = "16KB" +# write-buffer-size = "128MB" +# max-write-buffer-number = 5 +# min-write-buffer-number-to-merge = 1 +# max-bytes-for-level-base = "128MB" +# target-file-size-base = "8MB" +# block-cache-size = "256MB" +# level0-file-num-compaction-trigger = 1 +# level0-slowdown-writes-trigger = 20 +# level0-stop-writes-trigger = 36 +# cache-index-and-filter-blocks = true +# pin-l0-filter-and-index-blocks = true +# compaction-pri = 0 +# read-amp-bytes-per-bit = 0 +# dynamic-level-bytes = true + +[raftdb] +# max-sub-compactions = 1 +# max-open-files = 40960 +# max-manifest-file-size = "20MB" +# create-if-missing = true + +# enable-statistics = true +# stats-dump-period = "10m" + +# compaction-readahead-size = 0 +# writable-file-max-buffer-size = "1MB" +# use-direct-io-for-flush-and-compaction = false +# enable-pipelined-write = true +# allow-concurrent-memtable-write = false +# bytes-per-sync = "1MB" +# wal-bytes-per-sync = "512KB" + +# info-log-max-size = "1GB" +# info-log-roll-time = "0" +# info-log-keep-log-file-num = 10 +# info-log-dir = "" + +[raftdb.defaultcf] +# compression-per-level = ["no", "no", "lz4", "lz4", "lz4", "zstd", "zstd"] +# block-size = "64KB" +# write-buffer-size = "128MB" +# max-write-buffer-number = 5 +# min-write-buffer-number-to-merge = 1 +# max-bytes-for-level-base = "512MB" +# target-file-size-base = "8MB" + +# should tune to 256MB~2GB. +# block-cache-size = "256MB" +# level0-file-num-compaction-trigger = 4 +# level0-slowdown-writes-trigger = 20 +# level0-stop-writes-trigger = 36 +# cache-index-and-filter-blocks = true +# pin-l0-filter-and-index-blocks = true +# compaction-pri = 0 +# read-amp-bytes-per-bit = 0 +# dynamic-level-bytes = true + +[security] +# set the path for certificates. Empty string means disabling secure connectoins. +# ca-path = "" +# cert-path = "" +# key-path = "" + +[import] +# number of threads to handle RPC requests. +# num-threads = 8 +# stream channel window size, stream will be blocked on channel full. +# stream-channel-window = 128 |