Skip to content

Commit 8af7c0e

Browse files
committed
PS-9721 Improve documentation on MyRocks variables (8.0)
On branch ps-9822 modified: docs/variables.md
1 parent c0e355c commit 8af7c0e

File tree

1 file changed

+21
-2
lines changed

1 file changed

+21
-2
lines changed

docs/variables.md

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1488,11 +1488,30 @@ The variable was implemented in [Percona Server for MySQL 8.0.20-11](release-not
14881488
| Data type | Boolean |
14891489
| Default | OFF |
14901490

1491+
#### Version changes
1492+
14911493
The variable was implemented in [Percona Server for MySQL 8.0.25-15](release-notes/Percona-Server-8.0.25-15.md#id1).
14921494

1493-
DBOptions::enable_pipelined_write for RocksDB.
1495+
#### Improving Write Throughput with Pipelined Writes
1496+
1497+
This option maps directly to RocksDB’s `DBOptions::enable_pipelined_write`. For details, see the [RocksDB documentation on Pipelined Write](https://github.com/facebook/rocksdb/wiki/Pipelined-Write).
1498+
1499+
In database systems, concurrency means that multiple operations can run simultaneously. By default, write operations are handled in order using a single thread queue. The first thread in line becomes the leader and performs the write to both the Write-Ahead Log (WAL) and the memtable, one after the other. This setup limits the number of writes that can happen simultaneously.
1500+
1501+
The pipelined write feature allows WAL and memtable writes to happen in parallel. When `rocksdb_enable_pipelined_write` is set to `ON`, RocksDB uses separate threads for writing to the Write-Ahead Log (WAL) and the memtable. A thread waits in the WAL queue and then moves to the memtable queue. In the WAL queue, each thread waits only for earlier WAL writes to finish. They do not wait for memtable updates.
1502+
1503+
This setup allows WAL and memtable operations to run in parallel. It improves write throughput and can reduce latency during the prepare phase of a two phase commit.
1504+
1505+
#### When to enable pipelined writes
1506+
1507+
Pipelined writes are disabled by default. You should consider enabling enable_pipelined_write in MyRocks under the following conditions:
14941508

1495-
If `enable_pipelined_write` is `ON`, a separate write thread is maintained for WAL write and memtable write. A write thread first enters the WAL writer queue and then the memtable writer queue. A pending thread on the WAL writer queue only waits for the previous WAL write operations but does not wait for memtable write operations. Enabling the feature may improve write throughput and reduce latency of the prepare phase of a two-phase commit.
1509+
| Condition | Description |
1510+
|------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------|
1511+
| High concurrent write workloads | If your application involves many concurrent writers, pipelined writes, which overlap WAL and memtable writes, can improve throughput. |
1512+
| Write-Ahead logging (WAL) is enabled | This feature only applies when WAL is enabled. Enabling pipelined writes has no effect if you’re not using WAL. |
1513+
| Lower latency for transactions | Particularly beneficial in reducing latency during the prepare phase of two-phase commits (2PC), which is critical in transactional workloads. |
1514+
| WAL writes are a bottleneck | If profiling shows that waiting for WAL writes limits your write throughput, pipelined writes can help by decoupling WAL and memtable operations. |
14961515

14971516
### `rocksdb_enable_remove_orphaned_dropped_cfs`
14981517

0 commit comments

Comments
 (0)