Thursday 10 November 2011

Increase SIZE of tmpfs File System - Online

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:
1.        Modify /etc/fstab line to look something like this:
tmpfs                   /dev/shm                tmpfs   size=24g        0 0
2.       mount -o remount tmpfs
3.       df -h      (to see the changes)
4.       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
http://www.xenotime.net/linux/doc/swap-mini-howto.txt

1 comment:

Blogger said...

Did you know that that you can make cash by locking special areas of your blog / website?
Simply open an account on Mgcash and run their content locking widget.