Modify/DEV/SHM Tmpfs file system size under Linux

Source: Internet
Author: User

The default system will load/DEV/SHM, which is called TMPFS, some say with RAMDisk (virtual disk), but not the same. Like a virtual disk, TMPFS can use your RAM, but it can also be stored using your swap partition. And the traditional virtual disk is a block device, and requires a command such as MKFS to really use it, TMPFS is a file system, not a block device; you just install it and it's ready to use.

TMPFS has the following advantages:
1. The size of the dynamic file system.

Another major benefit of the 2.TMPFS is its lightning-like speed. Because a typical TMPFS file system resides completely in RAM, read-write can be almost instantaneous.

3.TMPFS data is not retained after a reboot because virtual memory is inherently volatile. So it is necessary to do some scripts such as loading, binding operations. Typically use/DEV/SHM for shared memory Shm_open,shm_unlink). /DEV/SHM is a temporary Document System (TMPFS) that is capable of mount from/etc/fstab. Therefore, standard-supported parameters such as "size" can be used to increase or decrease the TMPFS size on/dev/shm. (by default, his size is half of the system RAM)

Adjust the size of the/DEV/SHM

1) View Size

Df-h/DEV/SHM

2) Size Change

vi/etc/0

3) Re-mount

umount/dev/SHM Mount/dev/shm

4) View the modified size

Df-h/DEV/SHM

5) Do not restart modify TMPFS size Mount-o Remount,size=38g/dev/shm

Modify/DEV/SHM Tmpfs file system size under Linux

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.