Memory used by Java Virtual machine settings [WebLogic, WebSphere, JBOSS,ECLIPSE]__HTML5

Source: Internet
Author: User
Tags jboss xms
You can set the memory used for the Java Virtual machine, but the virtual machine will not compensate if your choice is incorrect. You can change the size of the virtual machine's memory using the command line. As shown in the following table, two parameters are used to set the amount of memory used by the virtual machine.
Parameter description
-XMS JVM Initialization Heap Size
Maximum value of the-xmx JVM heap

The size of these two values is generally set as needed. The size of the initialization heap performs the size of the memory that the virtual machine requests to the system at startup. Generally speaking, this parameter is not important. However, some applications in a large load of the case will be a sharp use of more memory, at this time this parameter is very important, if the virtual machine is set up at the start of the memory is relatively small and in this case there are many objects to initialize, the virtual machine must repeatedly increase the memory to meet the use. For this reason, we generally set the-XMS and-xmx to be the same size, while the maximum of the heap is limited by the physical memory used by the system. Typically, applications that use large amounts of data use persistent objects, and memory usage is likely to grow rapidly. When the application needs more memory than the maximum of the heap, the virtual machine prompts for a memory overflow and causes the application service to crash. Therefore, the maximum value of the generic recommended heap is set to 80% of the maximum available memory.
-------------------------------------
Tomcat can use the default memory of 128MB, in larger application projects, this memory is not enough, need to be scaled up.
Under Windows, under File {Tomcat_home}/bin/catalina.bat,unix, in front of the file {tomcat_home}/bin/catalina.sh, add the following settings: java_opts= '-xms ' Initialize memory Size "-XMX" the maximum memory that can be used "'
You need to increase the value of this two parameter. For example:
java_opts= '-xms256m-xmx512m '
Indicates that the initialization memory is 256MB and the maximum memory available is 512MB.
--------------------------------------
JBoss can use the default memory of 64MB

$JBOSSDIR $/bin/run.config

java_opts = "-server-xms128-xmx512"
--------------------------------------
Websphere enters the console to set (tentatively)
--------------------------------------
Eclipse
In the same directory, type
eclipse.exe-vmargs-xms256m-xmx512m
256m indicates JVM heap memory minimum value
512M indicates maximum JVM heap memory
--------------------------------------
Related Article

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.