Measurement of free ram through /proc/meminfo with ramdisk (initrd)

I am booting a disk image via PXE, it is a full system on an initrd ramdisk. I would like to measure the actual free memory of the system (not including buffers and file system caching). I was told this is done by adding the MemFree, Buffers and Cached values from /proc/meminfo. For a regular … Read more

How to deallocate Linux RAMdisk

I am having trouble to deallocate RAMdisk in Linux. I think that blockdev –flushbufs /dev/ram0 used to work in the past. But now: cat /dev/urandom > /dev/ram0 md5sum /dev/ram0 c71df700969640324b201ae5f7a96c41 /dev/ram0 blockdev -v –flushbufs /dev/ram0 flush buffers succeeded. md5sum /dev/ram0 c71df700969640324b201ae5f7a96c41 /dev/ram0 It did not wipe the RAMdisk. I tested in recent Linux 4.14 and … Read more

how to deallocate /dev/ram0

I have allocated /dev/ram0: dd if=/dev/zero of=/dev/ram0 bs=1M count=1024 Now I have 1Gb sitting in memory. How do I free up the allocated space ? Answer I believe, you can use blockdev command, which is available from util-linux package (in Debian) blockdev –flushbufs /dev/ram0 Source AttributionSource : Link , Question Author : Thomas Keller , … Read more

Regarding the creation and destruction of sensitive data on linux/unix systems

In modern file systems (and on modern SSDs) there is no guarantee that if you write over a file using a traditional utility (such as dd) that the data will be overwritten in-place and journaled backups destroyed. As a result, the data could possibly be recovered. So, after a little research I figured that mounting … Read more

Debian 8 KVM Guest – Loading initial ramdisk

I have updated my KVM management script for Ubuntu 14.04 KVM hosts to support debian 8 guests. After a manual installation (preseed script does not work yet), I am stuck with the the following message on bootup: During the installation, I: Selected only ssh server and base system utilities. Set the grub bootloader to install … Read more

Reserve fixed RAM memory region as a block device ( with a given start physical address)

There have been a lot of questions about RAM Disks and I am aware of ramfs and tmpfs which allow the use of ram as a block device. However my interest is in using a fixed memory address range as a block device. This arises from the necessity to use non-volatile RAM available in my … Read more

Linux tmpfs write speed slower than RAM speed

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 … Read more