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
user128712
  • 2,372

1 Answers1

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

Mitch
  • 107,631