Skip to content

Commit

Permalink
docs: add a bit more notes for FSTree
Browse files Browse the repository at this point in the history
These are important for configuring it properly.

Signed-off-by: Roman Khimov <[email protected]>
  • Loading branch information
roman-khimov committed Nov 28, 2024
1 parent 28a224b commit 11f083c
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions docs/storage-node-configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -203,13 +203,23 @@ blobstor:
| `flush_interval` | `duration` | `10ms` | Time interval between batch writes to disk. |

#### `fstree` type options
FSTree stores objects using file system provided by OS. It uses a hierarchy of
directories (tree) based on object ID, directory nesting level is controlled by
depth. To optimize writing performance for small object it can also combine
multiple objects into a single file, this behavior can be controlled as well.

The default FSTree settings are optimized for HDD and small files. In case of
deploying to SSD combined writer is recommended to be disabled completely
(combined_count_limit=1). For medium/large files or smaller drives depth is
recommended to be adjusted to 3 or even lower values. Larger values are only
relevant for big volumes with very high number of stored objects.
| Parameter | Type | Default value | Description |
|---------------------------|-----------|---------------|------------------------------------------------------------------------------------------------------------------------------|
| `path` | `string` | | Path to the root of the blobstor. |
| `perm` | file mode | `0640` | Default permission for created files and directories. |
| `depth` | `int` | `4` | File-system tree depth. |
| `no_sync` | `bool` | `false` | Disable write synchronization, makes writes faster, but can lead to data loss. |
| `combined_count_limit` | `int` | `128` | Maximum number of objects to write into a single file, 0 or 1 disables combined writing (disabling is recommended for SSDs). |
| `depth` | `int` | `4` | File-system tree depth. Optimal value depends on the number of objects stored in this shard, the number of lower-level directories used by FSTree is 58^depth, with depth 3 this is ~200K, with 4 --- ~11M |
| `no_sync` | `bool` | `false` | Disable write synchronization, makes writes faster, but can lead to data loss. Not recommended for production use. |
| `combined_count_limit` | `int` | `128` | Maximum number of objects to write into a single file, 0 or 1 disables combined writing (which is recommended for SSDs). |
| `combined_size_limit` | `size` | `8M` | Maximum size of a multi-object file. |
| `combined_size_threshold` | `size` | `128K` | Minimum size of object that won't be combined with others when writing to disk. |

Expand Down

0 comments on commit 11f083c

Please sign in to comment.