56

I have a laptop. When there is a Windows 10 OS on it, even if there is no data read or written, the USB flash drive will get extremely hot when just plugged into the computer.

However, with the same computer, with Linux installed on it, the situation is totally different. When I write and read data from and to the flash drive intensively, this flash drive just got a little bit warmer.

After I found this phenomenon, I tested various USB flash drives on my desktop, laptop ... with the same Linux and Windows OSes. The situation is similar.

In the Linux environment, I use

dd if=/dev/urandom of=/path/to/my/flash/parent/folder/test.bin bs=1024M count=4

to test a big file write. To test writing a great number of small files I use:

parallel dd if=/dev/urandom of=/path/to/my/flash/parent/test-{}.bin bs=1M count=1 ::: {0001..4096}

In the Windows 10 environment, I just plug the USB flash drive in and do nothing(Not run I/O intensive application on purpose) but wait for 10 minutes. NOTE: The Windows 10 environments on all test computers were freshly installed, and there was no 3rd-party application (I use Education Edition and I disable real-time protection when I start the machine before test. However, I just unset the checkbox in Windows Graphical Setting Manager. I don't know if there need a reboot to make change valid).

Update 1:

It may be due to the USB flash drive itself. Here is the model of flash drive I use in this test.(This is not the advertisement, I have no attitude toward these products)

  1. SanDisk Extreme PRO® USB 3.1 Solid State Flash Drive 128GB

  2. SanDisk 64GB USB 3.0 Flash Drive

  3. DataTraveler 100 G3 16GB

Update2:

There is an answer which consider the effect of the buffer of Linux system.

But for the Linux distro I used, when DD was finished, I typed sync and it took almost zero time to execute. Hence the effect of that is not considerable.


Why? Is this because Windows always does some useless accesses to a flash drive?

In addition when I have to use Windows, is there any practical way to make the USB flash drive cooler?

pah8J
  • 755
  • 1
  • 6
  • 14

5 Answers5

43

On my laptop, the USB 3.0 port is physically very close (~ 2 in) to the fan assembly:

enter image description here

As a result, any USB device plugged in on that side feels approximately the same temperature as the outside of the fan (!).

My laptop is also a little bit slow. Consequently, Windows 10 runs considerably hotter at idle than Ubuntu, and I have noticed that flash drives seem to get hot on Windows as well.

You can test if this is the case for you as well by running a very CPU-intensive program in Ubuntu (say, a 4-core build) and observing whether a plugged-in flash drive gets hot during that time.

Edit: I just now saw Justin's comment. I hope this provides enough information to stand on its own.

8

Windows does have this thing where you "can use USB sticks to speed up your computer". It does this by using otherwise-unused-stick-memory as a cache, reducing disk I/O. It's possible this extra activity is generating the excess heat.

It's possible to test this by turning off this option, and see if the stick still gets hot

Jennifer
  • 189
5

There are a few possibilities here.

  • Windows does indeed have more software that automatically scans, integrity checks, power manages, and generally uses USB memory sticks. This can cause the drive to get more activity in Windows than Linux, assuming default installations of each.
  • The Linux drivers may be using the drive as a USB 2.x connected disk, whereas Windows may have a 3.x driver and it may be a 3.x port. This would increase usage speed and heat.
  • Windows is assuming power is required over the USB port for a larger disk and is supplying more, even if unnecessary, through the port. More precisely, the device requests more power from the port than is required. This is unlikely, but can occur if the firmware for the motherboard is permissive and the driver software for the motherboard and/or the devices involved is bugged/not functioning properly. I've seen this happen with older motherboards and some off-brand USB devices. It can also happen if there is a USB extension or dongle involved and the cable is damaged internally, or on a direct connection, the interface board itself is having problems. In theory, Windows 10 will catch this and notify of a power surge on the port, particularly if the cable is damaged, but it does not always successfully deactivate the port when it occurs.
  • Windows Antivirus software may be doing scans of the drive when it isn't in use.
CDove
  • 1,231
4

According to OP, the difference in temperature happens on the same laptop, same hardware, so any proximity to heat exhaust is inconsequential.

The difference is likely due to different handling of LPM - link power management. LPM is a more sophisticated version of USB SUSPEND function. USB 3.0 mass storage devices got hot when USB host controller disables LPM (or LPM is not enabled in USB device, this is a mutual thing). Apparently the Windows OS somehow has difficulty in configuring the xHCI controller to run LPM (or has it disabled), while Linux has no problem with that.

To check Windows configuration for LPM, this link might be of some help.

Ale..chenski
  • 13,235
2

Another possibility is a difference in how Linux and Windows handle writing to a removable drive. Windows by default will force all writes to happen as soon as possible, in case you remove the drive. Linux, on the other hand, expects you unmount the drive before you remove it, and thus keeps a write cache in memory.

Hence it is possible that your drive is actually getting less use at a given time under Linux, as the writes would be more spread out, and even less writes may be required (if you modify a file that had not been written to the drive yet.)

trlkly
  • 1,776