Skip to content

Commit 009eb65

Browse files
willzgliwillzgli
andauthored
fix(monitor): tunning tps for prometheus to adapt influxdb configration (#2246)
Co-authored-by: willzgli <[email protected]>
1 parent 2e7aac1 commit 009eb65

File tree

5 files changed

+25
-7
lines changed

5 files changed

+25
-7
lines changed

cmd/tke-installer/app/installer/images/images.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ var Version = version.Get().GitVersion
9393
var exComponents = ExComponents{
9494
Registry: containerregistry.Image{Name: "registry", Tag: "2.7.1"},
9595
Busybox: containerregistry.Image{Name: "busybox", Tag: "1.31.1"},
96-
InfluxDB: containerregistry.Image{Name: "influxdb", Tag: "1.7.9"},
96+
InfluxDB: containerregistry.Image{Name: "influxdb", Tag: "1.8.10"},
9797
Thanos: containerregistry.Image{Name: "thanos", Tag: "v0.15.0"},
9898
Kubectl: containerregistry.Image{Name: "kubectl", Tag: "1.22.7"},
9999

cmd/tke-installer/app/installer/manifests/charts/influxdb/Chart.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ type: application
1515
# This is the chart version. This version number should be incremented each time you make changes
1616
# to the chart and its templates, including the app version.
1717
# Versions are expected to follow Semantic Versioning (https://semver.org/)
18-
version: 0.1.0
18+
version: 0.1.1
1919

2020
# This is the version number of the application being deployed. This version number should be
2121
# incremented each time you make changes to the application. Versions are not expected to
2222
# follow Semantic Versioning. They should reflect the version the application is using.
2323
# It is recommended to use it with quotes.
24-
appVersion: "1.16.0"
24+
appVersion: "1.8.10"

cmd/tke-installer/app/installer/manifests/charts/influxdb/templates/influxdb.yaml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,14 @@ spec:
1818
app: influxdb
1919
spec:
2020
containers:
21-
- name: influxdb
21+
- env:
22+
- name: GODEGUB
23+
value: madvdontneed=1
24+
{{- if .Values.resources }}
25+
- name: GOMAXPROCS
26+
value: {{ .Values.resources.limits.cpu| quote }}
27+
{{- end }}
28+
name: influxdb
2229
image: {{ .Values.image }}
2330
livenessProbe:
2431
tcpSocket:
@@ -30,6 +37,9 @@ spec:
3037
port: 8086
3138
initialDelaySeconds: 1
3239
periodSeconds: 10
40+
{{- if .Values.resources }}
41+
resources: {{ toYaml .Values.resources | nindent 10 }}
42+
{{- end }}
3343
volumeMounts:
3444
- name: data
3545
mountPath: /var/lib/influxdb

cmd/tke-installer/app/installer/manifests/charts/influxdb/values.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,11 @@ cephFSStorageClassName:
1010
nfs:
1111
nfsPVCName:
1212
nfsStorageClassName:
13+
14+
resources:
15+
limits:
16+
cpu: 4
17+
memory: 4Gi
18+
requests:
19+
cpu: 50m
20+
memory: 128Mi

pkg/monitor/controller/prometheus/controller.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1281,9 +1281,9 @@ func createPrometheusCRD(components images.Components, prometheus *v1.Prometheus
12811281
}
12821282
rw.QueueConfig = &monitoringv1.QueueConfig{
12831283
Capacity: 10000,
1284-
MinShards: 1000,
1285-
MaxShards: 1000,
1286-
MaxSamplesPerSend: 1000,
1284+
MinShards: 1,
1285+
MaxShards: 24,
1286+
MaxSamplesPerSend: 500,
12871287
BatchSendDeadline: "30s",
12881288
}
12891289
}

0 commit comments

Comments
 (0)