Could RAM possibly be just 3-4 times faster than bare hdd writes and reads? or, is the Linux kernel doing its 'magic' in the bg? or, ...
HDDs have their internal caching mechanism and I have heard that the
Linux kernel uses RAM very effitiently, but to my understanding RAM
being only 3-4 times faster doesn't make much sense, so I may be doing
or understanding something not entirely right.
does dd actually hit the bare metal drive or is it just reaching the
disks cache
This is what I am consistently getting from my code doing intesive IO
on the RAM drive:
// __ write speed test
#
# time dd if=/dev/zero of="${_RAM_MNT}"/zero bs=4k count=100000
100000+0 Datensätze ein
100000+0 Datensätze aus
409600000 Bytes (410 MB, 391 MiB) kopiert, 0,756943 s, 541 MB/s
real 0m0,760s
user 0m0,048s
sys 0m0,680s
#
// __ read speed test
#
# time dd if="${_RAM_MNT}"/zero of=/dev/null bs=4k count=100000
100000+0 Datensätze ein
100000+0 Datensätze aus
409600000 Bytes (410 MB, 391 MiB) kopiert, 0,36381 s, 1,1 GB/s
real 0m0,368s
user 0m0,016s
sys 0m0,344s
#
// __ my code reports while using a ramdisk:
...
// __ |0| files not found or empty!
// __ |8616768| bytes in |48| files offset processed (weighted and
checked) in |720057| (ms), |11| (bytes/ms)
real 12m0,396s
user 9m12,596s
sys 3m11,524s
$
~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
_HDD_DIR="logs/ffst_diffs_files"
time dd if=/dev/zero of="${_HDD_DIR}"/zero bs=4k count=100000
ls -l "${_HDD_DIR}"/zero
time dd if="${_HDD_DIR}"/zero of=/dev/null bs=4k count=100000
rm -fv "${_HDD_DIR}"/zero
$ _HDD_DIR="/home/lbrtchx/cmllpz/prjx/kd/java/IO/ffst_bytes/logs/ffst_diffs_files"
$
$ time dd if=/dev/zero of="${_HDD_DIR}"/zero bs=4k count=100000
100000+0 Datensätze ein
100000+0 Datensätze aus
409600000 Bytes (410 MB, 391 MiB) kopiert, 1,92086 s, 213 MB/s
real 0m1,924s
user 0m0,064s
sys 0m1,468s
$
$ ls -l "${_HDD_DIR}"/zero
-rw-r--r-- 1 lbrtchx lbrtchx 409600000 Jun 14 02:07
.../logs/ffst_diffs_files/zero
$
$ time dd if="${_HDD_DIR}"/zero of=/dev/null bs=4k count=100000
100000+0 Datensätze ein
100000+0 Datensätze aus
409600000 Bytes (410 MB, 391 MiB) kopiert, 0,521688 s, 785 MB/s
real 0m0,525s
user 0m0,040s
sys 0m0,308s
$
# time dd if=/dev/zero of="${_HDD_DIR}"/zero bs=4k count=100000
100000+0 Datensätze ein
100000+0 Datensätze aus
409600000 Bytes (410 MB, 391 MiB) kopiert, 1,94642 s, 210 MB/s
real 0m1,954s
user 0m0,048s
sys 0m1,484s
#
# ls -l "${_HDD_DIR}"/zero
-rw-r--r-- 1 root root 409600000 Jun 14 02:04
/home/lbrtchx/cmllpz/prjx/kd/java/IO/ffst_bytes/logs/ffst_diffs_files/zero
#
# time dd if="${_HDD_DIR}"/zero of=/dev/null bs=4k count=100000
100000+0 Datensätze ein
100000+0 Datensätze aus
409600000 Bytes (410 MB, 391 MiB) kopiert, 0,735103 s, 557 MB/s
real 0m0,744s
user 0m0,036s
sys 0m0,324s
#
// __ my code reports while using a hdd access:
...
// __ |0| files not found or empty!
// __ |8616768| bytes in |48| files offset processed (weighted and
checked) in |2412518| (ms), |3| (bytes/ms)
real 40m12,727s
user 10m42,576s
sys 8m41,180s
$
Reply to:
- Follow-Ups:
- Re: Could RAM possibly be just 3-4 times faster than bare hdd writes and reads? or, is the Linux kernel doing its 'magic' in the bg? or, ...
- From: Albretch Mueller <lbrtchx@gmail.com>
- Re: Could RAM possibly be just 3-4 times faster than bare hdd ...
- From: "Thomas Schmitt" <scdbackup@gmx.net>
- Re: Could RAM possibly be just 3-4 times faster than bare hdd writes and reads? or, is the Linux kernel doing its 'magic' in the bg? or, ...
- From: Linux-Fan <Ma_Sys.ma@web.de>
- Re: Could RAM possibly be just 3-4 times faster than bare hdd writes and reads? or, is the Linux kernel doing its 'magic' in the bg? or, ...
- From: Michael Stone <mstone@debian.org>
- Re: Could RAM possibly be just 3-4 times faster than bare hdd writes and reads? or, is the Linux kernel doing its 'magic' in the bg? or, ...
- From: Dan Ritter <dsr@randomstring.org>
- Re: Could RAM possibly be just 3-4 times faster than bare hdd writes and reads? or, is the Linux kernel doing its 'magic' in the bg? or, ...
- From: Anders Andersson <pipatron@gmail.com>
- Re: Could RAM possibly be just 3-4 times faster than bare hdd writes and reads? or, is the Linux kernel doing its 'magic' in the bg? or, ...
- From: David Christensen <dpchrist@holgerdanske.com>