diff options
author | Costa Tsaousis <costa@netdata.cloud> | 2023-01-20 00:50:42 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-20 00:50:42 +0200 |
commit | 9232bfb6a072155388578dc4e1338c6002afb515 (patch) | |
tree | dc85f9bfe3ed97394e6f2a92a2f710796d6d8979 /exporting/opentsdb | |
parent | 86538b005de50f23c9ff66542abab11683b85c06 (diff) |
track memory footprint of Netdata (#14294)
* track memory footprint of Netdata
* track db modes alloc/ram/save/map
* track system info; track sender and receiver
* fixes
* more fixes
* track workers memory, onewayalloc memory; unify judyhs size estimation
* track replication structures and buffers
* Properly clear host RRDHOST_FLAG_METADATA_UPDATE flag
* flush the replication buffer every 1000 times the circular buffer is found empty
* dont take timestamp too frequently in sender loop
* sender buffers are not used by the same thread as the sender, so they were never recreated - fixed it
* free sender thread buffer on replication threads when replication is idle
* use the last sender flag as a timestamp of the last buffer recreation
* free cbuffer before reconnecting
* recreate cbuffer on every flush
* timings for journal v2 loading
* inlining of metric and cache functions
* aral likely/unlikely
* free left-over thread buffers
* fix NULL pointer dereference in replication
* free sender thread buffer on sender thread too
* mark ctx as used before flushing
* better logging on ctx datafiles closing
Co-authored-by: Stelios Fragkakis <52996999+stelfrag@users.noreply.github.com>
Diffstat (limited to 'exporting/opentsdb')
-rw-r--r-- | exporting/opentsdb/opentsdb.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/exporting/opentsdb/opentsdb.c b/exporting/opentsdb/opentsdb.c index a974c12645..fc01ae4611 100644 --- a/exporting/opentsdb/opentsdb.c +++ b/exporting/opentsdb/opentsdb.c @@ -45,7 +45,7 @@ int init_opentsdb_telnet_instance(struct instance *instance) instance->prepare_header = NULL; instance->check_response = exporting_discard_response; - instance->buffer = (void *)buffer_create(0); + instance->buffer = (void *)buffer_create(0, &netdata_buffers_statistics.buffers_exporters); if (!instance->buffer) { error("EXPORTING: cannot create buffer for opentsdb telnet exporting connector instance %s", instance->config.name); return 1; @@ -102,7 +102,7 @@ int init_opentsdb_http_instance(struct instance *instance) instance->prepare_header = opentsdb_http_prepare_header; instance->check_response = exporting_discard_response; - instance->buffer = (void *)buffer_create(0); + instance->buffer = (void *)buffer_create(0, &netdata_buffers_statistics.buffers_exporters); if (!instance->buffer) { error("EXPORTING: cannot create buffer for opentsdb HTTP exporting connector instance %s", instance->config.name); return 1; @@ -150,7 +150,7 @@ void sanitize_opentsdb_label_value(char *dst, const char *src, size_t len) int format_host_labels_opentsdb_telnet(struct instance *instance, RRDHOST *host) { if(!instance->labels_buffer) - instance->labels_buffer = buffer_create(1024); + instance->labels_buffer = buffer_create(1024, &netdata_buffers_statistics.buffers_exporters); if (unlikely(!sending_labels_configured(instance))) return 0; @@ -283,7 +283,7 @@ void opentsdb_http_prepare_header(struct instance *instance) int format_host_labels_opentsdb_http(struct instance *instance, RRDHOST *host) { if (!instance->labels_buffer) - instance->labels_buffer = buffer_create(1024); + instance->labels_buffer = buffer_create(1024, &netdata_buffers_statistics.buffers_exporters); if (unlikely(!sending_labels_configured(instance))) return 0; |