From f47d0c8f8cb65f77095378b57821dd0673c62bc7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beat=20K=C3=BCng?= Date: Tue, 9 Jan 2018 10:37:14 +0100 Subject: [PATCH] load_mon: reduce FDS_LOW_WARNING_THRESHOLD to 3 This bound can be quite tight, because: - The system still behaves well, even if all FD's are used (as opposed to a stack overflow) - The amount of used FD's is typically only increased one at a time (e.g. adding new logged topics, adding a mavlink stream, ...) - reducing CONFIG_NFILE_DESCRIPTORS to the minimum frees up a considerable amount of RAM on systems that need it --- src/modules/load_mon/load_mon.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/load_mon/load_mon.cpp b/src/modules/load_mon/load_mon.cpp index aa2ab37163..2c6d9dec1e 100644 --- a/src/modules/load_mon/load_mon.cpp +++ b/src/modules/load_mon/load_mon.cpp @@ -62,7 +62,7 @@ extern struct system_load_s system_load; #define STACK_LOW_WARNING_THRESHOLD 300 ///< if free stack space falls below this, print a warning -#define FDS_LOW_WARNING_THRESHOLD 10 ///< if free file descriptors fall below this, print a warning +#define FDS_LOW_WARNING_THRESHOLD 3 ///< if free file descriptors fall below this, print a warning namespace load_mon {