summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--aclk/aclk.c2
-rw-r--r--collectors/cgroups.plugin/sys_fs_cgroup.c45
-rw-r--r--collectors/diskspace.plugin/plugin_diskspace.c2
-rw-r--r--collectors/plugins.d/pluginsd_parser.c2
-rw-r--r--collectors/proc.plugin/proc_self_mountinfo.c2
-rw-r--r--collectors/proc.plugin/proc_spl_kstat_zfs.c2
-rw-r--r--collectors/proc.plugin/sys_block_zram.c2
-rw-r--r--collectors/statsd.plugin/statsd.c20
-rw-r--r--collectors/tc.plugin/plugin_tc.c4
-rw-r--r--daemon/common.c35
-rw-r--r--daemon/common.h2
-rw-r--r--daemon/event_loop.c1
-rw-r--r--daemon/event_loop.h1
-rw-r--r--daemon/global_statistics.c28
-rw-r--r--daemon/main.c4
-rw-r--r--database/engine/cache.c89
-rw-r--r--database/engine/cache.h4
-rw-r--r--database/engine/datafile.c6
-rw-r--r--database/engine/journalfile.c58
-rw-r--r--database/engine/journalfile.h1
-rw-r--r--database/engine/metric.c26
-rw-r--r--database/engine/metric.h2
-rw-r--r--database/engine/pagecache.c126
-rw-r--r--database/engine/pagecache.h7
-rw-r--r--database/engine/pdc.c321
-rw-r--r--database/engine/pdc.h8
-rw-r--r--database/engine/rrdengine.c666
-rw-r--r--database/engine/rrdengine.h21
-rwxr-xr-xdatabase/engine/rrdengineapi.c23
-rw-r--r--database/engine/rrdengineapi.h5
-rw-r--r--database/rrd.h1
-rw-r--r--database/rrdcalc.c3
-rw-r--r--database/rrdcalctemplate.c3
-rw-r--r--database/rrdcontext.c18
-rw-r--r--database/rrddim.c3
-rw-r--r--database/rrddimvar.c3
-rw-r--r--database/rrdfamily.c3
-rw-r--r--database/rrdfunctions.c4
-rw-r--r--database/rrdhost.c63
-rw-r--r--database/rrdlabels.c4
-rw-r--r--database/rrdset.c5
-rw-r--r--database/rrdsetvar.c3
-rw-r--r--database/rrdvar.c3
-rw-r--r--database/sqlite/sqlite3.c6
-rw-r--r--libnetdata/aral/aral.c407
-rw-r--r--libnetdata/aral/aral.h36
-rw-r--r--libnetdata/dictionary/dictionary.c80
-rw-r--r--libnetdata/dictionary/dictionary.h11
-rw-r--r--libnetdata/libnetdata.c96
-rw-r--r--libnetdata/libnetdata.h4
-rw-r--r--libnetdata/log/log.c44
-rw-r--r--libnetdata/os.c119
-rw-r--r--libnetdata/os.h7
-rw-r--r--streaming/replication.c52
-rw-r--r--web/server/static/static-threaded.c2
55 files changed, 1223 insertions, 1272 deletions
diff --git a/aclk/aclk.c b/aclk/aclk.c
index 493c52bd24..e808972213 100644
--- a/aclk/aclk.c
+++ b/aclk/aclk.c
@@ -310,7 +310,7 @@ static void puback_callback(uint16_t packet_id)
static int read_query_thread_count()
{
- int threads = MIN(get_system_cpus()/2, 6);
+ int threads = MIN(get_netdata_cpus()/2, 6);
threads = MAX(threads, 2);
threads = config_get_number(CONFIG_SECTION_CLOUD, "query thread count", threads);
if(threads < 1) {
diff --git a/collectors/cgroups.plugin/sys_fs_cgroup.c b/collectors/cgroups.plugin/sys_fs_cgroup.c
index 9f9178c367..d312f44300 100644
--- a/collectors/cgroups.plugin/sys_fs_cgroup.c
+++ b/collectors/cgroups.plugin/sys_fs_cgroup.c
@@ -3516,52 +3516,15 @@ static inline char *cgroup_chart_type(char *buffer, const char *id, size_t len)
return buffer;
}
-static inline unsigned long long cpuset_str2ull(char **s) {
- unsigned long long n = 0;
- char c;
- for(c = **s; c >= '0' && c <= '9' ; c = *(++*s)) {
- n *= 10;
- n += c - '0';
- }
- return n;
-}
-
static inline void update_cpu_limits(char **filename, unsigned long long *value, struct cgroup *cg) {
if(*filename) {
int ret = -1;
if(value == &cg->cpuset_cpus) {
- static char *buf = NULL;
- static size_t buf_size = 0;
-
- if(!buf) {
- buf_size = 100U + 6 * get_system_cpus(); // taken from kernel/cgroup/cpuset.c
- buf = mallocz(buf_size + 1);
- }
-
- ret = read_file(*filename, buf, buf_size);
-
- if(!ret) {
- char *s = buf;
- unsigned long long ncpus = 0;
-
- // parse the cpuset string and calculate the number of cpus the cgroup is allowed to use
- while(*s) {
- unsigned long long n = cpuset_str2ull(&s);
- ncpus++;
- if(*s == ',') {
- s++;
- continue;
- }
- if(*s == '-') {
- s++;
- unsigned long long m = cpuset_str2ull(&s);
- ncpus += m - n; // calculate the number of cpus in the region
- }
- s++;
- }
-
- if(likely(ncpus)) *value = ncpus;
+ unsigned long ncpus = read_cpuset_cpus(*filename, get_system_cpus());
+ if(ncpus) {
+ *value = ncpus;
+ ret = 0;
}
}
else if(value == &cg->cpu_cfs_period) {
diff --git a/collectors/diskspace.plugin/plugin_diskspace.c b/collectors/diskspace.plugin/plugin_diskspace.c
index 96622c4aee..743612ffb1 100644
--- a/collectors/diskspace.plugin/plugin_diskspace.c
+++ b/collectors/diskspace.plugin/plugin_diskspace.c
@@ -319,7 +319,7 @@ static inline void do_disk_space_stats(struct mountinfo *mi, int update_every) {
, SIMPLE_PATTERN_EXACT
);
- dict_mountpoints = dictionary_create_advanced(DICT_OPTION_NONE, &dictionary_stats_category_collectors);
+ dict_mountpoints = dictionary_create_advanced(DICT_OPTION_NONE, &dictionary_stats_category_collectors, 0);
}
struct mount_point_metadata *m = dictionary_get(dict_mountpoints, mi->mount_point);
diff --git a/collectors/plugins.d/pluginsd_parser.c b/collectors/plugins.d/pluginsd_parser.c
index 48acfd7dc1..f172ccc262 100644
--- a/collectors/plugins.d/pluginsd_parser.c
+++ b/collectors/plugins.d/pluginsd_parser.c
@@ -525,7 +525,7 @@ static void inflight_functions_delete_callback(const DICTIONARY_ITEM *item __may
}
void inflight_functions_init(PARSER *parser) {
- parser->inflight.functions = dictionary_create_advanced(DICT_OPTION_DONT_OVERWRITE_VALUE, &dictionary_stats_category_functions);
+ parser->inflight.functions = dictionary_create_advanced(DICT_OPTION_DONT_OVERWRITE_VALUE, &dictionary_stats_category_functions, 0);
dictionary_register_insert_callback(parser->inflight.functions, inflight_functions_insert_callback, parser);
dictionary_register_delete_callback(parser->inflight.functions, inflight_functions_delete_callback, parser);
dictionary_register_conflict_callback(parser->inflight.functions, inflight_functions_conflict_callback, parser);
diff --git a/collectors/proc.plugin/proc_self_mountinfo.c b/collectors/proc.plugin/proc_self_mountinfo.c
index 0120310ae5..0483749c37 100644
--- a/collectors/proc.plugin/proc_self_mountinfo.c
+++ b/collectors/proc.plugin/proc_self_mountinfo.c
@@ -229,7 +229,7 @@ struct mountinfo *mountinfo_read(int do_statvfs) {
// create a dictionary to track uniqueness
DICTIONARY *dict = dictionary_create_advanced(
DICT_OPTION_SINGLE_THREADED | DICT_OPTION_DONT_OVERWRITE_VALUE | DICT_OPTION_NAME_LINK_DONT_CLONE,
- &dictionary_stats_category_collectors);
+ &dictionary_stats_category_collectors, 0);
unsigned long l, lines = procfile_lines(ff);
for(l = 0; l < lines ;l++) {
diff --git a/collectors/proc.plugin/proc_spl_kstat_zfs.c b/collectors/proc.plugin/proc_spl_kstat_zfs.c
index 3a1c9160c7..0db9970c36 100644
--- a/collectors/proc.plugin/proc_spl_kstat_zfs.c
+++ b/collectors/proc.plugin/proc_spl_kstat_zfs.c
@@ -322,7 +322,7 @@ int do_proc_spl_kstat_zfs_pool_state(int update_every, usec_t dt)
snprintfz(filename, FILENAME_MAX, "%s%s", netdata_configured_host_prefix, "/proc/spl/kstat/zfs");
dirname = config_get("plugin:proc:" ZFS_PROC_POOLS, "directory to monitor", filename);
- zfs_pools = dictionary_create_advanced(DICT_OPTION_SINGLE_THREADED, &dictionary_stats_category_collectors);
+ zfs_pools = dictionary_create_advanced(DICT_OPTION_SINGLE_THREADED, &dictionary_stats_category_collectors, 0);
do_zfs_pool_state = 1;
}
diff --git a/collectors/proc.plugin/sys_block_zram.c b/collectors/proc.plugin/sys_block_zram.c
index b95786a3fd..1be725b103 100644
--- a/collectors/proc.plugin/sys_block_zram.c
+++ b/collectors/proc.plugin/sys_block_zram.c
@@ -267,7 +267,7 @@ int do_sys_block_zram(int update_every, usec_t dt) {
}
procfile_close(ff);
- devices = dictionary_create_advanced(DICT_OPTION_SINGLE_THREADED, &dictionary_stats_category_collectors);
+ devices = dictionary_create_advanced(DICT_OPTION_SINGLE_THREADED, &dictionary_stats_category_collectors, 0);
device_count = init_devices(devices, (unsigned int)zram_id, update_every);
}
diff --git a/collectors/statsd.plugin/statsd.c b/collectors/statsd.plugin/statsd.c
index c359a2085a..d15129b9c7 100644
--- a/collectors/statsd.plugin/statsd.c
+++ b/collectors/statsd.plugin/statsd.c
@@ -595,7 +595,7 @@ static inline void statsd_process_set(STATSD_METRIC *m, const char *value) {
}
if (unlikely(!m->set.dict)) {
- m->set.dict = dictionary_create_advanced(STATSD_DICTIONARY_OPTIONS, &dictionary_stats_category_collectors);
+ m->set.dict = dictionary_create_advanced(STATSD_DICTIONARY_OPTIONS, &dictionary_stats_category_collectors, 0);
dictionary_register_insert_callback(m->set.dict, dictionary_metric_set_value_insert_callback, m);
m->set.unique = 0;
}
@@ -635,7 +635,7 @@ static inline void statsd_process_dictionary(STATSD_METRIC *m, const char *value
statsd_reset_metric(m);
if (unlikely(!m->dictionary.dict)) {
- m->dictionary.dict = dictionary_create_advanced(STATSD_DICTIONARY_OPTIONS, &dictionary_stats_category_collectors);
+ m->dictionary.dict = dictionary_create_advanced(STATSD_DICTIONARY_OPTIONS, &dictionary_stats_category_collectors, 0);
dictionary_register_insert_callback(m->dictionary.dict, dictionary_metric_dict_value_insert_callback, m);
m->dictionary.unique = 0;
}
@@ -1337,7 +1337,7 @@ static int statsd_readfile(const char *filename, STATSD_APP *app, STATSD_APP_CHA
else if(app) {
if(!strcmp(s, "dictionary")) {
if(!app->dict)
- app->dict = dictionary_create_advanced(DICT_OPTION_SINGLE_THREADED, &dictionary_stats_category_collectors);
+ app->dict = dictionary_create_advanced(DICT_OPTION_SINGLE_THREADED, &dictionary_stats_category_collectors, 0);
dict = app->dict;
}
@@ -2422,13 +2422,13 @@ void *statsd_main(void *ptr) {
netdata_thread_cleanup_push(statsd_main_cleanup, ptr);
- statsd.gauges.dict = dictionary_create_advanced(STATSD_DICTIONARY_OPTIONS, &dictionary_stats_category_collectors);
- statsd.meters.dict = dictionary_create_advanced(STATSD_DICTIONARY_OPTIONS, &dictionary_stats_category_collectors);
- statsd.counters.dict = dictionary_create_advanced(STATSD_DICTIONARY_OPTIONS, &dictionary_stats_category_collectors);
- statsd.histograms.dict = dictionary_create_advanced(STATSD_DICTIONARY_OPTIONS, &dictionary_stats_category_collectors);
- statsd.dictionaries.dict = dictionary_create_advanced(STATSD_DICTIONARY_OPTIONS, &dictionary_stats_category_collectors);
- statsd.sets.dict = dictionary_create_advanced(STATSD_DICTIONARY_OPTIONS, &dictionary_stats_category_collectors);
- statsd.timers.dict = dictionary_create_advanced(STATSD_DICTIONARY_OPTIONS, &dictionary_stats_category_collectors);
+ statsd.gauges.dict = dictionary_create_advanced(STATSD_DICTIONARY_OPTIONS, &dictionary_stats_category_collectors, 0);
+ statsd.meters.dict = dictionary_create_advanced(STATSD_DICTIONARY_OPTIONS, &dictionary_stats_category_collectors, 0);
+ statsd.counters.dict = dictionary_create_advanced(STATSD_DICTIONARY_OPTIONS, &dictionary_stats_category_collectors, 0);
+ statsd.histograms.dict = dictionary_create_advanced(STATSD_DICTIONARY_OPTIONS, &dictionary_stats_category_collectors, 0);
+ statsd.dictionaries.dict = dictionary_create_advanced(STATSD_DICTIONARY_OPTIONS, &dictionary_stats_category_collectors, 0);
+ statsd.sets.dict = dictionary_create_advanced(STATSD_DICTIONARY_OPTIONS, &dictionary_stats_category_collectors, 0);
+ statsd.timers.dict = dictionary_create_advanced(STATSD_DICTIONARY_OPTIONS, &dictionary_stats_category_collectors, 0);
dictionary_register_insert_callback(statsd.gauges.dict, dictionary_metric_insert_callback, &statsd.gauges);
dictionary_register_insert_callback(statsd.meters.dict, dictionary_metric_insert_callback, &statsd.meters);
diff --git a/collectors/tc.plugin/plugin_tc.c b/collectors/tc.plugin/plugin_tc.c
index 59f0302886..a8ceca4494 100644
--- a/collectors/tc.plugin/plugin_tc.c
+++ b/collectors/tc.plugin/plugin_tc.c
@@ -98,7 +98,7 @@ static bool tc_class_conflict_callback(const DICTIONARY_ITEM *item __maybe_unuse
static void tc_class_index_init(struct tc_device *d) {
if(!d->classes) {
- d->classes = dictionary_create_advanced(DICT_OPTION_DONT_OVERWRITE_VALUE | DICT_OPTION_SINGLE_THREADED, &dictionary_stats_category_collectors);
+ d->classes = dictionary_create_advanced(DICT_OPTION_DONT_OVERWRITE_VALUE | DICT_OPTION_SINGLE_THREADED, &dictionary_stats_category_collectors, 0);
dictionary_register_delete_callback(d->classes, tc_class_free_callback, d);
dictionary_register_conflict_callback(d->classes, tc_class_conflict_callback, d);
@@ -146,7 +146,7 @@ static void tc_device_index_init() {
if(!tc_device_root_index) {
tc_device_root_index = dictionary_create_advanced(
DICT_OPTION_DONT_OVERWRITE_VALUE | DICT_OPTION_SINGLE_THREADED | DICT_OPTION_ADD_IN_FRONT,
- &dictionary_stats_category_collectors);
+ &dictionary_stats_category_collectors, 0);
dictionary_register_insert_callback(tc_device_root_index, tc_device_add_callback, NULL);
dictionary_register_delete_callback(tc_device_root_index, tc_device_free_callback, NULL);
diff --git a/daemon/common.c b/daemon/common.c
index 85d6386313..6eae07cffc 100644
--- a/daemon/common.c
+++ b/daemon/common.c
@@ -19,3 +19,38 @@ int32_t netdata_configured_utc_offset = 0;
int netdata_ready;
int netdata_cloud_setting;
+long get_netdata_cpus(void) {
+ static long processors = 0;
+
+ if(processors)
+ return processors;
+
+ long cores_proc_stat = get_system_cpus_with_cache(false, true);
+ long cores_cpuset_v1 = (long)read_cpuset_cpus("/sys/fs/cgroup/cpuset/cpuset.cpus", cores_proc_stat);
+ long cores_cpuset_v2 = (long)read_cpuset_cpus("/sys/fs/cgroup/cpuset.cpus", cores_proc_stat);
+
+ if(cores_cpuset_v2)
+ processors = cores_cpuset_v2;
+ else if(cores_cpuset_v1)
+ processors = cores_cpuset_v1;
+ else
+ processors = cores_proc_stat;
+
+ long cores_user_configured = config_get_number(CONFIG_SECTION_GLOBAL, "cpu cores", processors);
+
+ errno = 0;
+ internal_error(true,
+ "System CPUs: %ld, ("
+ "system: %ld, cgroups cpuset v1: %ld, cgroups cpuset v2: %ld, netdata.conf: %ld"
+ ")"
+ , processors
+ , cores_proc_stat
+ , cores_cpuset_v1
+ , cores_cpuset_v2
+ , cores_user_configured
+ );
+
+ processors = cores_user_configured;
+
+ return processors;
+}
diff --git a/daemon/common.h b/daemon/common.h
index 8a775fb837..ca4d5c9544 100644
--- a/daemon/common.h
+++ b/daemon/common.h
@@ -106,4 +106,6 @@ extern int netdata_anonymous_statistics_enabled;
extern int netdata_ready;
extern int netdata_cloud_setting;
+long get_netdata_cpus(void);
+
#endif /* NETDATA_COMMON_H */
diff --git a/daemon/event_loop.c b/daemon/event_loop.c
index cb101d9143..6f09cd654a 100644
--- a/daemon/event_loop.c
+++ b/daemon/event_loop.c
@@ -24,6 +24,7 @@ void register_libuv_worker_jobs() {
worker_register_job_name(UV_EVENT_DBENGINE_EXTENT_DECOMPRESSION, "extent decompression");
worker_register_job_name(UV_EVENT_DBENGINE_EXTENT_PAGE_LOOKUP, "page lookup");
worker_register_job_name(UV_EVENT_DBENGINE_EXTENT_PAGE_POPULATION, "page populate");
+ worker_register_job_name(UV_EVENT_DBENGINE_EXTENT_PAGE_ALLOCATION, "page allocate");
// flushing related
worker_register_job_name(UV_EVENT_DBENGINE_FLUSH_MAIN_CACHE, "flush main");
diff --git a/daemon/event_loop.h b/daemon/event_loop.h
index a539a39cfa..0d3cc0d07c 100644
--- a/daemon/event_loop.h
+++ b/daemon/event_loop.h
@@ -16,6 +16,7 @@ enum event_loop_job {
UV_EVENT_DBENGINE_EXTENT_DECOMPRESSION,
UV_EVENT_DBENGINE_EXTENT_PAGE_LOOKUP,
UV_EVENT_DBENGINE_EXTENT_PAGE_POPULATION,
+ UV_EVENT_DBENGINE_EXTENT_PAGE_ALLOCATION,
// flushing related
UV_EVENT_DBENGINE_FLUSH_MAIN_CACHE,
diff --git a/daemon/global_statistics.c b/daemon/global_statistics.c
index 6edd4c60ee..0dc3ee6452 100644
--- a/daemon/global_statistics.c
+++ b/daemon/global_statistics.c
@@ -243,9 +243,6 @@ static void global_statistics_charts(void) {
global_statistics_copy(&gs, GLOBAL_STATS_RESET_WEB_USEC_MAX);
getrusage(RUSAGE_SELF, &me);
- size_t aral_structures, aral_malloc_allocated, aral_malloc_used, aral_mmap_allocated, aral_mmap_used;
- aral_get_size_statistics(&aral_structures, &aral_malloc_allocated, &aral_malloc_used, &aral_mmap_allocated, &aral_mmap_used);
-
// ----------------------------------------------------------------
{
@@ -296,6 +293,7 @@ static void global_statistics_charts(void) {
static RRDDIM *rd_buffers = NULL;
static RRDDIM *rd_workers = NULL;
static RRDDIM *rd_aral = NULL;
+ static RRDDIM *rd_judy = NULL;
static RRDDIM *rd_other = NULL;
if (unlikely(!st_memory)) {
@@ -327,6 +325,7 @@ static void global_statistics_charts(void) {
rd_buffers = rrddim_add(st_memory, "buffers", NULL, 1, 1, RRD_ALGORITHM_ABSOLUTE);
rd_workers = rrddim_add(st_memory, "workers", NULL, 1, 1, RRD_ALGORITHM_ABSOLUTE);
rd_aral = rrddim_add(st_memory, "aral", NULL, 1, 1, RRD_ALGORITHM_ABSOLUTE);
+ rd_judy = rrddim_add(st_memory, "judy", NULL, 1, 1, RRD_ALGORITHM_ABSOLUTE);
rd_other = rrddim_add(st_memory, "other", NULL, 1, 1, RRD_ALGORITHM_ABSOLUTE);
}
@@ -342,7 +341,9 @@ static void global_statistics_charts(void) {
netdata_buffers_statistics.buffers_streaming +
netdata_buffers_statistics.cbuffers_streaming +
netdata_buffers_statistics.buffers_web +
- replication_allocated_buffers();
+ replication_allocated_buffers() +
+ aral_by_size_overhead() +
+ judy_aral_overhead();
size_t strings = 0;
string_statistics(NULL, NULL, NULL, NULL, NULL, &strings, NULL, NULL);
@@ -360,7 +361,8 @@ static void global_statistics_charts(void) {
rrddim_set_by_pointer(st_memory, rd_replication, (collected_number)dictionary_stats_memory_total(dictionary_stats_category_replication) + (collected_number)replication_allocated_memory());
rrddim_set_by_pointer(st_memory, rd_buffers, (collected_number)buffers);
rrddim_set_by_pointer(st_memory, rd_workers, (collected_number) workers_allocated_memory());
- rrddim_set_by_pointer(st_memory, rd_aral, (collected_number) aral_structures);
+ rrddim_set_by_pointer(st_memory, rd_aral, (collected_number) aral_by_size_structures());
+ rrddim_set_by_pointer(st_memory, rd_judy, (collected_number) judy_aral_structures());
rrddim_set_by_pointer(st_memory, rd_other, (collected_number)dictionary_stats_memory_total(dictionary_stats_category_other));
rrdset_done(st_memory);
@@ -381,6 +383,7 @@ static void global_statistics_charts(void) {
static RRDDIM *rd_buffers_replication = NULL;
static RRDDIM *rd_buffers_web = NULL;
static RRDDIM *rd_buffers_aral = NULL;
+ static RRDDIM *rd_buffers_judy = NULL;
if (unlikely(!st_memory_buffers)) {
st_memory_buffers = rrdset_create_localhost(
@@ -410,6 +413,7 @@ static void global_statistics_charts(void) {
rd_buffers_replication = rrddim_add(st_memory_buffers, "replication", NULL, 1, 1, RRD_ALGORITHM_ABSOLUTE);
rd_buffers_web = rrddim_add(st_memory_buffers, "web", NULL, 1, 1, RRD_ALGORITHM_ABSOLUTE);
rd_buffers_aral = rrddim_add(st_memory_buffers, "aral", NULL, 1, 1, RRD_ALGORITHM_ABSOLUTE);
+ rd_buffers_judy = rrddim_add(st_memory_buffers, "judy", NULL, 1, 1, RRD_ALGORITHM_ABSOLUTE);
}
rrddim_set_by_pointer(st_memory_buffers, rd_queries, (collected_number)netdata_buffers_statistics.query_targets_size + (collected_number) onewayalloc_allocated_memory());
@@ -424,7 +428,8 @@ static void global_statistics_charts(void) {
rrddim_set_by_pointer(st_memory_buffers, rd_cbuffers_streaming, (collected_number)netdata_buffers_statistics.cbuffers_streaming);
rrddim_set_by_pointer(st_memory_buffers, rd_buffers_replication, (collected_number)replication_allocated_buffers());
rrddim_set_by_pointer(st_memory_buffers, rd_buffers_web, (collected_number)netdata_buffers_statistics.buffers_web);
- rrddim_set_by_pointer(st_memory_buffers, rd_buffers_aral, (collected_number)(aral_malloc_allocated + aral_mmap_allocated) - (collected_number)(aral_malloc_used + aral_mmap_used));
+ rrddim_set_by_pointer(st_memory_buffers, rd_buffers_aral, (collected_number)aral_by_size_overhead());
+ rrddim_set_by_pointer(st_memory_buffers, rd_buffers_judy, (collected_number)judy_aral_overhead());
rrdset_done(st_memory_buffers);
}
@@ -1743,7 +1748,7 @@ static void dbengine2_statistics_charts(void) {
struct rrdeng_buffer_sizes buffers = rrdeng_get_buffer_sizes();
size_t buffers_total_size = buffers.handles + buffers.xt_buf + buffers.xt_io + buffers.pdc + buffers.descriptors +
- buffers.opcodes + buffers.wal + buffers.workers + buffers.epdl + buffers.deol + buffers.pd + buffers.pages;
+ buffers.opcodes + buffers.wal + buffers.workers + buffers.epdl + buffers.deol + buffers.pd + buffers.pgc + buffers.mrg;
#ifdef PDC_USE_JULYL
buffers_total_size += buffers.julyl;
@@ -1796,6 +1801,8 @@ static void dbengine2_statistics_charts(void) {
{
static RRDSET *st_pgc_buffers = NULL;
+ static RRDDIM *rd_pgc_buffers_pgc = NULL;
+ static RRDDIM *rd_pgc_buffers_mrg = NULL;
static RRDDIM *rd_pgc_buffers_opcodes = NULL;
static RRDDIM *rd_pgc_buffers_handles = NULL;
static RRDDIM *rd_pgc_buffers_descriptors = NULL;
@@ -1807,7 +1814,6 @@ static void dbengine2_statistics_charts(void) {
static RRDDIM *rd_pgc_buffers_epdl = NULL;
static RRDDIM *rd_pgc_buffers_deol = NULL;
static RRDDIM *rd_pgc_buffers_pd = NULL;
- static RRDDIM *rd_pgc_buffers_pages = NULL;
#ifdef PDC_USE_JULYL
static RRDDIM *rd_pgc_buffers_julyl = NULL;
#endif
@@ -1827,6 +1833,8 @@ static void dbengine2_statistics_charts(void) {
localhost->rrd_update_every,
RRDSET_TYPE_STACKED);
+ rd_pgc_buffers_pgc = rrddim_add(st_pgc_buffers, "pgc", NULL, 1, 1, RRD_ALGORITHM_ABSOLUTE);
+ rd_pgc_buffers_mrg = rrddim_add(st_pgc_buffers, "mrg", NULL, 1, 1, RRD_ALGORITHM_ABSOLUTE);
rd_pgc_buffers_opcodes = rrddim_add(st_pgc_buffers, "opcodes", NULL, 1, 1, RRD_ALGORITHM_ABSOLUTE);
rd_pgc_buffers_handles = rrddim_add(st_pgc_buffers, "query handles", NULL, 1, 1, RRD_ALGORITHM_ABSOLUTE);
rd_pgc_buffers_descriptors = rrddim_add(st_pgc_buffers, "descriptors", NULL, 1, 1, RRD_ALGORITHM_ABSOLUTE);
@@ -1834,7 +1842,6 @@ static void dbengine2_statistics_charts(void) {
rd_pgc_buffers_workers = rrddim_add(st_pgc_buffers, "workers", NULL, 1, 1, RRD_ALGORITHM_ABSOLUTE);
rd_pgc_buffers_pdc = rrddim_add(st_pgc_buffers, "pdc", NULL, 1, 1, RRD_ALGORITHM_ABSOLUTE);
rd_pgc_buffers_pd = rrddim_add(st_pgc_buffers, "pd", NULL, 1, 1, RRD_ALGORITHM_ABSOLUTE);
- rd_pgc_buffers_pages = rrddim_add(st_pgc_buffers, "pages", NULL, 1, 1, RRD_ALGORITHM_ABSOLUTE);
rd_pgc_buffers_xt_io = rrddim_add(st_pgc_buffers, "extent io", NULL, 1, 1, RRD_ALGORITHM_ABSOLUTE);
rd_pgc_buffers_xt_buf = rrddim_add(st_pgc_buffers, "extent buffers", NULL, 1, 1, RRD_ALGORITHM_ABSOLUTE);
rd_pgc_buffers_epdl = rrddim_add(st_pgc_buffers, "epdl", NULL, 1, 1, RRD_ALGORITHM_ABSOLUTE);
@@ -1845,6 +1852,8 @@ static void dbengine2_statistics_charts(void) {
}
priority++;
+ rrddim_set_by_pointer(st_pgc_buffers, rd_pgc_buffers_pgc, (collected_number)buffers.pgc);
+ rrddim_set_by_pointer(st_pgc_buffers, rd_pgc_buffers_mrg, (collected_number)buffers.mrg);
rrddim_set_by_pointer(st_pgc_buffers, rd_pgc_buffers_opcodes, (collected_number)buffers.opcodes);
rrddim_set_by_pointer(st_pgc_buffers, rd_pgc_buffers_handles, (collected_number)buffers.handles);
rrddim_set_by_pointer(st_pgc_buffers, rd_pgc_buffers_descriptors