Skip to content

Commit

Permalink
chart: add important parameters to tikv and tidb config (#786)
Browse files Browse the repository at this point in the history
  • Loading branch information
weekface authored Aug 22, 2019
1 parent d7c42e8 commit 77f040c
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 41 deletions.
1 change: 1 addition & 0 deletions charts/tidb-cluster/templates/scripts/_start_tikv.sh.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ fi
ARGS="--pd=${CLUSTER_NAME}-pd:2379 \
--advertise-addr=${POD_NAME}.${HEADLESS_SERVICE_NAME}.${NAMESPACE}.svc:20160 \
--addr=0.0.0.0:20160 \
--status-addr=0.0.0.0:20180 \
--data-dir=/var/lib/tikv \
--capacity=${CAPACITY} \
--config=/etc/tikv/tikv.toml
Expand Down
65 changes: 24 additions & 41 deletions charts/tidb-cluster/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -165,53 +165,32 @@ tikv:
# (choose the version matching your tikv) for detailed explanation of each parameter.
config: |
log-level = "info"
[server]
status-addr = "0.0.0.0:20180"
# Here are some parameters you may want to customize (Please configure in the above 'config' section):
# [readpool.storage]
# ## Size of the thread pool for high-priority operations.
# # high-concurrency = 4
# ## Size of the thread pool for normal-priority operations.
# # normal-concurrency = 4
# ## Size of the thread pool for low-priority operations.
# # low-concurrency = 4
# # Here are some parameters you MUST customize (Please configure in the above `tikv.config` section):
#
# [readpool.coprocessor]
# ## Most read requests from TiDB are sent to the coprocessor of TiKV. high/normal/low-concurrency is
# ## used to set the number of threads of the coprocessor.
# ## If there are many read requests, you can increase these config values (but keep it within the
# ## number of system CPU cores). For example, for a 32-core machine deployed with TiKV, you can even
# ## set these config to 30 in heavy read scenarios.
# ## If CPU_NUM > 8, the default thread pool size for coprocessors is set to CPU_NUM * 0.8.
# # high-concurrency = 8
# # normal-concurrency = 8
# # low-concurrency = 8
# [server]
# ## Size of the thread pool for the gRPC server.
# # grpc-concurrency = 4
# [storage]
# ## Scheduler's worker pool size, i.e. the number of write threads.
# ## It should be less than total CPU cores. When there are frequent write operations, set it to a
# ## higher value. More specifically, you can run `top -H -p tikv-pid` to check whether the threads
# ## named `sched-worker-pool` are busy.
# # scheduler-worker-pool-size = 4
#### Below parameters available in TiKV 2.x only
# # Normally these three parameters should be tuned to 80% of `tikv.resources.limits.cpu`, for example: 10000m -> 8
# high-concurrency = 8
# normal-concurrency = 8
# low-concurrency = 8
#
# # For TiKV v2.x:
# [rocksdb.defaultcf]
# ## block-cache used to cache uncompressed blocks, big block-cache can speed up read.
# ## in normal cases should tune to 30%-50% tikv.resources.limits.memory
# ## in normal cases should tune to 30%-50% `tikv.resources.limits.memory`
# # block-cache-size = "1GB"
#
# [rocksdb.writecf]
# ## in normal cases should tune to 10%-30% tikv.resources.limits.memory
# ## in normal cases should tune to 10%-30% `tikv.resources.limits.memory`
# # block-cache-size = "256MB"
#### Below parameters available in TiKV 3.x and above only
#
# # From TiKV v3.0.0 on, you do not need to configure
# # [rocksdb.defaultcf].block-cache-size and [rocksdb.writecf].block-cache-size.
# # Instead, configure [storage.block-cache] as below:
# [storage.block-cache]
# ## Size of the shared block cache. Normally it should be tuned to 30%-50% of container's total memory.
# # capacity = "1GB"
# [raftstore]
# ## true (default value) for high reliability, this can prevent data loss when power failure.
# # sync-log = true
# # apply-pool-size = 2
# # store-pool-size = 2
# shared = true
#
# # Normally it should be tuned to 30%-50% of `tikv.resources.limits.memory`, for example: 32Gi -> 16GB
# capacity = "1GB"

replicas: 3
image: pingcap/tikv:v3.0.1
Expand Down Expand Up @@ -266,7 +245,11 @@ tidb:
config: |
[log]
level = "info"
# # Here are some parameters you MUST customize (Please configure in the above 'tidb.config' section):
# [performance]
# # Normally it should be tuned to `tidb.resources.limits.cpu`, for example: 16000m -> 16
# max-procs = 0

replicas: 2
# The secret name of root password, you can create secret with following command:
# kubectl create secret generic tidb-secret --from-literal=root=<root-password> --namespace=<namespace>
Expand Down

0 comments on commit 77f040c

Please sign in to comment.