I read from here that the below command gives me the amount of data that needs to be written to the disk. grep ^Dirty /proc/meminfoIt particularly says Ever ask yourself How much data would be lost if I pressed the reset button?I wanted to test the above command and so I did the following.dd if=/dev/urandom of=sample.txt bs=1G count=1Now, in another shell I ran the above command. grep ^Dirty /proc/meminfoDirty:                44 kBgrep ^Dirty /proc/meminfoDirty:                36 kBHowever, if I do a file copy using cp it reports, grep Dirty /proc/meminfoDirty:            387680 kBgrep Dirty /proc/meminfoDirty:            609172 kBI see from this page what Dirty does. Dirty  The total amount of memory, in kilobytes, waiting to be  written back to the disk.Why Dirty is not reporting any size in case of dd?
Dirty in /proc/meminfo for dd
memory;io;proc
Try using this command instead:dd if=/dev/urandom of=sample.txt bs=1M count=1024dd will only write assign the data to be written to disk when it got all of the bs size in its memory.Here is the output of ps for a dd of 128mb just before the output was written to disk:USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND    root      4465  100 12.8 236260 129784 pts/1   R+   17:15   0:13 dd if=/dev/urandom of=sample.txt bs=128M count=1You can see the process is using about 130mb of ram (RSS Column)