32

I have read about moving the tmp folder to ram would increase performance and also read about ramfs using ram as storage and tmpfs using ram as strorage too but what should I use in /etc/fstab:

tpmfs :

none /tmp tmpfs nr_inodes=200k,mode=01777,nosuid,nodev,size=500mb 0 0

ramfs :

none /tmp ramfs nr_inodes=200k,mode=01777,nosuid,nodev,size=500mb 0 0

1 Answer 1

41

The short answer is that

Primarily both ramfs and tmpfs do the same thing with some differences. Ramfs will grow dynamically. But when it goes above total RAM size, the system may hang, because RAM is full, and can't keep any more data.

Tmpfs will not grow dynamically. It would not allow you to write more than the size you’ve specified while mounting the tmpfs.

Tmpfs uses swap, where as Ramfs doesn't.

Source:csdn

1
  • Why would ramfs hang a system? It surely would not be used as a system resource in the way a swap file might be. Mar 16, 2023 at 19:34

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .