Add up to date info on improving performance (#13801)
* Add up to date info on improving performance * Reduced some line lengths
Chris Akritidis committed
Nov 24, 2022 at 08:03 UTC
a223f59ab3a3991ee79aa59f1dddb04e7ebf2eea
1 file changed
+44
-4
docs/guides/configure/performance.md
+44
-4
@@ -8,8 +8,9 @@ custom_edit_url: https://github.com/netdata/netdata/edit/master/docs/guides/conf
8
# How to optimize the Netdata Agent's performance
9
10
We designed the Netdata Agent to be incredibly lightweight, even when it's collecting a few thousand dimensions every
11
-second and visualizing that data into hundreds of charts. The Agent itself should never use more than 1% of a single CPU
12
-core, roughly 100 MiB of RAM, and minimal disk I/O to collect, store, and visualize all this data.
11
+second and visualizing that data into hundreds of charts. When properly configured for a production node, the Agent
12
+itself should never use more than 1% of a single CPU core, roughly 50-100 MiB of RAM, and minimal disk I/O to collect,
13
+store, and visualize all this data.
14
15
We take this scalability seriously. We have one user [running
16
Netdata](https://github.com/netdata/netdata/issues/1323#issuecomment-266427841) on a system with 144 cores and 288
@@ -21,6 +22,11 @@ only 512 MiB of RAM, or an IoT device like a [Raspberry Pi](/docs/guides/monitor
22
cases, reducing Netdata's footprint beyond its already diminutive size can pay big dividends, giving your services more
23
horsepower while still monitoring the health and the performance of the node, OS, hardware, and applications.
24
25
+The default settings of the Netdata Agent are not optimized for performance, but for a simple standalone setup. We want
26
+the first install to give you something you can run without any configuration. Most of the settings and options are
27
+enabled, since we want you to experience the full thing.
28
+
29
+
30
## Prerequisites
31
32
- A node running the Netdata Agent.
@@ -146,18 +152,39 @@ calculator](/docs/store/change-metrics-storage.md#calculate-the-system-resources
152
All the settings are found in the `[global]` section of `netdata.conf`:
153
154
```conf
149
-[global]
155
+[db]
156
memory mode = dbengine
157
page cache size = 32
158
dbengine multihost disk space = 256
159
```
160
161
+To save even more memory, you can disable the dbengine and reduce retention to just 30 minutes, as shown below:
162
+
163
+```conf
164
+[db]
165
+ storage tiers = 1
166
+ mode = alloc
167
+ retention = 1800
168
+```
169
+
170
Metric retention is not important in certain use cases, such as:
171
- Data collection nodes stream collected metrics collected to a centralization point.
172
- Data collection nodes export their metrics to another time series DB, or are scraped by Prometheus
173
- Netdata installed only during incidents, to get richer information.
159
-In such cases, you may not want to use the dbengine at all and instead opt for memory mode `memory mode = ram` or `memory mode = none`.
174
+In such cases, you may not want to use the dbengine at all and instead opt for memory mode
175
+`memory mode = alloc` or `memory mode = none`.
176
+
177
+## Disable machine learning
178
+
179
+Automated anomaly detection may be a powerful tool, but we recommend it to only be enabled on Netdata parents
180
+that sit outside your production infrastructure, or if you have cpu and memory to spare. You can disable ML
181
+with the following:
182
183
+```conf
184
+[ml]
185
+ enabled = no
186
+```
187
+
188
## Run Netdata behind Nginx
189
190
A dedicated web server like Nginx provides far more robustness than the Agent's internal [web server](/web/README.md).
@@ -220,6 +247,19 @@ If you installation is working correctly, and you're not actively auditing Netda
247
access log = none
248
```
249
250
+## Disable health checks
251
+
252
+If you are streaming metrics to parent nodes, we recommend you run your health checks on the parent, for all the metrics collected
253
+by the children nodes. This saves resources on the children and makes it easier to configure or disable alerts and agent notifications.
254
+
255
+The parents by default run health checks for each child, as long as it is connected (the details are in `stream.conf`).
256
+On the child nodes you should add to `netdata.conf` the following:
257
+
258
+```conf
259
+[health]
260
+ enabled = no
261
+```
262
+
263
## What's next?
264
265
We hope this guide helped you better understand how to optimize the performance of the Netdata Agent.