Linux increases swap partition size

Source: Internet
Author: User

  Linux increased swap partition size 2016-08-2 13:54:58 Category: LINUX know Linux, the standard Linux installation, swap partition is twice times the size of memory, if the memory is added, the swap partition will also increase   If you add 1G of memory, the swap partition will increase by 2G   decide to modify the swap size, first create a swap file for partitioning in a space where appropriate: such as/swap1   #dd if=/dev/zero of=/swap1 bs=1m count=2048   If the infile,of means that outfile,bs=1m represents the increased module size, count=2048 represents 2048 modules, or 2G space   set the destination file to the swap partition file:   #mkswap/swap1   activate swap to enable swap partition files immediately:   #swapon/swap1   after restarting the system, the swap space will lose/swap1, and adding/SWAP1 to the/etc/fstab entry will allow the system to invoke Swapon-a from the Mount/swap1 in the init process, so that each time the machine restarts/ Swap1 are in a valid swap space.   Iv. Add the following line to the/etc/fstab file:   /swap1 Swap swap defaults 0 0   done! Use free to view swap sizes!

Linux increases swap partition size

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.