Linux (ubuntu) Virtual Memory settings

Source: Internet
Author: User

For Linux (ubuntu) virtual memory, the swap space is the virtual memory, which is of great use when the physical memory is insufficient. View the memory space size: free-m // m indicates that the displayed byte unit is m (megabytes). Next we will increase the system's Swap size. 1. Run the free command to view the Swap partition size in the system. Free-m total used free shared buffers cachedMem: 1002 964 38 0 21 410-/+ buffers/cache: 532 470 951 Swap: 929 32 951 you can see that Swap is only M, does not comply with Oracle-xe-client installation requirements. 2. Create a Swap file. Mkdir swapcd swap sudo dd if =/dev/zero of = swapfile bs = 1024 count = 100000 the following prompt appears. The count in the preceding command indicates the swap file size. 100000 + 0 read records 100000 + 0 write 102400000 bytes (102 MB) Copied, 0.74704 seconds, 137 Mbit/s to convert the generated file to the Swap file sudo mkswap swapfile Setting up swapspace version 1, size = 102395 kBno label, UUID = 09fde987-5567-498a-a60b-477e302a988b 3. activate the Swap file. Sudo swapon swapfile view the free-m result again. Total used free shared buffers cachedMem: 1002 967 34 0 22 410-/+ buffers/cache: 534 467 1053 Swap: 1021 32 added successfully. Extension: If You Need To uninstall this swap file, you can enter the created swap file directory. Run the following command. Sudo swapoff swapfile if you need to keep this swap all the time, you can switch sudo-s to root and write it to the/etc/fstab file. Swapfilepath swap defaults 0 0 tears shot by the author

Related Article

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: 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.