Improve dbengine memory protection message on startup (#22045)
* Update OOM protection logging in `netdata-conf-db.c` for clarity - Improve log messages to better communicate DBENGINE's memory protection state and actions. * Clarify DBENGINE memory usage logging to better convey available RAM handling and OOM mitigation.
Stelios Fragkakis committed
Mar 28, 2026 at 00:15 UTC
084336fc5f9687904d0f6f79a2dfe12e454097c7
1 file changed
+6
-5
src/daemon/config/netdata-conf-db.c
+6
-5
@@ -162,17 +162,18 @@ void netdata_conf_dbengine_init(const char *hostname) {
162
size_snprintf(buf_oom, sizeof(buf_oom), dbengine_out_of_memory_protection, "B", false);
163
164
nd_log(NDLS_DAEMON, NDLP_NOTICE,
165
- "DBENGINE Out of Memory Protection. "
166
- "System Memory Total: %s, Currently Available: %s, Out of Memory Protection: %s, Use All RAM: %s",
167
- buf_total, buf_avail, buf_oom, dbengine_use_all_ram_for_caches ? "enabled" : "disabled");
165
+ "DBENGINE memory protection enabled. "
166
+ "Netdata will limit DBENGINE memory usage to help keep at least %s of system RAM available when possible and reduce OOM risk. "
167
+ "System memory total: %s, currently available: %s, use all RAM for caches: %s",
168
+ buf_oom, buf_total, buf_avail, dbengine_use_all_ram_for_caches ? "enabled" : "disabled");
169
}
170
else {
171
dbengine_out_of_memory_protection = 0;
172
dbengine_use_all_ram_for_caches = false;
173
174
nd_log(NDLS_DAEMON, NDLP_WARNING,
174
- "DBENGINE Out of Memory Protection and Use All Ram cannot be enabled. "
175
- "Failed to detect memory size on this system.");
175
+ "DBENGINE memory protection is disabled because Netdata could not detect system memory size. "
176
+ "\"use all RAM for caches\" is also disabled.");
177
}
178
179
// ----------------------------------------------------------------------------------------------------------------