On 2021/3/25 上午2:09, Jim Geo wrote:
Hello, Could you please elaborate on the relation between thread_pool and physical devices? By default thread_pool is scaling with the number of CPUs. Does the default value make sense in cases where the physical devices are fewer than the CPUs? For HDD? For SSD?
Btrfs is using kernel workqueue, while the thread_pool is just a soft cap on how many works can be queued to workqueue, while how each man works kernel workqueue will really spawn is a different thing. Furthermore, the thread_pool value only makes a difference for csum calculation and compression. For most x86_64, the CRC32 used by btrfs is already pretty fast thus the thread_pool shouldn't cause too much difference anyway. And for now you should be aware that, the thread_pool is not really bound to the number of devices. Thanks, Qu
What is the relation between user processes-> thread_pool-> io scheduler -> physical devices? Does it make sense to try to optimize thread_pool value? Man page is very vague on the effect of this parameter. Best Regards, Jim