What is the difference between tmpfs and ramfs

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

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

0

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like