What is the best way to determine max amount of threads for C# IO operations based on the system's hard drive?

179 views Asked by At

I've got a tool that will run multiple threads at once that will perform a simple IO operation. The question I have is; What is the best way to determine the max amount of possible threads, based on the system's hard drive capabilities, for IO operations?

1

There are 1 answers

1
Henk Holterman On BEST ANSWER

I don't think the OS really 'knows' what kind (HDD/SDD) of drive you have.

It might be possible to find out about RAID configurations through WMI but I'm not sure if that is reliable (some RAIDs are fully implemented in hardware).

And even if you know about your drive, there might be other processes using it.

So some experimentation is required, and probing if you want to do this on multiple machines you can't measure upfront.