Skip to content

Commit

Permalink
address comment
Browse files Browse the repository at this point in the history
  • Loading branch information
weekface committed Dec 26, 2018
1 parent f141074 commit 1e34a20
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 0 deletions.
19 changes: 19 additions & 0 deletions charts/tidb-cluster/templates/config/_tikv-config.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,21 @@ log-level = {{ .Values.tikv.logLevel | default "info" | quote }}
# log-rotation-timespan = "24h"

[readpool.storage]
{{- if .Values.tikv.readpoolStorageconcurrency }}
# size of thread pool for high-priority operations
high-concurrency = {{ .Values.tikv.readpoolStorageconcurrency }}
# size of thread pool for normal-priority operations
normal-concurrency = {{ .Values.tikv.readpoolStorageconcurrency }}
# size of thread pool for low-priority operations
low-concurrency = {{ .Values.tikv.readpoolStorageconcurrency }}
{{- else }}
# 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
{{- end }}
# 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
Expand All @@ -37,9 +46,15 @@ log-level = {{ .Values.tikv.logLevel | default "info" | quote }}
# Notice: if CPU_NUM > 8, default thread pool size for coprocessors
# will be set to CPU_NUM * 0.8.

{{- if .Values.tikv.readpoolCoprocessorconcurrency }}
high-concurrency = {{ .Values.tikv.readpoolCoprocessorconcurrency }}
normal-concurrency = {{ .Values.tikv.readpoolCoprocessorconcurrency }}
low-concurrency = {{ .Values.tikv.readpoolCoprocessorconcurrency }}
{{- else }}
# high-concurrency = 8
# normal-concurrency = 8
# low-concurrency = 8
{{- end }}
# max-tasks-per-worker-high = 2000
# max-tasks-per-worker-normal = 2000
# max-tasks-per-worker-low = 2000
Expand Down Expand Up @@ -105,7 +120,11 @@ log-level = {{ .Values.tikv.logLevel | default "info" | quote }}

# scheduler's worker pool size, should increase it in heavy write cases,
# also should less than total cpu cores.
{{- if .Values.tikv.storageSchedulerWorkerPoolSize }}
scheduler-worker-pool-size = {{ .Values.tikv.storageSchedulerWorkerPoolSize }}
{{- else }}
# scheduler-worker-pool-size = 4
{{- end }}

# When the pending write bytes exceeds this threshold,
# the "scheduler too busy" error is displayed.
Expand Down
12 changes: 12 additions & 0 deletions charts/tidb-cluster/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,21 @@ tikv:
# 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
# defaultcfBlockCacheSize: "1GB"

# in normal cases should tune to 10%-30% tikv.resources.limits.memory
# writecfBlockCacheSize: "256MB"

# size of thread pool for high-priority/normal-priority/low-priority operations
# readpoolStorageconcurrency: 4

# Notice: if tikv.resources.limits.cpu > 8, default thread pool size for coprocessors
# will be set to tikv.resources.limits.cpu * 0.8.
# readpoolCoprocessorconcurrency: 8

# scheduler's worker pool size, should increase it in heavy write cases,
# also should less than total cpu cores.
# storageSchedulerWorkerPoolSize: 4

tikvPromGateway:
image: prom/pushgateway:v0.3.1
imagePullPolicy: IfNotPresent
Expand Down

0 comments on commit 1e34a20

Please sign in to comment.