influxdata / influxdata/influxdb-java

BatchProcessor, going single to multithread ?

Ouverte
#356 1 commentaire 0 réactions 0 personnes assignées Voir sur GitHub
Langage dominant
Java
Étoiles
1.2k
Forks
469
Métriques de merge des PR
Aucune PR mergée en 30 j

Description

Using influxdb-java on a 4core/8thread machine to connect to a remote InfluxDB (located in the same DC), I experience very high CPU usage for the thread responsible for the BatchProcessor and suspect we could benefit from having BatchProcess use several threads.

It looks like all batched points go to a unique queue in the BatchProcessor instance and that a singleThreadScheduledExecutor() is responsible for dequeuing them.

My setup is not CPU bound (as shown by htop), nor memory nor network bound. Do you think allowing parallel queuing/unqueuing would increase capacity of influxdb-java to flush its data ?

I'm thinking about having a configurable number of queues (let's call it N), one singleThreadScheduledExecutor() each. Because the data is shared nothing we could make the batchProcess queue the data in a round-robin way, and then have their respective scheduleExecutor do the job.

Does this make sense ? Do you think is is worth ?

Guide de contribution

Aucun guide de contribution indexé pour ce dépôt

Piste de recherche

Commencez par lire l’implémentation de BatchProcessor et le chemin singleThreadScheduledExecutor décrit dans l’issue. Déterminez si des files d’attente et des exécuteurs parallèles configurables sont réalisables sans modifier le comportement du batching, puis définissez des mesures ou des tests qui montreraient si la modification augmente la capacité de flush.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
java
Domaine
backend
Type d'issue
Fonctionnalité
Difficulté
5/5
Temps estimé
Plus d'une semaine
Activité
À l'abandon
Clarté
À clarifier
Accessibilité débutants
25/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.