juicedata / juicefs

JuiceFS is a distributed POSIX file system built on top of Redis and S3.
https://juicefs.com
Apache License 2.0
10.95k stars 967 forks source link

Make max-readahead configurable to enhance read performance #5224

Open ddrid opened 1 month ago

ddrid commented 1 month ago

Currently, readAheadMax is a non-configurable parameter for fuse users, set by default to conf.Chunk.BlockSize * 8, typically 32MB. This isn't sufficient for low-concurrency read requests. I intend to make max-readahead a user-configurable parameter.

After testing, I set max-readahead to 512MB and observed that under single-threaded, with uncached local disk reads, the throughput increased from 230MB/s to 2.2GB/s, showing a 10x improvement.

solracsf commented 1 month ago

Thanks for the PR. Maybe also document it (in docs) too?