docs: add per-region write buffer docs (write_buffer_size, default_region_write_buffer_size) - #2639
Conversation
Deploying greptime-docs with
|
| Latest commit: |
3af2efa
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://64fc03f6.greptime-docs.pages.dev |
| Branch Preview URL: | https://codex-github-mention-update-o3z3.greptime-docs.pages.dev |
Signed-off-by: evenyag <realevenyag@gmail.com>
Signed-off-by: evenyag <realevenyag@gmail.com>
Signed-off-by: evenyag <realevenyag@gmail.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3af2efa296
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
|
||
| In most cases, leave `region_engine.mito.global_write_buffer_reject_size` unset so GreptimeDB uses the default reject threshold of 2x `global_write_buffer_size`. If you need writes to fail earlier under memory pressure, set it manually to a deliberate margin, commonly 1.5x to 2x `global_write_buffer_size`, based on available datanode memory and how early you want requests to be rejected. The value must be greater than `global_write_buffer_size`; otherwise, GreptimeDB sanitizes it back to 2x. | ||
|
|
||
| For hot-region protection, configure a per-table `write_buffer_size` or set `region_engine.mito.default_region_write_buffer_size` as the cluster default. The effective value is the stall threshold: GreptimeDB schedules a flush when mutable memtable usage reaches half the value, stalls writes at the value, and rejects writes at twice the value, while other regions on the same worker can continue accepting writes. A table-level `write_buffer_size` takes precedence over the engine default. An explicit table value of `0` disables the per-region limit, while unsetting the table option falls back to the engine default. The default value of `default_region_write_buffer_size` is `0`, which disables default per-region limits. |
There was a problem hiding this comment.
Mirror write-buffer limits in agent skills
In the AI-agent workflow, this new hot-region guidance is not picked up by the installable performance skills: skills/greptimedb-performance-tuning/SKILL.md still tells agents to address healthy write-buffer pressure by increasing only region_engine.mito.global_write_buffer_size, and skills/greptimedb-performance-diagnosis/SKILL.md still describes stalls/rejects only in terms of the global buffer. Because skills/README.md publishes those as GreptimeDB documentation for AI agents, users who follow the skills for write stalls can still be advised to raise the global buffer instead of setting write_buffer_size/default_region_write_buffer_size for hot regions.
Useful? React with 👍 / 👎.
Motivation
Description
write_buffer_sizetable option toCREATE TABLEandALTER TABLEdocs withSET/UNSETexamples.0, which disables the per-region limit, fromUNSET, which falls back todefault_region_write_buffer_size.default_region_write_buffer_sizeto theregion_engine.mitoexample and option table, and update the performance-tuning guidance for hot-region protection.versioned_docs/version-1.1remains unchanged.Testing
git diff --checksuccessfully.typoson all eight modified Markdown files successfully.UNSET 'write_buffer_size'example remains.versioned_docs/version-1.1has no changes in this PR.Codex Task