Explanation of JVM memory limit of 2 GB in Linux

Source: Internet
Author: User
This article provides a detailed analysis of the JVM memory limit of 2 GB in Linux, for more information, see the 32-bit JVM we usually use (64-bit JVM will lose 10-20% performance, which is generally not recommended ), the addressing space of 32-bit programs should be 4 GB. Why does the JVM memory on Linux only use 2 GB?

After communicating with the jdk r & D team, I finally figured out some relevant reasons. This problem exists in some earlier Linux versions, especially those earlier than kernel 2.5. later versions of kernel 2.6 basically do not have this problem. In the past, these Linux versions imposed a 2 GB memory limit on the process, which is the maximum size of memory blocks with a continuous address. The heap size of JVM requires a continuous address space, therefore, 2 GB is the maximum memory used by java process theory.

If a java application requires a large amount of memory, we recommend that you use a newer version of linux, or modify the Linux application/kernel memory ratio to 3 GB: 1 GB. In addition, select a UNIX operating system such as Solaris. For operating systems like Solaris, there is no 2 GB limit on JVM memory management. Therefore, you can set the heap size to around 3.5-GB.

For more details about how to resolve the JVM memory limit of 2 GB in Linux, please follow the PHP Chinese network!

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.