@cryptotaxi247 / netdata-1 / commits / 8a31fd88b

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.

vkalintiris committed Apr 22, 2023 at 22:09 UTC 8a31fd88b9b9d3d178a69dfa8edd82f8ee758edc
1 file changed +4
ml/ml.cc
+4
@@ -707,12 +707,16 @@ ml_dimension_train_model(ml_training_thread_t *training_thread, ml_dimension_t *
707 {
708 netdata_mutex_lock(&dim->mutex);
709
710 + // temporarily disable sqlite operations because they interfere with
711 + // training scheduling on busy parents
712 + #if 0
713 worker_is_busy(WORKER_TRAIN_LOAD_MODELS);
714
715 int rc = ml_dimension_update_models(dim);
716 if (rc) {
717 error("Failed to update models for %s [%u, %u]", rrddim_id(dim->rd), dim->kmeans.after, dim->kmeans.before);
718 }
719 + #endif
720
721 worker_is_busy(WORKER_TRAIN_UPDATE_MODELS);
722