1

There is an application that reads files content of a certain folder and visualizes results in parallel . In case of parallel file access on HDD it works really good, but when I am doing the same things on DVD Rom it works awfull long. When I am wrap the file IO in a lock granting that it only single file read possible) I suisfied with DVD performance, but lacking performance on HDD.

Currently thinking of a mechanism of recognition of a storage performance by given folder path, and then, having some metric I would like to load balance parallel file reading.

How can I get such a metrics? (or if there is a way to get just slow devices like DVD, USB2?)

Is there better solution rather the one I am thinking of?

Yaugen Vlasau
  • 2,148
  • 1
  • 17
  • 38
  • You could use WMI to see what device you're reading off of. USB2 isn't a device... How often do you expect to be reading from a DVD – Callum Linington Mar 23 '17 at 09:28
  • Not really often, but this is certanly a case – Yaugen Vlasau Mar 23 '17 at 09:30
  • 1
    So it is an edge case - if you can implement something querying WMI then go for it - otherwise I would just say don't bother wasting time over it – Callum Linington Mar 23 '17 at 09:31
  • You basically asking how to detect whenever drive is a CDROM (compare with your question title) ;). – Sinatr Mar 23 '17 at 09:55
  • @Sinatr: no. no. I am asking for how can i detect if a drive fast enought to start massive parallel reading from it – Yaugen Vlasau Mar 23 '17 at 09:59
  • 1
    Define what is *"fast enough"*? CDROM is slow *enough* to .. don't do parallel. Or make it an option for the user to choose. If you want to query device capabilities, then of course [you can do so](http://stackoverflow.com/q/10647855/1997232) or just [benchmark it yourself](http://stackoverflow.com/q/31781840/1997232) (maybe use search next time? ;) – Sinatr Mar 23 '17 at 10:11

0 Answers0