influxdata / influxdata/influxdb
data import is extremely slow
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 31.7k
- Forks
- 3.7k
- Avg merge
- 13h 37m
- Merged PRs (30d)
- 8
Description
No matter what I do, I can't get it to go above 5000 lines per second. Seems to be a hard limit somewhere. I have a large ~(2.5TB) dataset already in tsm files from an older version of influxdb that I am trying to export to influxdb line protocol so I can load it into a new database via influx -import. I have spent a lot of time trying to troubleshoot the performance of the target influxDB, but it seems that the bottleneck is with the data import itself.
For example, when running the export to count the lines output, I get 100k+ lines/second:
`influx_inspect export -datadir=/mnt/influxdb/data/ -waldir /mnt/influxdb/wal/ -out /dev/stdout | pv --line-mode --rate >/dev/null`
`[115k/s]`
When importing data in, it is capped at 5k/sec:
`influx_inspect export -datadir=/mnt/influxdb/data/ -waldir /mnt/influxdb/data/ -out ./data && cat ./data | pv --line-mode --rate | influx -import -path /dev/stdin`
`[ 5k/s]`
At 5000/sec it is going to take weeks to import the data. Is there a faster way?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the reported commands using influx_inspect export and influx -import, comparing the export rate with the import rate. Trace where the import path becomes limited and document a measured improvement or a confirmed bottleneck, using the large TSM dataset or a representative reproduction.
Written by the indexing model from the issue text.
Assessment
- Domain
- databases, performance
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100