tmpfs is a memory-based file system that can be used after installation. The following small series will give a detailed introduction to the use and size of Linux tmpfs. Interested friends can Come to understand.
tmpfs introduce
tmpfs is a virtual memory file system, rather than a block device. It is a memory-based file system. It does not need to be initialized with mkfs when it is created.
Its biggest feature is that its storage space is in VM (virtual memory), and VM is managed by the vm subsystem in the Linux kernel.
The size of the VM under Linux consists of RM (Real Memory) and swap. The size of RM is the size of physical memory, and the size of Swap is determined by itself.
Swap is the memory space virtualized by the hard disk, so its read and write speed is much slower than RM (Real Memory). When a process requests a certain amount of memory, the kernel vm subsystem finds no When there is enough RM, some unusable data in the RM will be exchanged into Swap. If you need to re-use the data, then exchange them from Swap to RM. If there is enough physical memory, you can not divide the Swap partition.
The VM consists of two parts, RM+Swap, so the maximum storage space of tmpfs is (The size of RM + The size of Swap). But for tmpfs itself, it doesn't know if the space it uses is RM or Swap, all of which is managed by the kernel's vm subsystem.
The default size of tmpfs is half of RM. If your physical memory is 1024M, the default size of tmpfs is 512M
In general, it is less than the physical memory size.
The size of the tmpfs configuration does not really occupy this memory. If there is no file under /dev/shm/, the memory it occupies is actually 0 bytes; if it is at most 1G, put it inside With 100M files, the remaining 900M can still be used by other applications, but the 100M memory it occupies will not be re-divided by system recycling.
When deleting files in tmpfs, the tmpfs file system driver dynamically reduces the file system and frees up VM resources.
############################################################################################### >
The Automatic Memory Management feature in Oracle uses /dev/shm.
LINUX can put temporary files of some programs in tmpfs, and use tmpfs to improve system performance faster than hard disk.
Previous12Next Total 2 Pages
An executable file is a portable executable file that is used for program execution
Lantern is a commonly used system monitoring tool, which is mostly used for Mac system and can also
In Linux, the fuser tool can be used to query the user of the file. In addition, th
In Linux system operation, in order to prevent files from being changed, you can protect the files w
Ubuntu tips to start the deb installation package with the dpkg command
Linux iis can not run asp file how to solve
How to use sed command in Linux
Ubuntu system remote boot operation example
Ubuntu10.10 configuration R environment method
How does Linux distinguish whether a computer has a USB 3.0 interface
CentOS automatically starts the desktop service after booting
What commands are used for Linux system monitoring?
Linux how to install and use NeoBundle
The Linux find command combined with xargs method
How to solve the problem that the WeChat public platform webpage cannot play audio under Linux?
Linux file system entry details
Linux supplementary primitive, interrupt, soft interrupt
Microsoft: Win10 will receive 2-3 functional updates every year.
Windows XP account security issues two
Windows7 personalized input method language bar icon setting method
Win10 modify the edits the hosts file can not save the solution
How does IE 9 browser display more browsing history?
Win8 boot automatic dial-up connection broadband