hdparm -Tt ?

Abarbarian

Acruncher
Joined
Sep 30, 2005
Messages
11,023
Reaction score
1,223
I'm bored.

So lets have a looksee at how speedy folks hard disks are. Want to play along ? It will only take a few seconds and you may be surprised at the results.

Open up a TERMINAL and run as root or via sudo the following command,

Code:
hdparm -Tt /dev/sda

Here are the results from my old Dell with a ssd (sda) and with a sd card running from a usb 2 port (sdb).

Code:
Drives: HDD TotalSize:136.2GB(37.0% used)
                   ID-1:/dev/sda model: MKNSSDCR120GB size:120.0GB
                   ID-2: USB /dev/sdb model: SD/MMC size:16.1GB
$ sudo hdparm -Tt/dev/sda

/dev/sda:
Timing cached reads:   2074 MB in  2.00 seconds =1035.80 MB/sec
Timing buffered disk reads:342 MB in  3.01 seconds =113.43 MB/sec

$ sudo hdparm -Tt/dev/sdb

/dev/sdb:
Timing cached reads:   2008 MB in  2.00 seconds =1004.28 MB/sec
Timing buffered disk reads:  54 MB in  3.07 seconds =  17.59 MB/sec

Surprise from the above is that both "Timing cache reads" are almost the same.

Here are some results from a mates old WD VelociRaptor hdd.

Code:
hdparm -Tt /dev/sda

/dev/sda:
Timing cached reads:   2198 MB in  2.00 seconds = 1098.68 MB/sec
Timing buffered disk reads: 246 MB in  3.00 seconds =  81.91 MB/sec

Surprise here is that the old VelociRaptor is almost as fast as my entry level ssd :eek:
 
If you are wondering what "hdparm" is this neat article may help.

By
Tim Schürmann


Hdparm is the tool to use when it comes to tuning your hard disk or DVD drive, but it can also measure read speed, deliver valuable information about the device, change important drive settings, and even erase SSDs securely.

In 2005, Canadian Mark Lord developed the small hdparm utility to test Linux drivers for IDE hard drives. Since then, the program has developed into a valuable tool for diagnosis and tuning of hard drives. For example, it tests the speed of hard drives and solid state disks, puts devices to sleep, and turns the energy-saving mode on or off. With modern devices, it can activate the acoustic mode and clean up SSDs. Before your first experiments with hdparm, you should read about safety concerns in the “Warning!” box.


Need for Communication

All reasonably new distributions already include hdparm in the basic installation. You only need to open a terminal and call up

The rest of the article is here,

http://www.linux-magazine.com/Online/Features/Tune-Your-Hard-Disk-with-hdparm

:cool:
 
A neat little bit of historical interest about hdparm. The article is from 2000 and shows how with a bit of simple tweaking the guy souped up his hdd speeds from 3 MB/s to 20 MB/s which is pretty phenomenal. :dance:

Are you running an Intel Linux system with at least one (E)IDE hard drive?

Wouldn't it be neat if there were a magical command to instantly double the I/O performance of your disks? Or, in some cases, show 6 to 10 times your existing throughput?

Did you ever just wonder how to tell what kind of performance you're getting on your "tricked-out" Linux box?

Don't overlook hdparm(8). If you've never heard of it, don't worry. Most people I've talked to haven't either. But if you're running an IDE/Linux system (as many folks are,) you'll wonder how you ever got this far without it. I know I did.

http://www.linuxdevcenter.com/pub/a/linux/2000/06/29/hdparm.html?page=1

:cool:
 
I'm running Ubuntu in a VM, so my results won't reflect a normal OS installation, but it'll be interesting to see how they compare:

/dev/sda:
Timing cached reads: 18656 MB in 2.00 seconds = 9315.87 MB/sec
Timing buffered disk reads: 556 MB in 3.02 seconds = 184.24 MB/sec

Thats with the virtual disk located on an Intel 520 SSD.
 
I'm running Ubuntu in a VM, so my results won't reflect a normal OS installation, but it'll be interesting to see how they compare:



Thats with the virtual disk located on an Intel 520 SSD.

Those are pretty nippy speeds.

What size was your ssd ? Cos size does matter no matter what the girls tell you.
hysterical.gif
 
Hahaha :D

250GB for the Intel SSD - it's a few years old now but runs my main OS and stores most apps (games are on a separate drive).
 
I thought I was using a Kingston but it seems I am using a Mushkin Chronos which is one of their mid range ssd's. I bought it dirt cheap in a sale quite a while ago and it has been used in three different pc's.
According to this useful site the Chronos runs approximately 47% slower than your mid market ssd. looking at their detailed list yours should run at 67% better.

http://ssd.userbenchmark.com/SpeedTest/3690/MKNSSDCR120GB

If we take the Raptor as a mark then my Chronos runs around 30% faster and your 520 runs about 120% faster. :eek:

I wonder how my SM951 NVMe PCIe M.2 would stand up :lol:
 
Last edited:
As I now have Arch up and running on my Skylake build I thought it was time to do an update to this thread.

I ran hdparm on my main os drive a Samsung 951 256GB nvme and the cheapo ssd's below. Also on a USB 3 and a USB 2 stick.

