Browse Source
filer: improve FoundationDB performance by disabling batch by default (#7770)
filer: improve FoundationDB performance by disabling batch by default (#7770)
* filer: improve FoundationDB performance by disabling batch by default This PR addresses a performance issue where FoundationDB filer was achieving only ~757 ops/sec with 12 concurrent S3 clients, despite FDB being capable of 17,000+ ops/sec. Root cause: The write batcher was waiting up to 5ms for each operation to batch, even though S3 semantics require waiting for durability confirmation. This added artificial latency that defeated the purpose of batching. Changes: - Disable write batching by default (batch_enabled = false) - Each write now commits immediately in its own transaction - Reduce batch interval from 5ms to 1ms when batching is enabled - Add batch_enabled config option to toggle behavior - Improve batcher to collect available ops without blocking - Add benchmarks comparing batch vs no-batch performance Benchmark results (16 concurrent goroutines): - With batch: 2,924 ops/sec (342,032 ns/op) - Without batch: 4,625 ops/sec (216,219 ns/op) - Improvement: +58% faster Configuration: - Default: batch_enabled = false (optimal for S3 PUT latency) - For bulk ingestion: set batch_enabled = true Also fixes ARM64 Docker test setup (shell compatibility, fdbserver path). * fix: address review comments - use atomic counter and remove duplicate batcher - Use sync/atomic.Uint64 for unique filenames in concurrent benchmarks - Remove duplicate batcher creation in createBenchmarkStoreWithBatching (initialize() already creates batcher when batchEnabled=true) * fix: add realistic default values to benchmark store helper Set directoryPrefix, timeout, and maxRetryDelay to reasonable defaults for more realistic benchmark conditions.pull/7773/head
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
11 changed files with 321 additions and 36 deletions
-
5test/foundationdb/Dockerfile.build.arm64
-
1test/foundationdb/Dockerfile.fdb-arm64
-
18test/foundationdb/Makefile
-
27test/foundationdb/README.md
-
12test/foundationdb/docker-compose.arm64.yml
-
19test/foundationdb/filer.toml
-
10weed/command/scaffold/filer.toml
-
42weed/filer/foundationdb/CONFIGURATION.md
-
31weed/filer/foundationdb/README.md
-
51weed/filer/foundationdb/foundationdb_store.go
-
141weed/filer/foundationdb/foundationdb_store_test.go
@ -1,19 +1,8 @@ |
|||
# FoundationDB Filer Configuration |
|||
# FoundationDB Filer Configuration for Testing |
|||
|
|||
[foundationdb] |
|||
enabled = true |
|||
cluster_file = "/var/fdb/config/fdb.cluster" |
|||
api_version = 740 |
|||
timeout = "5s" |
|||
max_retry_delay = "1s" |
|||
directory_prefix = "seaweedfs" |
|||
|
|||
# For testing different configurations |
|||
[foundationdb.test] |
|||
enabled = false |
|||
cluster_file = "/var/fdb/config/fdb.cluster" |
|||
api_version = 740 |
|||
timeout = "10s" |
|||
max_retry_delay = "2s" |
|||
directory_prefix = "seaweedfs_test" |
|||
location = "/test" |
|||
# api_version = 740 |
|||
# timeout = "5s" |
|||
# directory_prefix = "seaweedfs" |
|||
Write
Preview
Loading…
Cancel
Save
Reference in new issue