2 GB virtual memory Linux swap restrictions

Source: Internet
Author: User

In Linux, this virtual memory is called SWaP. Linux swap partitions are restricted. When installing the operating system, the installation wizard prompts you how much SWaP space you need to create. Generally, SWaP is 1-2 times the physical memory size.

1. Early linux restrictions on Virtual Memory

The Linux kernel earlier than linux2.2 supports Linux swap partitions or files up to MB. Linux swap has no more than 16 partitions or files.

Therefore, before linux2.2, the maximum available virtual memory was 128 MB * 8 = 1 GB.

2. Linux2.2.x limitations on Virtual Memory

Linux2.2.x supports Linux swap partitions or files up to 2 GB. The total number of Linux swap partitions or files cannot exceed 8.

Therefore, in Linux2.2.x, the maximum available virtual memory is 2 GB x 8 = 16 GB.

3. Linux2.4.x restrictions on Virtual Memory

Linux swap partitions or files with a maximum of 2 GB are supported before Linux2.4.10. The total number of Linux swap partitions or files cannot exceed 8.

Therefore, before Linux2.4.10, the maximum available virtual memory is 2 GB x 8 = 16 GB.

Linux swap partitions or files with a maximum of 2 GB are supported. Linux swap has no more than 32 partitions or files.

Therefore, after Linux2.4.10, the maximum available virtual memory is 2G * 32 = 64G

In terms of memory management policy, like the change from Windows 98 to Windows, Linux2.4.x saves more dirty pages in the memory and swap areas, rather than timely memory recovery, to improve system efficiency.

In addition, if you have more than one disk and have created Linux swap on different disks, linux uses these swap partitions in raid 0 mode.

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.