Hello, today i want to describe little bit about RAMFS in Linux distros.
There are some cases when RAM file system helps with performance and some in flexibility. Mostly were used in different live system (lice cd or etc.). But today there are a lot of new cases with dynamical storing of small files. For example in case of storing proxy cache, session, temporary files and etc…
So, how we can create any RAM file system out of the Linux box.
First of all you have to predict how many free RAM do you have ? And how many you could allocate for RAM disk. In my example i’m going to store at /var/cache mount point about 128Mb of data. Here is my mount command:
mount -t tmpfs -o size=128m tmpfs /var/cache
[root@localhost conf]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/VolGroup-lv_root 6.7G 1.6G 4.8G 25% /
tmpfs 499M 0 499M 0% /dev/shm
/dev/sda1 485M 54M 407M 12% /boot
tmpfs 128M 3.9M 125M 4% /var/cache