As you can see there is very little difference in "reads" but there is quite a wide range in the "write" speeds. The speeds for the USB3 stick are fast enough to run a os from for everyday use and would provide a decent computing experience.

I forgot to mention in the opening post that you have to run hdparm as root or with sudo. To find out what your hdd/ssd's are called run " inxi -D" or "fdisk -l" or "lsblk" from a terminal.

Code:
[longship@09:27:00 ~]$ inxi -D

Drives:    HDD Total Size: 567.6GB (10.6% used)

           ID-1: /dev/nvme0n1 model: N/A size: 256.1GB

           ID-2: /dev/sdb model: MKNSSDCR240GB size: 240.1GB

           ID-3: /dev/sda model: Crucial_CT250MX2 size: 250.1GB

           ID-4: USB /dev/sdc model: DT_microDuo_3C size: 62.0GB

           ID-5: USB /dev/sdd model: TransMemory size: 15.5GB


Code:
[root@longship ~]# hdparm -Tt /dev/nvme0n1

/dev/nvme0n1:
 Timing cached reads:   35264 MB in  2.00 seconds = 17655.56 MB/sec
 Timing buffered disk reads: 4380 MB in  3.00 seconds = 1459.96 MB/sec
[root@longship ~]# hdparm -Tt /dev/sdb

/dev/sdb:
 Timing cached reads:   34742 MB in  2.00 seconds = 17393.34 MB/sec
 Timing buffered disk reads: 1226 MB in  3.00 seconds = 408.66 MB/sec
[root@longship ~]# hdparm -Tt /dev/sda

/dev/sda:
 Timing cached reads:   34784 MB in  2.00 seconds = 17414.11 MB/sec
 Timing buffered disk reads: 1224 MB in  3.00 seconds = 407.62 MB/sec
[root@longship ~]# hdparm -Tt /dev/sdc

/dev/sdc:
 Timing cached reads:   34640 MB in  2.00 seconds = 17347.39 MB/sec
 Timing buffered disk reads: 374 MB in  3.00 seconds = 124.48 MB/sec
[root@longship ~]# hdparm -Tt /dev/sdd

/dev/sdd:
 Timing cached reads:   33186 MB in  2.00 seconds = 16613.59 MB/sec
 Timing buffered disk reads:  80 MB in  3.01 seconds =  26.58 MB/sec

:cool:
 
That nvme is very, very fast - do you notice a real world difference compared to when your OS was on one of the older SSDs?
 
That nvme is very, very fast - do you notice a real world difference compared to when your OS was on one of the older SSDs?

Yep you do notice a difference. With some of the older games I play reloads happen instantly. So instead of having a small break after you die, a wphew moment, you are thrown straight back into the game, that can wear you out a tad.
With the newer games load times are pretty darn quick too which makes for much more pleasurable experience
Picture programs and video type stuff especially large picture folders open up much faster too. All in all if you can afford a 128 or 256 GB nvme to use as a os drive then I would recommend making the move.
It is the same sort of upgrade that moving from a hdd to a ssd makes to your computing experience.Maybe not quite as radical but certainly noticeable.

:cool:

You might find this interesting,

http://www.trustedreviews.com/reviews/samsung-960-evo-250gb
 
Last edited:
Cheers :). I've got an m.2 drive in my NAS for virtualisation, but yet to upgrade my main PC. It just keeps on going, so I keep delaying the upgrade :lol:.
 
I thought I would post some results from MX-17 running on a usb stick. This host used to be my main pc and was built in 2008 and the usb is a 8 GB pretty slow usb-2 type.

Code:
root@mx1:/home/demo# inxi -Fm

System:    Host: mx1 Kernel: 4.13.0-1-amd64 x86_64 bits: 64 Desktop: Xfce 4.12.3

           Distro: MX-17_x64 Horizon December 15, 2017

Machine:   Device: desktop Mobo: ASUSTeK model: M2N32-SLI DELUXE v: 1.XX serial: 123456789000

           BIOS: Phoenix v: ASUS M2N32-SLI DELUXE 5002 date: 03/18/2010

CPU:       Dual core AMD Athlon 64 X2 5600+ (-MCP-) cache: 1024 KB

           clock speeds: max: 2900 MHz 1: 1000 MHz 2: 1000 MHz

Memory:    Array-1 capacity: 16 GB devices: 4 EC: None

           Device-1: DIMM_A1 size: 1 GB speed: 800 MHz type: Other

           Device-2: DIMM_B1 size: 1 GB speed: 800 MHz type: Other

           Device-3: DIMM_A2 size: 1 GB speed: 800 MHz type: Other

           Device-4: DIMM_B2 size: 1 GB speed: 800 MHz type: Other

Graphics:  Card: Advanced Micro Devices [AMD/ATI] RV770 [Radeon HD 4850]

           Display Server: x11 (X.Org 1.19.2 )

           drivers: ati,radeon (unloaded: modesetting,fbdev,vesa)

           Resolution: [email protected]

           OpenGL: renderer: Gallium 0.4 on AMD RV770 (DRM 2.50.0 / 4.13.0-1-amd64, LLVM 3.9.1)

           version: 3.3 Mesa 13.0.6

