2020-12-20

Does an NVMe Drive Require a Heatsink?

1 Hardware Setup

The test system was built with:

  • Main board: ASUS PRIME H470M-PLUS
  • CPU: Intel® Core™ i5-10600T
  • CPU fan: Zalman CNPS 2X
  • Case: Antec NSK1380
  • Disk: Samsung SSD 980 PRO 250GB
  • NVMe heatsink: Jonsbo M.2-3

The heatsink was mounted with a thin (grey) silicone pad at the bottom and a thick (white) silicone pad at the top.

2 Test Load

To create disk activity I read the whole disk in one go. Though reading the disk in smaller chunks is much slower the power consumption is in the same order. The size of the SSD is 250059350016 bytes. Type as root:

dd if=/dev/nvme0n1 of=/dev/null bs=16777216 count=14904
14904+0 records in
14904+0 records out
250047627264 bytes (250 GB, 233 GiB) copied, 89.0268 s, 2.8 GB/s

During disk activity the power consuption raises from 27.0 W to 49.8 W. 22.8 W are additionally dissipated in power supply, chipset, CPU, and SSD. Let us see what this power does for the SSD.

The datasheet of the Samsung 980 PRO 250GB (https://s3.ap-northeast-2.amazonaws.com/global.semi.static/Samsung_NVMe_SSD_980_PRO_Data_Sheet_Rev.1.2.pdf) specifies 5 W for reading at 6400 MB/s.

3 Measuring the Temperature

The temperature is monitored with the sensors utility from the lm_sensors 3.6.0-2 packet and filtered by awk:

#!/bin/bash
#
# $Source: /home/cvsroot/blogspot/heatsink_for_nvme/index.html,v $
# $Revision: 1.1 $
# $Date: 2020/12/20 23:56:04 $
# $Author: h $
# $State: Exp $
#
# Measure the NVMe temperature using the sensors utility
#
# While temperature logging is running, start on a 2nd console for the load. The power consumption raises by 16 W while reading.
#
# Note The temperatures "Composite" and "Sensor 1" always(?) match

d0=$(date +"%s.%N")

while true ; do
    d=$(date +"%s.%N")
    sensors |\
        egrep '^Composite|^Sensor [12]' |\
        awk -v d=${d} -v d0=${d0} '
             {if (!match($0, /[[:space:]]+([+-]?[[:digit:]]{1,3}\.[[:digit:]])/, a))
                {print "Shit" > "/dev/stderr";
                 exit 1;}
              if (!match($0, /^([^:]+):/, b))
                {print "Shit" > "/dev/stderr";
                 exit 1;}
              gsub(/Composite/, "0", b [1]);
              gsub(/Sensor 1/,  "1", b [1]);
              gsub(/Sensor 2/,  "2", b [1]);
              t [b [1]] = a [1];
              if (b [1] == "2")
                 {printf("%10.3f", d - d0);
                  for (i = 0; i < 3; ++i)
                      printf("%6.1f", t [i]);
                  printf("\n");}}'
    sleep 0.072
done

4 Results

4.1 Large Block Read

Without the heatsink the controller chip of the NVMe reaches its peak temperature within 50 s (τ≈28 s). The heatsink is much bigger than the raw NVMe board and thus triples the heat capacity of the assembly. This increases the time constant of the thermal system to about 90 s. However, the thermal resistance to the ambient is not improved by the same factor. For a short time this appears to be a reasonable cooling system but in the long run it fails. See The Great Raspberry Pi Cooling Bake-Off

In practical work it does not happen often that huge amount of data is read / written from / to the disk. Most uses are short bursts. Their temperature peaks are flattened by the heat capacity of the heatsink.

4.2 A Heavy Usecase

Copying the whole disk to /dev/null is simple unworldly. Compiling gcc 10.2 from the sources is more realistic. The make-process organizes the disk usage in three top-directories:

Name Size [MBytes] AccessUsage
gcc-10.2.0 900 MroSource Files
build 5266 MrwCompiled Files
/tmp ? rwTemporary Files

Three cases were observed:

  • /tmp and build on tmpfs
  • /tmp on tmpfs
  • Neither /tmp nor build on tmpfs
/tmpbuildreal [s]user [s]sys [s]Units readUnits written
yy1,481.12710,520.575 523.041448 92
yn 1,323.1779,570.220 365.8721,333182
n n 1,303.0159,553,401 366.6981,59212078

1 Unit = 512 KB