What is the best dispatcher for file io? My unders...
# coroutines
u
What is the best dispatcher for file io? My understanding is that the io dispatcher strongly scales (creates unbounded? amount of threads) due to the assumption that io will mostly sleep. The default dispatcher is ment for CPU bound work and therefore limits it's thread utilization to the number of CPUs (-1) to not schedule more work than the CPUs can handle. Now file io puts a CPU in io wait state. Should this be considered CPU bound and hence the default dispatcher should be used?
a
No. When a thread is blocked on the kernel waiting for IO, that is the intended use case for the IO dispatcher and its thread pool behavior. The thread is not doing active computational work. CPU bound refers to active computational work.
👍 1
u
Thanks, I just read up on it. The cou state iowait is just another idle state.
👍 1