Drives:    HDD Total Size: 188.1GB (1.5% used)

           ID-1: USB /dev/sda model: DT_101_G2 size: 8.0GB

           ID-2: /dev/sdb model: ST3120026A size: 120.0GB

           ID-3: /dev/sdc model: KINGSTON_SV300S3 size: 60.0GB

Partition: ID-1: / size: 3.1G used: 228M (8%) fs: overlay dev: N/A

Sensors:   System Temperatures: cpu: 59.0C mobo: 37.0C gpu: 55.5

           Fan Speeds (in rpm): cpu: 3688 psu: 0 sys-1: 942 sys-2: 0 sys-3: 976 sys-4: 1070

Info:      Processes: 178 Uptime: 8 min Memory: 773.8/3954.5MB Client: Shell (bash) inxi: 2.3.53


Code:
/dev/sda:
 Timing cached reads:   2432 MB in  2.00 seconds = 1216.91 MB/sec
 Timing buffered disk reads:  44 MB in  3.06 seconds =  14.39 MB/sec

As you would expect the "buffered disk reads" are pretty dire to look at. However the os runs smoothly and at a decent pace. I'll post results from a 16 GB stick which is a tad speedier than this 8 GB one.

:cool:
 
Code:
root@mx1:/home/demo# inxi -Fm

System:    Host: mx1 Kernel: 4.13.0-1-amd64 x86_64 bits: 64 Desktop: Xfce 4.12.3

           Distro: MX-17_x64 Horizon December 15, 2017

Machine:   Device: desktop System: Gigabyte product: N/A serial: N/A

           Mobo: Gigabyte model: Z170X-Gaming 7 v: x.x serial: N/A

           UEFI: American Megatrends v: F6 date: 12/16/2015

CPU:       Quad core Intel Core i7-6700K (-MT-MCP-) cache: 8192 KB

           clock speeds: max: 4200 MHz 1: 4000 MHz 2: 4000 MHz 3: 4000 MHz 4: 4000 MHz

           5: 4000 MHz 6: 4000 MHz 7: 4000 MHz 8: 4000 MHz

Memory:    Array-1 capacity: 64 GB devices: 4 EC: None

           Device-1: ChannelA-DIMM0 size: 8 GB speed: 2800 MHz type: DDR4

           Device-2: ChannelA-DIMM1 size: 8 GB speed: 2800 MHz type: DDR4

           Device-3: ChannelB-DIMM0 size: 8 GB speed: 2800 MHz type: DDR4

           Device-4: ChannelB-DIMM1 size: 8 GB speed: 2800 MHz type: DDR4

Graphics:  Card: NVIDIA GP104 [GeForce GTX 1070]

           Display Server: x11 (X.Org 1.19.2 )

           drivers: modesetting,nouveau (unloaded: fbdev,vesa)

           Resolution: [email protected], [email protected]

           OpenGL: renderer: Gallium 0.4 on llvmpipe (LLVM 3.9, 256 bits) version: 3.3 Mesa 13.0.6

Audio:     Card-1 NVIDIA GP104 High Def. Audio Controller driver: snd_hda_intel

           Card-2 Intel Sunrise Point-H HD Audio driver: snd_hda_intel

           Sound: Advanced Linux Sound Architecture v: k4.13.0-1-amd64

Network:   Card-1: Intel Ethernet Connection (2) I219-V driver: e1000e

           IF: eth1 state: down mac: 40:8d:5c:e0:e4:aa

           Card-2: Qualcomm Atheros Killer E2400 Gigabit Ethernet Controller driver: alx

           IF: eth0 state: up speed: 100 Mbps duplex: full mac: 40:8d:5c:e0:e4:ac

Drives:    HDD Total Size: 761.7GB (0.6% used)

           ID-1: /dev/nvme0n1 model: SAMSUNG_MZVPV256HDGL size: 256.1GB

           ID-2: /dev/sda model: Crucial_CT250MX2 size: 250.1GB

           ID-3: /dev/sdb model: MKNSSDCR240GB size: 240.1GB

           ID-4: USB /dev/sdc model: Patriot_Memory size: 15.5GB

Partition: ID-1: / size: 26G used: 32M (1%) fs: overlay dev: N/A

           ID-2: swap-1 size: 1.59GB used: 0.00GB (0%) fs: swap dev: /dev/nvme0n1p7

Sensors:   System Temperatures: cpu: 29.8C mobo: 27.8C gpu: N/A

           Fan Speeds (in rpm): cpu: N/A

Info:      Processes: 241 Uptime: 4 min Memory: 965.8/32127.9MB Client: Shell (bash) inxi: 2.3.53

Code:
root@mx1:/home/demo# hdparm -Tt /dev/sdc

/dev/sdc:
 Timing cached reads:   38180 MB in  2.00 seconds = 19115.75 MB/sec
 Timing buffered disk reads: 122 MB in  3.02 seconds =  40.36 MB/sec

Not bad speeds for a penguin running from a usb stick. Those are readings from the 16 GB running on my Skylake pc.

:cool:
 
Back
Top