How to mount TMFS in Centos


TMFS is called as Temporary File System/Temporary File Storage

tmfs is used for shared memory concept. This is an efficient way to passing data between processes and this is used to speed up the linux operating system.

tmfs is mounted file system on every linux, instead of virtual memory this will use a storage device.

The command mount will show you a /dev/shm as a tempfs file system. So this is a file system, which keeps all files in virtual memory.

And tmpfs is temporary, so all files in the hard disk will save in temporary manner. If you unmount the /dev/shm file system all the data will be lost.

[root@server.local ~]#df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/VolGroup00-LogVol00
57G 16G 39G 29% /
/dev/sda1 99M 63M 31M 68% /boot
tmpfs 5.9G 0 5.9G 0% /dev/shm

Where tmfs is used?

Mostly tmfs is used in ERP system such as Oracle, SAP & Linux system performance. You can see the difference in heavily loaded servers.

How to increase the tmfs?

We have the feature of increasing the tmfs file system on the fly. The below is the example.

[root@server.local ~]#mount -o remount,size=8G /dev/shm

The above command will increase tmfs file system size from 6G to 8G. To make this changes on next boot, we have to add this in /etc/fstab file.

[root@server.local ~]#vi /etc/fstab

Modify /dev/shm entry

none /dev/shm tmpfs defaults,size=8G 0 0

Leave a comment

Leave a comment