Explanation of 2GB upper limit of JVM memory in Linux system

Source: Internet
Author: User
We usually use a 32-bit JVM (64-bit JVM will lose 10-20% performance, usually not recommended), and the 32-bit program should be 4GB to address space, why the JVM memory on Linux only use 2GB?

After communicating with the JDK development team, we finally got some relevant reasons. This problem exists in some earlier versions of Linux, especially in the previous version of Kernel 2.5, which is largely absent from the 2.6 version. The original Linux version of the process has a memory 2GB limit, is an address contiguous memory block size limit, and the JVM heap space (heap size) requires a continuous address space, therefore, 2GB is the Java process theory uses the upper memory limit.

If the Java application requires larger memory, it is recommended to use a newer version of Linux, or modify the Linux application/kernel memory ratio to 3GB:1GB. There is also the choice of Unix operating systems such as Solaris. Operating systems such as Solaris do not have a 2GB limit on JVM memory management, so the heap size can be set to around 3.5-3.6GB.

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.