Why cached reads are slower than disk reads in hdparm --direct?
7
votes
2
answers
5219
views
I am trying to interpret this result of hdparm:
janus@behemoth ~ $ sudo hdparm -Tt --direct /dev/nvme0n1
/dev/nvme0n1:
Timing O_DIRECT cached reads: 2548 MB in 2.00 seconds = 1273.69 MB/sec
Timing O_DIRECT disk reads: 4188 MB in 3.00 seconds = 1395.36 MB/sec
I do not understand how the cached reads can be slower than the direct disk reads. If I drop the --direct, I get what I would have expect: the disk reads are slower than the cached ones:
janus@behemoth ~ $ sudo hdparm -Tt /dev/nvme0n1
/dev/nvme0n1:
Timing cached reads: 22064 MB in 2.00 seconds = 11042.86 MB/sec
Timing buffered disk reads: 2330 MB in 3.00 seconds = 776.06 MB/sec
(Although it says "buffered disk reads" now).
Can somebody explain to me what is going on?
Asked by Alejandro DC
(504 rep)
Aug 3, 2017, 02:55 PM
Last activity: Sep 14, 2023, 10:12 PM
Last activity: Sep 14, 2023, 10:12 PM