Skip to content

Commit 9c155f7

Browse files
hagen1778Haleygo
authored andcommitted
app/vmalert: bump default values for sending data to remoteWrite.url (VictoriaMetrics#7084)
* `remoteWrite.maxQueueSize` from `100_000` to `1_000_000`, this should improve resiliency of recording rules that produce many series; * `remoteWrite.maxBatchSize` from `1_000` to `10_000`, this should be more efficient to send from netwroking perspective; * `remoteWrite.concurrency` from `1` to `4`, this should imrpove speed of sending the generated series. The new settings should improve remote write performance of vmalert with default settings. ### Describe Your Changes Please provide a brief description of the changes you made. Be as specific as possible to help others understand the purpose and impact of your modifications. ### Checklist The following checks are **mandatory**: - [ ] My change adheres [VictoriaMetrics contributing guidelines](https://docs.victoriametrics.com/contributing/). --------- Signed-off-by: hagen1778 <[email protected]> Co-authored-by: Hui Wang <[email protected]>
1 parent 28610ed commit 9c155f7

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

app/vmalert/remotewrite/init.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,9 @@ var (
3434

3535
idleConnectionTimeout = flag.Duration("remoteWrite.idleConnTimeout", 50*time.Second, `Defines a duration for idle (keep-alive connections) to exist. Consider settings this value less to the value of "-http.idleConnTimeout". It must prevent possible "write: broken pipe" and "read: connection reset by peer" errors.`)
3636

37-
maxQueueSize = flag.Int("remoteWrite.maxQueueSize", 1e5, "Defines the max number of pending datapoints to remote write endpoint")
38-
maxBatchSize = flag.Int("remoteWrite.maxBatchSize", 1e3, "Defines max number of timeseries to be flushed at once")
39-
concurrency = flag.Int("remoteWrite.concurrency", 1, "Defines number of writers for concurrent writing into remote write endpoint")
37+
maxQueueSize = flag.Int("remoteWrite.maxQueueSize", 1e6, "Defines the max number of pending datapoints to remote write endpoint")
38+
maxBatchSize = flag.Int("remoteWrite.maxBatchSize", 1e4, "Defines max number of timeseries to be flushed at once")
39+
concurrency = flag.Int("remoteWrite.concurrency", 4, "Defines number of writers for concurrent writing into remote write endpoint")
4040
flushInterval = flag.Duration("remoteWrite.flushInterval", 5*time.Second, "Defines interval of flushes to remote write endpoint")
4141

4242
tlsInsecureSkipVerify = flag.Bool("remoteWrite.tlsInsecureSkipVerify", false, "Whether to skip tls verification when connecting to -remoteWrite.url")

docs/changelog/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ See also [LTS releases](https://docs.victoriametrics.com/lts-releases/).
2929
* FEATURE: [dashboards](https://github.com/VictoriaMetrics/VictoriaMetrics/blob/master/dashboards) for VM single-node, cluster, vmalert, vmagent, VictoriaLogs: add `Go scheduling latency` panel to show the 99th quantile of Go goroutines scheduling. This panel should help identifying insufficient CPU resources for the service. It is especially useful if CPU gets throttled, which now should be visible on this panel.
3030
* FEATURE: [alerts](https://github.com/VictoriaMetrics/VictoriaMetrics/blob/master/deployment/docker/alerts-health.yml): add alerting rule to track the Go scheduling latency for goroutines. It should notify users if VM component doesn't have enough CPU to run or gets throttled.
3131
* FEATURE: [vmagent](https://docs.victoriametrics.com/vmagent/) and [Single-node VictoriaMetrics](https://docs.victoriametrics.com/): hide jobs that contain only healthy targets when `show_only_unhealthy` filter is enabled. Before, jobs without unhealthy targets were still displayed on the page. See [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/3536).
32+
* FEATURE: [vmalert](https://docs.victoriametrics.com/vmalert): bump default values for sending data to `remoteWrite.url`: `remoteWrite.maxQueueSize` from `100_000` to `1_000_000`, `remoteWrite.maxBatchSize` from `1_000` to `10_000`, `remoteWrite.concurrency` from `1` to `4`. The new settings should improve remote write performance of vmalert with default settings.
3233

3334
* BUGFIX: [vmagent](https://docs.victoriametrics.com/vmagent/) fix service discovery of Azure Virtual Machines for response contains `nextLink` in `Host:Port` format. See [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/6912).
3435
* BUGFIX: [vmagent](https://docs.victoriametrics.com/vmagent/): properly consume messages [from kafka](https://docs.victoriametrics.com/vmagent/#kafka-integration). Previously vmagent could skip some messages during start-up.

docs/vmalert.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1367,7 +1367,7 @@ The shortlist of configuration flags is the following:
13671367
-remoteWrite.bearerTokenFile string
13681368
Optional path to bearer token file to use for -remoteWrite.url.
13691369
-remoteWrite.concurrency int
1370-
Defines number of writers for concurrent writing into remote write endpoint (default 1)
1370+
Defines number of writers for concurrent writing into remote write endpoint (default 4)
13711371
-remoteWrite.disablePathAppend
13721372
Whether to disable automatic appending of '/api/v1/write' path to the configured -remoteWrite.url.
13731373
-remoteWrite.flushInterval duration
@@ -1377,9 +1377,9 @@ The shortlist of configuration flags is the following:
13771377
-remoteWrite.idleConnTimeout duration
13781378
Defines a duration for idle (keep-alive connections) to exist. Consider settings this value less to the value of "-http.idleConnTimeout". It must prevent possible "write: broken pipe" and "read: connection reset by peer" errors. (default 50s)
13791379
-remoteWrite.maxBatchSize int
1380-
Defines max number of timeseries to be flushed at once (default 1000)
1380+
Defines max number of timeseries to be flushed at once (default 10000)
13811381
-remoteWrite.maxQueueSize int
1382-
Defines the max number of pending datapoints to remote write endpoint (default 100000)
1382+
Defines the max number of pending datapoints to remote write endpoint (default 1000000)
13831383
-remoteWrite.oauth2.clientID string
13841384
Optional OAuth2 clientID to use for -remoteWrite.url
13851385
-remoteWrite.oauth2.clientSecret string

0 commit comments

Comments
 (0)