How many threads for reading and writing to the hard disk?

后端 未结 7 2266
清酒与你
清酒与你 2021-02-14 16:32

i am developing an application that gathers a list with all the files of the hard drive and also afterwards it does write files to the hard drive.

I want to ask : what i

7条回答
  •  天涯浪人
    2021-02-14 16:45

    I would say one thread is enough. The CPU might be able to run many threads, but the speed of the hard drive is many orders of magnitude below the CPU's. Even if running more threads made the requests for I/O faster (of which I'm not certain), it wouldn't make the hard drive actually read faster. It could probably even slow it down.

提交回复
热议问题