@cryptotaxi247 / netdata-1 / commits / bc1851176

chore(streaming): bump default "buffer size bytes" to 10MB (#12913)

Ilya Mashchenko committed May 15, 2022 at 23:07 UTC bc1851176549bb796cc518857b14d8656129c15a
3 files changed +4 -4
docs/metrics-storage-management/reference-streaming.mdx
+1 -1
@@ -54,7 +54,7 @@ node**. This file is automatically generated by Netdata the first time it is sta
54 | `timeout seconds` | `60` | The timeout to connect and send metrics to a parent. |
55 | `default port` | `19999` | The port to use if `destination` does not specify one. |
56 | [`send charts matching`](#send-charts-matching) | `*` | A space-separated list of [Netdata simple patterns](/libnetdata/simple_pattern/README.md) to filter which charts are streamed. [Read more →](#send-charts-matching) |
57 -| `buffer size bytes` | `1048576` | The size of the buffer to use when sending metrics. The default `1048576` equals a buffer of 1MB, which is good for 10-20 seconds of data. Increase this if you expect latencies higher than that. The buffer is flushed on reconnect. |
57 +| `buffer size bytes` | `10485760` | The size of the buffer to use when sending metrics. The default `10485760` equals a buffer of 10MB, which is good for 60 seconds of data. Increase this if you expect latencies higher than that. The buffer is flushed on reconnect. |
58 | `reconnect delay seconds` | `5` | How long to wait until retrying to connect to the parent node. |
59 | `initial clock resync iterations` | `60` | Sync the clock of charts for how many seconds when starting. |
60
streaming/sender.c
+1 -1
@@ -717,7 +717,7 @@ void *rrdpush_sender_thread(void *ptr) {
717 s->timeout = (int)appconfig_get_number(&stream_config, CONFIG_SECTION_STREAM, "timeout seconds", 60);
718 s->default_port = (int)appconfig_get_number(&stream_config, CONFIG_SECTION_STREAM, "default port", 19999);
719 s->buffer->max_size =
720 - (size_t)appconfig_get_number(&stream_config, CONFIG_SECTION_STREAM, "buffer size bytes", 1024 * 1024);
720 + (size_t)appconfig_get_number(&stream_config, CONFIG_SECTION_STREAM, "buffer size bytes", 1024 * 1024 * 10);
721 s->reconnect_delay =
722 (unsigned int)appconfig_get_number(&stream_config, CONFIG_SECTION_STREAM, "reconnect delay seconds", 5);
723 remote_clock_resync_iterations = (unsigned int)appconfig_get_number(
streaming/stream.conf
+2 -2
@@ -82,9 +82,9 @@
82 send charts matching = *
83
84 # The buffer to use for sending metrics.
85 - # 1MB is good for 10-20 seconds of data, so increase this if you expect latencies.
85 + # 10MB is good for 60 seconds of data, so increase this if you expect latencies.
86 # The buffer is flushed on reconnects (this will not prevent gaps at the charts).
87 - buffer size bytes = 1048576
87 + buffer size bytes = 10485760
88
89 # If the connection fails, or it disconnects,
90 # retry after that many seconds.