Java memory size limit

Source: Internet
Author: User

When running Java programs, especially the app server, we often need to increase the JVM heap size. Set the heap size in the parameter format of-xms256m-xmx256m, and set the memory size of the perm space in the format of-XX: permsize = 256 m-XX: maxpermsize = 256m.

However, from the perspective of the operating system, the memory size of a running process that can be applied for is limited. Instead of making an application at will.

In Linux, you can use ulimit-a to manually set the memory size of processes that can be applied by the process. However, on Windows, I do not know how to manually set this value. You can tell me what you know.

In Windows XP (other Windows la s have not been tested), the memory size of a process that a process can apply for cannot exceed half of the physical memory. For a JVM, the size of-xmx and-XX: maxpermsize should not exceed half of the physical memory, considering that-xmx and-XX: maxpermsize are only the majority of JVM memory, not all. Therefore, the sum of-xmx and-XX: maxpermsize should be slightly less than half of the physical memory.

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.