profile
viewpoint

Ask questionsHow to write data to VictoriaMetrics individually in batches?

Hi! I want to use the TSBS tool(https://github.com/timescale/tsbs) to do a comparison between VictoriaMetrics and ClickHouse,but it seems that VictoriaMetrics does not provide an HTTP API for bulk insertion. Currently the generated data with InfluxDB line protocol format was just written into VictoriaMetrics row by row,with very poor efficiency.Is there any Http API that supports batch writing data to VictoriaMetrics?

VictoriaMetrics/VictoriaMetrics

Answer questions valyala

All the ingestion methods - Influx line protocol, Graphite plaintext protocol, OpenTSDB put protocol and Prometheus remote write API protocol - support batch inserts - just send batches containing multiple rows to VictoriaMetrics. tsbs_load_influx app has -batch-size command-line arg for setting the number of rows to send in a single batch. By default it is equal to 10000.

Do not forget setting -workers arg to the number of cpu cores where tsbs_load_influx runs in order to achieve the maximum performance. Higher performance may be achieved by disabling gzip compression on the ingested data with -gzip=false command-line flag.

See Setup section in this article for more details.

useful!
source:https://uonfu.com/
Github User Rank List