diff options
| author | Chris Lu <chrislusf@users.noreply.github.com> | 2025-12-10 12:42:09 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-12-10 12:42:09 -0800 |
| commit | c1534200223d99cc193ce229439e4f8e15f1d9b2 (patch) | |
| tree | 3d5e5df5a295efa924d30d344ada067c059cef32 /go.mod | |
| parent | ae7333d28e77d907a9e7d50055e352c15678e723 (diff) | |
| download | seaweedfs-c1534200223d99cc193ce229439e4f8e15f1d9b2.tar.xz seaweedfs-c1534200223d99cc193ce229439e4f8e15f1d9b2.zip | |
filer: add write batching for FoundationDB store to improve throughput (#7708)
This addresses issue #7699 where FoundationDB filer store had low throughput
(~400-500 obj/s) due to each write operation creating a separate transaction.
Changes:
- Add writeBatcher that collects multiple writes into batched transactions
- New config options: batch_size (default: 100), batch_interval (default: 5ms)
- Batching provides ~5.7x throughput improvement (from ~456 to ~2600 obj/s)
Benchmark results with different batch sizes:
- batch_size=1: ~456 obj/s (baseline, no batching)
- batch_size=10: ~2621 obj/s (5.7x improvement)
- batch_size=16: ~2514 obj/s (5.5x improvement)
- batch_size=100: ~2617 obj/s (5.7x improvement)
- batch_size=1000: ~2593 obj/s (5.7x improvement)
The batch_interval timer (5ms) ensures writes are flushed promptly even
when batch is not full, providing good latency characteristics.
Addressed review feedback:
- Changed wait=false to wait=true in UpdateEntry/DeleteEntry to properly
propagate errors to callers
- Fixed timer reset race condition by stopping and draining before reset
Fixes #7699
Diffstat (limited to 'go.mod')
| -rw-r--r-- | go.mod | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -123,7 +123,7 @@ require ( github.com/Jille/raft-grpc-transport v1.6.1 github.com/ThreeDotsLabs/watermill v1.5.1 github.com/a-h/templ v0.3.943 - github.com/apple/foundationdb/bindings/go v0.0.0-20240515141816-262c6fe778ad + github.com/apple/foundationdb/bindings/go v0.0.0-20250911184653-27f7192f47c3 github.com/arangodb/go-driver v1.6.9 github.com/armon/go-metrics v0.4.1 github.com/aws/aws-sdk-go-v2 v1.40.1 |
