TMPFS

From Wikipedia, the free encyclopedia

TMPFS is a Linux file system which keeps all files in virtual memory. It is supported by the Linux kernel from version 2.4 and up. TMPFS distinguishes itself from ramdisk by using memory dynamically, through swapping unneeded pages onto swap space.

Everything is temporary in the sense that no files will be created on the hard drive; however, swap space is used as backing store in case of low memory situations. On reboot, everything in tmpfs will be lost.

The memory used by TMPFS grows and shrinks to accommodate the files it contains and is able to swap unneeded pages out to swap space. RAMFS, in contrast, does not make use of virtual memory (which can be an advantage or disadvantage). In addition, MFS and some older versions of ramfs did not grow and shrink dynamically and instead used a fixed amount memory at all times.

SHMFS is another name for TMPFS

Usage of tmpfs for example is "mount -t tmpfs -o size=1G,nr_inodes=10k,mode=0700 tmpfs /space" which will allocate 1GB in RAM/swap with 10240 inodes and only accessible by root (or any other owner of the directory /space). Loop mount is not possible with tmpfs.

Many Linux distributions enable and use tmpfs, this could be checked with df. One example output is this:

tmpfs                   516792         0    516792   0% /dev/shm

See this article for more info: http://www-128.ibm.com/developerworks/library/l-fs3.html

Windows systems have a rough analog to TMPFS in the form of "Temporary temporary Files". Files created with both FILE_ATTRIBUTE_TEMPORARY and FILE_FLAG_DELETE_ON_CLOSE are held in memory and only written to disk if the system experiences low memory pressure. In this way they behave like TMPFS, except the files are written to the specified path during low memory situations rather than swap space. This technique is often used by servers along with TransmitFile to render content to a buffer before sending to the client.

  • article (Christoph Rohland, Nov 2001)
Advanced Search
Included Web Search Engines


Safe Search

close

Top Matching Results

Occasionally Search.com will highlight specialized results that are based on the context of your query. Examples of specialized results include specific links to news, images, or video.

Top Matching Results may highlight information from other Search.com pages, content from the CNET Network of sites, or third party content. The listings are based purely on relevance. Search.com does not receive payment for listings in this section but our partners that provide this data may get paid for listing these products.

Sponsored Links

This section contains paid listings which have been purchased by companies that want to have their sites appear for specific search terms and related content. These listings are administered, sorted and maintained by a third party and are not endorsed by Search.com.

Search Results

Search.com sends your search query to several search engines at one time and integrates the results into one list which has been sorted by relevance using Search.com's proprietary algorithm. You can customize the list of search engines included in your metasearch from the preferences.

The search engines that are used in your metasearch may allow companies to pay to have their Web sites included within the results. To view the Paid Inclusion policy for a specific search engine, please visit their Web site. Search.com does not accept payment or share revenue with any search engine partner for listings in this section.