I have a HPE ProLiant DL360 Gen9 server, specs are:
- CPU: Intel Xeon 2 CPUs E5-2687W v3 @ 3.10GHz, 25MB L3 cache, 10 cores ea
- RAM: 8x 32GB PC4-17000 DDR4 2133MHz CAS-15 1.2V SDRAM DIMM (256 GB total)
(full server specs here)
The server is running CentOS 7.2
with kernel 3.10.0-327.36.3.el7.x86_64
.
I mounted a tmpfs ramdisk on the server using the following entry in /etc/fstab
:
tmpfs /ramdisk tmpfs noauto,user 0 0
To test writing to this ramdisk, I then run the following command:
time sh -c "dd if=/dev/zero of=/ramdisk/120GB_testfile bs=4k count=30000000 && sync"
It reports that it wrote 122,880,000,000 bytes in 58.857s, which is a write speed of 1991 MiB/sec.
Considering that the write speed of this memory is 17GB/sec (according to this description of memory data rates), I am surprised by the considerably lower rate when writing to my tmpfs ramdisk. Can anyone explain the disparity, and suggest another way to write to a file in memory that is faster?
Thanks.
UPDATE
I disabled vm.swappiness
, but that yielded no benefit (1712 MiB/sec).
I tried increasing the block size as well (bs=256k count=468750
), but again, not much of an effect (2087 MiB/sec).
vm.swappiness
to 0 or 1?