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
Copy file name to clipboardExpand all lines: docs/variables.md
+21-2Lines changed: 21 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -1488,11 +1488,30 @@ The variable was implemented in [Percona Server for MySQL 8.0.20-11](release-not
1488
1488
| Data type | Boolean |
1489
1489
| Default | OFF |
1490
1490
1491
+
#### Version changes
1492
+
1491
1493
The variable was implemented in [Percona Server for MySQL 8.0.25-15](release-notes/Percona-Server-8.0.25-15.md#id1).
1492
1494
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:
1494
1508
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.
| 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. |
0 commit comments