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 (#2245)

Co-authored-by: willzgli <[email protected]>
  • Loading branch information
willzgli and willzgli authored Mar 10, 2023
1 parent e0699b4 commit 7f2916b
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 7 deletions.
2 changes: 1 addition & 1 deletion cmd/tke-installer/app/installer/images/images.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,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"},

TKEBusinessAPI: containerregistry.Image{Name: "tke-business-api", Tag: Version},
Expand Down
Original file line number Diff line number Diff line change
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"
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,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 @@ -29,6 +36,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
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,12 @@ cephRbdStorageClassName:
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
Original file line number Diff line number Diff line change
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",

This comment has been minimized.

Copy link
@huxiaoliang

huxiaoliang Mar 13, 2023

Contributor

why not handle below case?

if strings.Contains(w, "db=projects")
}
}
Expand Down

1 comment on commit 7f2916b

@huxiaoliang
Copy link
Contributor

Choose a reason for hiding this comment

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

please address my comments!

Please sign in to comment.