Skip to main content
Version: Nightly

Local WAL

This section describes how to configure the local WAL for GreptimeDB Datanode component.

[wal]
provider = "raft_engine"
file_size = "128MB"
purge_threshold = "1GB"
purge_interval = "1m"
read_batch_size = 128
sync_write = false

Options

If you are using Helm Chart to deploy GreptimeDB, you can refer to Common Helm Chart Configurations to learn how to configure the Datanode by injecting configuration files.

Configuration OptionDescriptionDefault Value
providerThe provider of the WAL. Options: raft_engine (local file system storage) or kafka (remote WAL storage in Kafka)"raft_engine"
dirThe directory where to write logs{data_home}/wal
file_sizeThe size of single WAL log file128MB
purge_thresholdThe threshold of the WAL size to trigger purging1GB
purge_intervalThe interval to trigger purging1m
read_batch_sizeThe read batch size128
sync_writeWhether to call fsync when writing every logfalse

Best practices

Using a separate High-Performance Volume for WAL

It is beneficial to configure a separate volume for the WAL (Write-Ahead Log) directory when deploying GreptimeDB. This setup allows you to:

  • Leverage a high-performance disk—either a dedicated physical volume or one provisioned via a custom StorageClass.
  • Isolate WAL I/O from cache file access, reducing I/O contention and enhancing overall system performance.

If you are using Helm Chart to deploy GreptimeDB, you can refer to Common Helm Chart Configurations to learn how to configure a dedicated WAL volume.