summaryrefslogtreecommitdiffstats
path: root/daemon
diff options
context:
space:
mode:
authorMarkos Fountoulakis <44345837+mfundul@users.noreply.github.com>2020-03-16 13:39:00 +0200
committerGitHub <noreply@github.com>2020-03-16 13:39:00 +0200
commit161ba1592f5412bd378ace104979ddb66cd33973 (patch)
tree3d278844c5a94b67661312f7138516d725ea6e0e /daemon
parent87fd050461eac9e69f78a075ed896a1eaeabcd04 (diff)
Fix streaming scaling (#8375)
* Disallow multiple streaming connections to the same master agent * Reject multiple streaming connections quickly without blocking * Increase timeout for systemd service shutdown to give time to flush the db. * Optimize page correlation ID to use atomic counter instead of locks * Reduce contention in global configuration mutex * Optimize complexity of inserting configuration sections from O(N) to O(1) * Reduce overhead of clockgettime() by utilizing CLOCK_MONOTONIC_COARSE when applicable. * Fix unit test compile errors
Diffstat (limited to 'daemon')
-rw-r--r--daemon/main.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/daemon/main.c b/daemon/main.c
index f019cc6832..a0a26115d8 100644
--- a/daemon/main.c
+++ b/daemon/main.c
@@ -6,7 +6,8 @@ int netdata_zero_metrics_enabled;
int netdata_anonymous_statistics_enabled;
struct config netdata_config = {
- .sections = NULL,
+ .first_section = NULL,
+ .last_section = NULL,
.mutex = NETDATA_MUTEX_INITIALIZER,
.index = {
.avl_tree = {
@@ -1148,6 +1149,7 @@ int main(int argc, char **argv) {
mallopt(M_ARENA_MAX, 1);
#endif
test_clock_boottime();
+ test_clock_monotonic_coarse();
// prepare configuration environment variables for the plugins