summaryrefslogtreecommitdiffstats
path: root/ml
diff options
context:
space:
mode:
authorvkalintiris <vasilis@netdata.cloud>2023-04-22 22:09:27 +0300
committerGitHub <noreply@github.com>2023-04-22 22:09:27 +0300
commit8a31fd88b9b9d3d178a69dfa8edd82f8ee758edc (patch)
tree0c1b7126f1def322ef55898c4b0cdfc904ea3e15 /ml
parentde2c614a68d74d93c79fc7be7571c2daddaca0e6 (diff)
Disable SQL operations in training thread (#14947)
This is a temporary change until we figure out why sqlite degrades the performance of training threads significantly. To keep the number of changes to a minimum, a connection is still opened/closed when initializing/finalizing the ML component.
Diffstat (limited to 'ml')
-rw-r--r--ml/ml.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/ml/ml.cc b/ml/ml.cc
index 405c03928d..05dc6514f9 100644
--- a/ml/ml.cc
+++ b/ml/ml.cc
@@ -707,12 +707,16 @@ ml_dimension_train_model(ml_training_thread_t *training_thread, ml_dimension_t *
{
netdata_mutex_lock(&dim->mutex);
+ // temporarily disable sqlite operations because they interfere with
+ // training scheduling on busy parents
+ #if 0
worker_is_busy(WORKER_TRAIN_LOAD_MODELS);
int rc = ml_dimension_update_models(dim);
if (rc) {
error("Failed to update models for %s [%u, %u]", rrddim_id(dim->rd), dim->kmeans.after, dim->kmeans.before);
}
+ #endif
worker_is_busy(WORKER_TRAIN_UPDATE_MODELS);