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.

53 lines
1.8 KiB

  1. # threads
  2. There are multiple thread pools used in mergerfs to provide
  3. parallel behaviors.
  4. ## read-thread-count
  5. The number of threads used to read (and possibly process) messages
  6. from the kernel.
  7. * `read-thread-count=0`: Create a thread pool sized to the number of
  8. logical CPUs.
  9. * `read-thread-count=N` where `N>0`: Create a thread pool of `N` threads.
  10. * `read-thread-count=N` where `N<0`: Create a thread pool of `CPUCount /
  11. -N` threads.
  12. * `read-thread-count=-1` where `process-thread-count=-1`: Creates `2`
  13. read threads and `max(2,CPUCount-2)` process threads.
  14. * Defaults to `0`.
  15. When `process-thread-count=-1` (the default) this option sets the
  16. number of threads which read and then process requests from the
  17. kernel.
  18. When `process-thread-count` is set to anything else mergerfs will
  19. create two thread pools. A "read" thread pool which just reads from
  20. the kernel and hands off requests to the "process" thread pool.
  21. Generally, only 1 or 2 "read" threads are necessary.
  22. ## process-thread-count
  23. When enabled this sets the number of threads in the message processing pool.
  24. * `process-thread-count=-1`: Process thread pool is disabled.
  25. * `process-thread-count=0`: Create a thread pool sized to the number
  26. of logical CPUs.
  27. * `process-thread-count=N` where `N>0`: Create a thread pool of `N` threads.
  28. * `process-thread-count=N` where `N<-1`: Create a thread pool of `CPUCount /
  29. -N` threads.
  30. * Defaults to `-1`.
  31. ## process-thread-queue-depth
  32. * `process-thread-queue-depth=N` where `N>0`: Sets the number of outstanding
  33. requests that a process thread can have to N. If requests come in
  34. faster than can be processed and the max queue depth hit then
  35. queuing the request will block in order to limit memory growth.
  36. * `process-thread-queue-depth=0`: Sets the queue depth to the thread
  37. pool count.
  38. * Defaults to `0`.