diff options
author | Costa Tsaousis <costa@netdata.cloud> | 2023-04-07 21:25:01 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-07 21:25:01 +0300 |
commit | 204dd9ae272445d13f308badb07e99675fa34892 (patch) | |
tree | f42e873c60219b5031dcfc3e076adb2398cdb3fe /ml/ml.cc | |
parent | 61925baaf6e2448c641e8e71248a47f7a01c4efd (diff) |
Boost dbengine (#14832)
* configure extent cache size
* workers can now execute up to 10 jobs in a run, boosting query prep and extent reads
* fix dispatched and executing counters
* boost to the max
* increase libuv worker threads
* query prep always get more prio than extent reads; stop processing in batch when dbengine is queue is critical
* fix accounting of query prep
* inlining of time-grouping functions, to speed up queries with billions of points
* make switching based on a local const variable
* print one pending contexts loading message per iteration
* inlined store engine query API
* inlined storage engine data collection api
* inlined all storage engine query ops
* eliminate and inline data collection ops
* simplified query group-by
* more error handling
* optimized partial trimming of group-by queries
* preparative work to support multiple passes of group-by
* more preparative work to support multiple passes of group-by (accepts multiple group-by params)
* unified query timings
* unified query timings - weights endpoint
* query target is no longer a static thread variable - there is a list of cached query targets, each of which of freed every 1000 queries
* fix query memory accounting
* added summary.dimension[].pri and sorted summary.dimensions based on priority and then name
* limit max ACLK WEB response size to 30MB
* the response type should be text/plain
* more preparative work for multiple group-by passes
* create functions for generating group by keys, ids and names
* multiple group-by passes are now supported
* parse group-by options array also with an index
* implemented percentage-of-instance group by function
* family is now merged in multi-node contexts
* prevent uninitialized use
Diffstat (limited to 'ml/ml.cc')
-rw-r--r-- | ml/ml.cc | 13 |
1 files changed, 5 insertions, 8 deletions
@@ -341,24 +341,21 @@ ml_dimension_calculated_numbers(ml_dimension_t *dim, const ml_training_request_t /* * Execute the query */ - struct storage_engine_query_ops *ops = dim->rd->tiers[0].query_ops; struct storage_engine_query_handle handle; - ops->init(dim->rd->tiers[0].db_metric_handle, - &handle, - training_response.query_after_t, - training_response.query_before_t, + storage_engine_query_init(dim->rd->tiers[0].backend, dim->rd->tiers[0].db_metric_handle, &handle, + training_response.query_after_t, training_response.query_before_t, STORAGE_PRIORITY_BEST_EFFORT); size_t idx = 0; memset(tls_data.training_cns, 0, sizeof(calculated_number_t) * max_n * (Cfg.lag_n + 1)); calculated_number_t last_value = std::numeric_limits<calculated_number_t>::quiet_NaN(); - while (!ops->is_finished(&handle)) { + while (!storage_engine_query_is_finished(&handle)) { if (idx == max_n) break; - STORAGE_POINT sp = ops->next_metric(&handle); + STORAGE_POINT sp = storage_engine_query_next_metric(&handle); time_t timestamp = sp.end_time_s; calculated_number_t value = sp.sum / sp.count; @@ -376,7 +373,7 @@ ml_dimension_calculated_numbers(ml_dimension_t *dim, const ml_training_request_t idx++; } - ops->finalize(&handle); + storage_engine_query_finalize(&handle); global_statistics_ml_query_completed(/* points_read */ idx); |