Any way to determine the speed of a removable disk in windows?

Is there a way to determine the speed of a removable disk in Windows without actually reading in the file. And if I need to read in a file, how much do I need to read to get the daily rate (for example, to determine if the device is USB2 or USB1)?

EDIT . Just to clarify, examples were USB2 and USB1. It can be Compact Flash, it can be SSD, it can be a removable disk. And I'm trying to determine this as quickly as possible, as it really affects the responsiveness of the application.

EDIT . It should also be clarified, this must be done programmatically. This will probably be done in C ++.

EDIT : Strengthening the answer is what I was looking for (although I did not write WMI in C ++). But I need to know what properties I should check to determine the relative speed. I do not need the exact speed (for example, I talked about the difference in speed between USB1 and USB2), but I need to know if it will be SLLOOOOWWW.

+4
source share
7 answers

WMI - Physical Disk Properties - This is an article I found that at least helps you figure out what you have connected. I foresee that, with regard to tables equating specific manufacturers and models to speeds, which is not as easy as you might expect.

+2
source

You may have better results requesting the operating system to get information about the hardware, rather than trying to redesign it from the data synchronization information.

For example, identical transmission speeds do not necessarily mean that the same technology is used by two devices, although other factors, such as search time, increase accuracy if such information is available for your application.

For the application to respond while this work is in progress, try making asynchronous calls and provide the user with some kind of progress indicator. As an example, consider how WinDirStat processes this progress indicator (I like the pac-man animation when analyzing each directory).

+2
source

A few megabytes, I would say. Transmission speeds may begin slowly and then accelerate as the transmission advances. There are also options due to file sizes (one 1 GB file will transfer much faster than 1 GB of smaller files).

The best way to do this is to copy the file to / from the device and the time it takes for your code. The speed of USB1 is 11 Mb / s (I think), and USB2 is 480 Mb / s (note that these are numbers for the entire bus, not for each port, so several devices on the same bus change the actual numbers).

0
source

On Windows, you can determine if a connected USB2 device is connected by selecting View- "Connection Devices" in the device manager, and then check whether the device is located under the USB2 controller (USB2 Advanced Host Controller).

Please note that this does not mean that your device will run at higher speeds, although for this you will need actual bandwidth tests. Sisoft Sandra software contains removable hard drives that are supported in the feature list.

EDIT: Due to clarification in the original question, I submitted a new answer.

0
source

Try TerraCopy and copy one large file ~ 400mb - 500mb from device to device, and you will see the speed.

0
source

Consider the number of things that can affect the data transfer rate:

  • The bus speed used to connect the device to the system. This is unlikely to be your limiting factor if it is not connected via USB1.
  • For hard drives, rotation speed and search time. 7200 RPM drives will read and write data blocks faster than drives at 5400 rpm.
  • Optical and magnetic drives usually rotate down when not in use, so the first access will be orders of magnitude larger than the second access.
  • The file system used on a particular device.
  • Caching data metadata and the file system. The less metadata cached, the more a magnetic or optical drive should look for where the data is.
  • Data Access Schema. Access to a small number of large contiguous files is almost always faster than access to a large number of small files scattered across the disk.
  • File System Fragmentation

You may be able to handle some heuristics based on the various characteristics of the devices you expect to see, but overall there is no good way to calculate the transfer rate for a particular combination of bus, media, file system and data access pattern without actually measuring it. If you decide to measure, try to model your final access template as accurately as possible.

0
source

I'm going to take Raymond Chen's crystal ball and say that you really don't want it. You probably want to use asynchronous I / O. If you do not get the I / O result in a second, you want to check how much has happened. Take the inverse of this number and you have a good grade to quote the user.

If nothing happens after a second, you may be in surprise. But even this can happen. For example, it might take a second for a hard drive to roll around. Just try every second until something happens.

0
source

Source: https://habr.com/ru/post/1277568/


All Articles