You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Description of Changes
Adds the commitlog knobs `max_segment_size`, `write_buffer_size`, and
`preallocate_segments` to the server's `config.toml`. There are other
seemingly more advanced knobs that I did not add at this time.
This patch also increases the `DEFAULT_WRITE_BUFFER_SIZE` from `8KiB` to
`128KiB` to optimize high throughput workloads like the keynote-2
benchmark.
# API and ABI breaking changes
None
# Expected complexity level and risk
1
# Testing
Manual
Copy file name to clipboardExpand all lines: docs/docs/00300-resources/00200-reference/00100-cli-reference/00200-standalone-config.md
+54Lines changed: 54 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,6 +18,10 @@ On Linux and macOS, this directory is by default `~/.local/share/spacetime/data`
18
18
19
19
-[`logs`](#logs)
20
20
21
+
-[`commitlog`](#commitlog)
22
+
23
+
-[`websocket`](#websocket)
24
+
21
25
### `certificate-authority`
22
26
23
27
```toml
@@ -47,6 +51,56 @@ Can be one of `"error"`, `"warn"`, `"info"`, `"debug"`, `"trace"`, or `"off"`, c
47
51
48
52
A list of filtering directives controlling what messages get logged, which overwrite the global [`logs.level`](#logslevel). See [`tracing documentation`](https://docs.rs/tracing-subscriber/0.3/tracing_subscriber/filter/struct.EnvFilter.html#directives) for syntax. Note that this is primarily intended as a debugging tool, and log message fields and targets are not considered stable.
49
53
54
+
### `commitlog`
55
+
56
+
```toml
57
+
[commitlog]
58
+
log-format-version = 1
59
+
max-segment-size = 1073741824# 1GiB
60
+
offset-index-interval-bytes = 4096
61
+
offset-index-require-segment-fsync = true
62
+
preallocate-segments = false
63
+
write-buffer-size = 131072# 128KiB
64
+
```
65
+
66
+
The `commitlog` table configures local durability. These settings are advanced and may affect recovery behavior, disk usage, memory usage, and write throughput. Omitted fields use the server's built-in defaults.
67
+
68
+
#### `commitlog.log-format-version`
69
+
70
+
The maximum supported commitlog format version, also used for writing.
71
+
72
+
::::caution
73
+
This setting should not normally be changed from the commitlog crate's default. A reason to change it could be to make the server accept an older, incompatible commitlog.
74
+
::::
75
+
76
+
#### `commitlog.max-segment-size`
77
+
78
+
The maximum size in bytes to which commitlog segments should be allowed to grow.
79
+
80
+
#### `commitlog.offset-index-interval-bytes`
81
+
82
+
Number of bytes written to the commitlog after which an entry is added to the offset index.
If `true`, require that the segment must be synced to disk before an index entry is added.
87
+
88
+
Setting this to `false` will update the index every `offset-index-interval-bytes`, even if the commitlog was not synced. This means that the index could contain non-existent entries in the event of a crash.
89
+
90
+
Setting this to `true` will update the index when the commitlog is synced, and `offset-index-interval-bytes` have been written. This means that the index could contain fewer index entries than strictly every `offset-index-interval-bytes`.
91
+
92
+
::::note
93
+
The commitlog operates correctly under both settings, but the choice can have performance implications.
94
+
::::
95
+
96
+
#### `commitlog.preallocate-segments`
97
+
98
+
If `true`, preallocate disk space for commitlog segments up to `commitlog.max-segment-size`. This has no effect unless commitlog fallocate support is enabled.
99
+
100
+
#### `commitlog.write-buffer-size`
101
+
102
+
Size in bytes of the memory buffer holding commit data before flushing to storage.
0 commit comments