TSI index and open files limit, release 5.3.0 #5
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/tsi-index-open-files-4"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #4.
Adopts the parts of upstream v6.0.0 (hassio-addons/app-influxdb#417) that touch the InfluxDB server this fork keeps. Chronograf, Kapacitor, ports and nginx parts do not apply.
Changes
index-version = "tsi1"ininfluxdb.conf.ulimits: nofile: 65535inconfig.yaml(needs Supervisor 2025.10 or newer; the Supervisor add-on schema usesREMOVE_EXTRA, so an older one drops the key instead of rejecting the add-on). Because of that, the run script also raises the soft limit up to the hard limit if it is lower, and logsOpen files limit: Nat start.DOCS.md: what the TSI setting does to existing data, how to convert, the open files limit.What I tested (InfluxDB 1.13.2, the same package the Dockerfile installs)
I did not take the upstream PR text on trust, because the issue says switching the index on an existing data dir is a decision. On a data dir created with the current config (3 shards, in-memory index):
tsi1Mixed shard index typesindexdir), the new shard gets oneinflux_inspect buildtsi -datadir ... -waldir ...with influxd stopped, run as the same non-root userTSI rebuild completed successfully, every shard now has anindexdir; data and series counts unchanged; no mixed warning afterwardsThe memory benefit therefore only reaches shards created after the update until the old ones are converted. Numbers for a real data volume (conversion time, extra disk) are not measured; the test dataset is tiny (data dir 244 KB before, 472 KB after conversion, which is not representative).
The run script was executed for real (stub
bashio, stubinfluxdreporting its inherited limit) underdocker --ulimit nofile=:1024:1048576(the HAOS 16 case) -> 65535;1024:4096-> 4096;65535:65535and200000:200000unchanged (never lowered);1024:1024stays 1024 without a warning.influxd configon the repo file showsindex-version = "tsi1", and thecont-init.dseds leave it alone. The add-on image builds locally (amd64 base) with the run script executable and the new line in place; the CI workflow builds aarch64 without pushing.Not tested: a real Supervisor (the
ulimitsoption's effect on the container), and a real Home Assistant OS.Deploy note (not part of this PR)
Releasing this deploys nothing. Updating the add-on on a Home Assistant instance with existing data starts with the mixed index state above and is safe; converting is a separate, optional step that needs the add-on stopped.
🤖 Generated with Claude Code