Por hdparm
man page:
--direct
Use the kernel´s "O_DIRECT" flag when performing a -t timing
test. This bypasses the page cache, causing the reads to go
directly from the drive into hdparm's buffers, using so-called
"raw" I/O. In many cases, this can produce results that appear
much faster than the usual page cache method, giving a better
indication of raw device and driver performance.
Isso explica por que hdparm -t --direct
pode ser mais rápido que hdparm -t
. Ele também diz que --direct
se aplica apenas ao teste -t
, não ao teste -T
que não deve envolver o disco (veja abaixo).
-T
Perform timings of cache reads for benchmark and comparison pur‐
poses. For meaningful results, this operation should be
repeated 2-3 times on an otherwise inactive system (no other
active processes) with at least a couple of megabytes of free
memory. This displays the speed of reading directly from the
Linux buffer cache without disk access. This measurement is
essentially an indication of the throughput of the processor,
cache, and memory of the system under test.
Eu acho que -T
funciona lendo a mesma parte em cache do disco. Mas o seu --direct
impede isso. Então, logicamente, você deve ter os mesmos resultados com -t --direct
com -T --direct
.