Increase size of tmpfs file system
tmpfs filesystem keeps the entire filesystem (with all it’s files) in virtual memory. All data is stored in memory, which means the data is temporary and will be lost after a reboot. If you unmount the filesystem, all data in there is gone. Typically it is mounted to /dev/shm (b/c glibc expects it to be mounted there for POSIX shared memory). You can also find a lot of installations mounting it to /tmp and hence anything written to /tmp is wiped after a reboot.
The default size of the filesystem is half of the installed memory in the system.
To increase the size, do the following:
- Modify /etc/fstab line to look something like this:
tmpfs /dev/shm tmpfs size=24g 0 0 - mount -o remount tmpfs
- df -h (to see the changes)
- Note: Be careful not too increase it too much b/c the system will deadlock since the OOM (Out-Of-Memory) handler can not free up that space.
References:
http://lxr.linux.no/linux/Documentation/filesystems/tmpfs.txt
thanks