Skip to content

Commit

Permalink
fix(monitor): tunning tps for prometheus to adapt influxdb configrati…
Browse files Browse the repository at this point in the history
…on (#2246)

Co-authored-by: willzgli <willzgli@tencent.com>
  • Loading branch information
willzgli and willzgli committed Mar 10, 2023
1 parent 2e7aac1 commit 009eb65
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 7 deletions.
2 changes: 1 addition & 1 deletion cmd/tke-installer/app/installer/images/images.go
Expand Up @@ -93,7 +93,7 @@ var Version = version.Get().GitVersion
var exComponents = ExComponents{
Registry: containerregistry.Image{Name: "registry", Tag: "2.7.1"},
Busybox: containerregistry.Image{Name: "busybox", Tag: "1.31.1"},
InfluxDB: containerregistry.Image{Name: "influxdb", Tag: "1.7.9"},
InfluxDB: containerregistry.Image{Name: "influxdb", Tag: "1.8.10"},
Thanos: containerregistry.Image{Name: "thanos", Tag: "v0.15.0"},
Kubectl: containerregistry.Image{Name: "kubectl", Tag: "1.22.7"},

Expand Down
Expand Up @@ -15,10 +15,10 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.1.0
version: 0.1.1

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
# It is recommended to use it with quotes.
appVersion: "1.16.0"
appVersion: "1.8.10"
Expand Up @@ -18,7 +18,14 @@ spec:
app: influxdb
spec:
containers:
- name: influxdb
- env:
- name: GODEGUB
value: madvdontneed=1
{{- if .Values.resources }}
- name: GOMAXPROCS
value: {{ .Values.resources.limits.cpu| quote }}
{{- end }}
name: influxdb
image: {{ .Values.image }}
livenessProbe:
tcpSocket:
Expand All @@ -30,6 +37,9 @@ spec:
port: 8086
initialDelaySeconds: 1
periodSeconds: 10
{{- if .Values.resources }}
resources: {{ toYaml .Values.resources | nindent 10 }}
{{- end }}
volumeMounts:
- name: data
mountPath: /var/lib/influxdb
Expand Down
Expand Up @@ -10,3 +10,11 @@ cephFSStorageClassName:
nfs:
nfsPVCName:
nfsStorageClassName:

resources:
limits:
cpu: 4
memory: 4Gi
requests:
cpu: 50m
memory: 128Mi
6 changes: 3 additions & 3 deletions pkg/monitor/controller/prometheus/controller.go
Expand Up @@ -1281,9 +1281,9 @@ func createPrometheusCRD(components images.Components, prometheus *v1.Prometheus
}
rw.QueueConfig = &monitoringv1.QueueConfig{
Capacity: 10000,
MinShards: 1000,
MaxShards: 1000,
MaxSamplesPerSend: 1000,
MinShards: 1,
MaxShards: 24,
MaxSamplesPerSend: 500,
BatchSendDeadline: "30s",
}
}
Expand Down

0 comments on commit 009eb65

Please sign in to comment.