Introduced
/ dev/shm/ is a device that uses the Tmpfs file system, which is actually a special file system. the default size in Redhat is half of physical memory, so that time is not mkfs formatted.
TMPFS is a memory-based virtual file system on the Linux/unix system . TMPFS can use your memory or swap partition to store the file ( that is, its storage space in virtual memory , the VM consists of real memory and swap ). Thus, TMPFS primarily stores staged files. It has the following 2 advantages: 1. The size of the dynamic file system. 2. Tmpfs uses a VM-built file system, which is of course fast . 3. data loss after reboot.
When you deletetmpfs files ,tmpfs vm resources , linux tmpfs tmpfs squid /tmp, php session files are placed in /tmp, Socket file in /tmp, or use < Span lang= "en-US" >/tmp as cache device for other apps
Temporarily modify the/DEV/SHM size
#mount-o size=1500m-o nr_inodes=1000000-o noatime,nodiratime-o remount/dev/shm
Mount-t tmpfs-o size=20m tmpfs/tmp temporary mount use
Boot-enabled configuration
You can define its size in/etc/fstab
Tmpfs/dev/shm tmpfs,defaults,size=512m 0 0
TMPFS/ tmp tmpfs defaults,size=25m 0 0
After the modification, the execution of mount-o remoount/dev/shm takes effect
Mkdir/dev/shm/tmp (the new directory under/dev/shm/is bound to/tmp , then/ tmp uses the tmpfs file System )
chmod 1777/dev/shm/tmp
Mount--bind/dev/shm/tmp/tmp
- Related articles recommended:
- Modify the/dev/shm Tmpfs file system size under Linux
- An explanation of the SSH configuration file
- Linux File system path learning
- This article from: Hobby Linux Technology Network
- This article link: http://www.ahlinux.com/start/base/9596.html
TMPFS file system under Linux (/DEV/SHM)