diff --git a/config/config.md b/config/config.md index caa7dbf64aee..765fd8dd87b4 100644 --- a/config/config.md +++ b/config/config.md @@ -61,7 +61,7 @@ | `wal` | -- | -- | The WAL options. | | `wal.provider` | String | `raft_engine` | The provider of the WAL.
- `raft_engine`: the wal is stored in the local file system by raft-engine.
- `kafka`: it's remote wal that data is stored in Kafka. | | `wal.dir` | String | Unset | The directory to store the WAL files.
**It's only used when the provider is `raft_engine`**. | -| `wal.file_size` | String | `256MB` | The size of the WAL segment file.
**It's only used when the provider is `raft_engine`**. | +| `wal.file_size` | String | `128MB` | The size of the WAL segment file.
**It's only used when the provider is `raft_engine`**. | | `wal.purge_threshold` | String | `1GB` | The threshold of the WAL size to trigger a flush.
**It's only used when the provider is `raft_engine`**. | | `wal.purge_interval` | String | `1m` | The interval to trigger a flush.
**It's only used when the provider is `raft_engine`**. | | `wal.read_batch_size` | Integer | `128` | The read batch size.
**It's only used when the provider is `raft_engine`**. | @@ -399,7 +399,7 @@ | `wal` | -- | -- | The WAL options. | | `wal.provider` | String | `raft_engine` | The provider of the WAL.
- `raft_engine`: the wal is stored in the local file system by raft-engine.
- `kafka`: it's remote wal that data is stored in Kafka. | | `wal.dir` | String | Unset | The directory to store the WAL files.
**It's only used when the provider is `raft_engine`**. | -| `wal.file_size` | String | `256MB` | The size of the WAL segment file.
**It's only used when the provider is `raft_engine`**. | +| `wal.file_size` | String | `128MB` | The size of the WAL segment file.
**It's only used when the provider is `raft_engine`**. | | `wal.purge_threshold` | String | `1GB` | The threshold of the WAL size to trigger a flush.
**It's only used when the provider is `raft_engine`**. | | `wal.purge_interval` | String | `1m` | The interval to trigger a flush.
**It's only used when the provider is `raft_engine`**. | | `wal.read_batch_size` | Integer | `128` | The read batch size.
**It's only used when the provider is `raft_engine`**. | diff --git a/config/datanode.example.toml b/config/datanode.example.toml index 5e4ddabb53dd..088980218891 100644 --- a/config/datanode.example.toml +++ b/config/datanode.example.toml @@ -142,7 +142,7 @@ dir = "/tmp/greptimedb/wal" ## The size of the WAL segment file. ## **It's only used when the provider is `raft_engine`**. -file_size = "256MB" +file_size = "128MB" ## The threshold of the WAL size to trigger a flush. ## **It's only used when the provider is `raft_engine`**. diff --git a/config/standalone.example.toml b/config/standalone.example.toml index 137a73c55e97..480286349427 100644 --- a/config/standalone.example.toml +++ b/config/standalone.example.toml @@ -147,7 +147,7 @@ dir = "/tmp/greptimedb/wal" ## The size of the WAL segment file. ## **It's only used when the provider is `raft_engine`**. -file_size = "256MB" +file_size = "128MB" ## The threshold of the WAL size to trigger a flush. ## **It's only used when the provider is `raft_engine`**. diff --git a/src/common/wal/src/config/raft_engine.rs b/src/common/wal/src/config/raft_engine.rs index 15adf195c4b2..cfefd0c758b7 100644 --- a/src/common/wal/src/config/raft_engine.rs +++ b/src/common/wal/src/config/raft_engine.rs @@ -49,7 +49,7 @@ impl Default for RaftEngineConfig { fn default() -> Self { Self { dir: None, - file_size: ReadableSize::mb(256), + file_size: ReadableSize::mb(128), purge_threshold: ReadableSize::gb(1), purge_interval: Duration::from_secs(60), read_batch_size: 128, diff --git a/tests-integration/tests/http.rs b/tests-integration/tests/http.rs index 42b5c441f8fb..056cdc5481d2 100644 --- a/tests-integration/tests/http.rs +++ b/tests-integration/tests/http.rs @@ -881,7 +881,7 @@ with_metric_engine = true [wal] provider = "raft_engine" -file_size = "256MiB" +file_size = "128MiB" purge_threshold = "1GiB" purge_interval = "1m" read_batch_size = 128