You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

38 lines
1.6 KiB

  1. # readahead
  2. Sets the mergerfs and underlying filesystem `readahead` values. The
  3. value unit is in kibibytes.
  4. * `readahead=1024`
  5. While the max size of messages sent between the kernel and mergerfs is
  6. configurable via the [fuse_msg_size](fuse_msg_size.md) option that
  7. doesn't mean that is the size used by the kernel for read and
  8. writes.
  9. Linux has a max read/write size of 2GB. Since the max FUSE message
  10. size is just over 1MB the kernel will break up read and write requests
  11. with buffers larger than that 1MB.
  12. When page caching is disabled (`cache.files=off`), besides the kernel
  13. breaking up requests with larger buffers, requests are effectively one
  14. for one to mergerfs. A read or write request for X bytes is made to
  15. the kernel and a request for X bytes is made to mergerfs. No
  16. [readahead](https://en.wikipedia.org/wiki/Readahead) behavior will
  17. occur because there is no page cache available for it to store that
  18. data. In FUSE this is referred to as "direct IO". Note that "direct
  19. IO" is not the same as `O_DIRECT`.
  20. When page caching is enabled the kernel can and will utilize
  21. `readahead`. However, there are two values which impact the size of
  22. the `readahead` requests. The filesystem's `readahead` value and the
  23. FUSE `max_readahead` value. Whichever is lowest is used. The default
  24. `max_readahead` in mergerfs is maxed out meaning only the filesystem
  25. `readahead` value is relevant.
  26. Preferably this value would be set by the user externally since it is
  27. a generic feature but there is no standard way to do so mergerfs added
  28. this feature to make it easier to set.
  29. There is currently no way to set separate values for different
  30. branches through mergerfs.