Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chart: add important parameters to tikv and tidb config #786

Merged
merged 3 commits into from
Aug 22, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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=${HOSTNAME}.${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
63 changes: 16 additions & 47 deletions charts/tidb-cluster/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -161,53 +161,18 @@ 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
# [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
# [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
# # block-cache-size = "1GB"
# [rocksdb.writecf]
# ## 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
# # Here are some parameters you MUST to customize (Please configure in the above `tikv.config` section):
# [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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What if users deploy TiDB cluster of v2.x with this chart?

#
# # Normally it should be tuned to 30%-50% of `tikv.resources.limits.memory`, for example: 32Gi -> 16GB
# capacity = "1GB"
#
# [readpool.coprocessor]
# # 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

replicas: 3
image: pingcap/tikv:v3.0.1
Expand Down Expand Up @@ -258,7 +223,11 @@ tidb:
config: |
[log]
level = "info"

# # Here are some parameters you MUST to customize (Please configure in the above 'tidb.config' section):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"MUST customize"

# [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