forked from netdata/netdata
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Streaming improvements No 7 (netdata#19204)
* db ram pulse statistics using an API * dbengine total memory should be available in basic pulse statistics; buffers sum should be consistent with the buffers chart * unification of threads count for aclk and the web server; now we use 2x the cores for parents, 1x the cores for children * retention should be a duration * buffer size should be a size * up to 5 replication workers work on the same host * up to 2 replication workers work on the same host * Revert "up to 2 replication workers work on the same host" This reverts commit 314e586. * Revert "up to 5 replication workers work on the same host" This reverts commit 55d253b.
- Loading branch information
Showing
30 changed files
with
184 additions
and
103 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
// SPDX-License-Identifier: GPL-3.0-or-later | ||
|
||
#include "netdata-conf-cloud.h" | ||
#include "../common.h" | ||
|
||
int netdata_conf_cloud_query_threads(void) { | ||
int cpus = MIN(get_netdata_cpus(), 256); // max 256 cores | ||
int threads = MIN(cpus * (stream_conf_is_parent(false) ? 2 : 1), libuv_worker_threads / 2); | ||
threads = MAX(threads, 6); | ||
|
||
threads = config_get_number(CONFIG_SECTION_CLOUD, "query threads", threads); | ||
if(threads < 1) { | ||
netdata_log_error("[" CONFIG_SECTION_CLOUD "].query threads in netdata.conf needs to be at least 1. Overwriting it."); | ||
threads = 1; | ||
config_set_number(CONFIG_SECTION_CLOUD, "query threads", threads); | ||
} | ||
return threads; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
// SPDX-License-Identifier: GPL-3.0-or-later | ||
|
||
#ifndef NETDATA_NETDATA_CONF_CLOUD_H | ||
#define NETDATA_NETDATA_CONF_CLOUD_H | ||
|
||
#include "libnetdata/libnetdata.h" | ||
|
||
int netdata_conf_cloud_query_threads(void); | ||
|
||
#endif //NETDATA_NETDATA_CONF_CLOUD_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
// SPDX-License-Identifier: GPL-3.0-or-later | ||
|
||
#include "pulse-db-rrd.h" | ||
|
||
int64_t pulse_rrd_memory_size = 0; | ||
|
||
void pulse_db_rrd_memory_change(int64_t value) { | ||
__atomic_add_fetch(&pulse_rrd_memory_size, value, __ATOMIC_RELAXED); | ||
} | ||
|
||
void pulse_db_rrd_memory_add(uint64_t value) { | ||
__atomic_add_fetch(&pulse_rrd_memory_size, value, __ATOMIC_RELAXED); | ||
} | ||
|
||
void pulse_db_rrd_memory_sub(uint64_t value) { | ||
__atomic_sub_fetch(&pulse_rrd_memory_size, value, __ATOMIC_RELAXED); | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
// SPDX-License-Identifier: GPL-3.0-or-later | ||
|
||
#ifndef NETDATA_PULSE_DB_RRD_H | ||
#define NETDATA_PULSE_DB_RRD_H | ||
|
||
#include "libnetdata/libnetdata.h" | ||
|
||
void pulse_db_rrd_memory_change(int64_t value); | ||
void pulse_db_rrd_memory_add(uint64_t value); | ||
void pulse_db_rrd_memory_sub(uint64_t value); | ||
|
||
#if defined(PULSE_INTERNALS) | ||
extern int64_t pulse_rrd_memory_size; | ||
#endif | ||
|
||
#endif //NETDATA_PULSE_DB_RRD_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.