Skip to content

Instantly share code, notes, and snippets.

@descrepes
Created October 30, 2015 10:31
Show Gist options
  • Save descrepes/aec2717d194f0b53e35e to your computer and use it in GitHub Desktop.
Save descrepes/aec2717d194f0b53e35e to your computer and use it in GitHub Desktop.
Data part of influxdb.conf (wal setup)
[data]
dir = "/var/opt/influxdb/data"
# Controls the engine type for new shards. Options are b1, bz1, or tsm1.
# b1 is the 0.9.2 storage engine, bz1 is the 0.9.3 and 0.9.4 engine.
# tsm1 is the 0.9.5 engine
engine ="tsm1"
# The following WAL settings are for the b1 storage engine used in 0.9.2. They won't
# apply to any new shards created after upgrading to a version > 0.9.3.
max-wal-size = 104857600 # Maximum size the WAL can reach before a flush. Defaults to 100MB.
wal-flush-interval = "10m" # Maximum time data can sit in WAL before a flush.
wal-partition-flush-delay = "2s" # The delay time between each WAL partition being flushed.
# These are the WAL settings for the storage engine >= 0.9.3
wal-dir = "/var/opt/influxdb/wal"
wal-enable-logging = true
# When a series in the WAL in-memory cache reaches this size in bytes it is marked as ready to
# flush to the index
#wal-ready-series-size = 25600
wal-ready-series-size = 102400
# Flush and compact a partition once this ratio of series are over the ready size
wal-compaction-threshold = 0.6
# Force a flush and compaction if any series in a partition gets above this size in bytes
#wal-max-series-size = 2097152
wal-max-series-size = 8388608
# Force a flush of all series and full compaction if there have been no writes in this
# amount of time. This is useful for ensuring that shards that are cold for writes don't
# keep a bunch of data cached in memory and in the WAL.
wal-flush-cold-interval = "5m"
# Force a partition to flush its largest series if it reaches this approximate size in
# bytes. Remember there are 5 partitions so you'll need at least 5x this amount of memory.
# The more memory you have, the bigger this can be.
#wal-partition-size-threshold = 20971520
wal-partition-size-threshold = 83886080
# Whether queries should be logged before execution. Very useful for troubleshooting, but will
# log any sensitive data contained within a query.
query-log-enabled = true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment