I read about tmpfs and got curious to get the benefits from it. So, I created a directory and mounted as tmpfs.
So, as per theory, whatever is written in tmpfs gets stored on RAM directly and lasts till reboot. So, I created a 10 GB of file on tmpfs drive. As per theory, htop/top command must show RAM consumption to be more than 10 GB. I have 256 GB of RAM, but my RAM consumption was less and same as it was before creation of 10 GB of file on tmpfs.
Is there something that I missed out?
free
command? – muru Dec 28 '14 at 18:29\0
s? That wouldn't consume any memory -/tmpfs
understands file holes. – mikeserv Dec 28 '14 at 18:29/dev/zero
) and my free memory jumped by 4GB after I deleted it. It seems to have itemized it ascached
data so if you're looking at the+/- buffers/cache
line it won't change. – Bratchley Dec 28 '14 at 18:32htop
specifically. Just checked on my system and it's showing memory used sans cache so that's probably the issue. Thehtop
metric doesn't account for the area it's actually storing the file data in. – Bratchley Dec 28 '14 at 18:38