128 M swap limit exceeded

Source: Internet
Author: User

Some Linux (Chinese version) Installation manuals often show that the swap space cannot exceed 128 MB. Why is there such a saying? Before explaining the history of the number "M", I would like to give a question: there is no m limit at all! The current limit is 2 GB! Swap space is paging. The size of each page is the same as that of the Memory Page, facilitating data exchange between swap space and memory. In the earlier version of Linux, when implementing the swap space, the first page of the swap space is used as a bit map for all the swap space pages ). This means that each bit on the first page corresponds to a page of swap space. If this parameter is set to 1, swap is available on this page. If it is set to 0, this page is a bad block and cannot be used. In this case, the first swap ing bit should be 0, because the first page of swap is a ing page. In addition, the last 10 ing bits are also occupied to represent the swap version (the original version is swap_space, and the current version is swapspace2 ). If the size of one page is S, the swap implementation method can manage "8 * (S-10)-1" swap pages. For i386 systems, if S = 4096, the total space size is 133890048. If 1 MB = 2 ^ 20 byte, the size is exactly 128 M.

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.