Start JBoss actually appears, error occurred during initialization of VM

Source: Internet
Author: User
Tags garbage collection jboss xms

occurs when you start JBoss

Error occurred during initialization of VM


Could not reserve enough spaces for object heap

could not create the Java virtual machine. Press any key to end

in this case, setting the virtual memory value in the JBoss startup file Run.bat is too large, it's OK to change the size


java_opts= "$JAVA _opts-xms512m-xmx1024m-dprogram.name= $PROGNAME"

on the interpretation of Java_opts:

In recent months, some memory problems have been identified in the performance test project, which involves java_opts configuration in JBoss, for example;
Java_opts= "-server-xms1536m-xmx1536m-xx:newsize=320m-xx:maxnewsize=320m-xx:permsize=96m-xx:maxpermsize=256m- Xmn500m-xx:maxtenuringthreshold=5″
Java_opts is not the same, different applications, software and hardware environment, in order to fully play the application performance, these parameters inside the settings can be very skilled and have accumulated experience.
After looking at the data, first look at the meaning of the java_opts parameter expression.

-server: Be sure to be the first parameter, good performance on multiple CPUs
-XMS: Initial heap size, minimum memory used, higher CPU performance should be set larger
-xmx:java heap maximum value, maximum memory used
The above two values are the minimum and maximum memory allocated to the JVM, depending on the size of the hardware physical memory and are recommended to be half of the physical memory. -xx:permsize: Set the permanent storage area of memory
-xx:maxpermsize: Set a permanent save area for maximum memory
-xx:maxnewsize:
-XSS 15120 This allows JBoss to consume 15M of memory for each additional thread (thread), and the best value should be 128K, and the default value might be 512k.
+xx:aggressiveheap will make XMS meaningless. This parameter lets the JVM ignore the xmx parameter, eats up a G-physical memory crazily, and then eats up a g swap.
-XSS: Stack size per thread
-VERBOSE:GC Real Garbage Collection information
-xloggc:gc.log Specify garbage collection log files
The heap size of the-xmn:young generation, generally set to one of the 3 and 4 points of xmx
-XX:+USEPARNEWGC: Shorten the time of minor collection
-XX:+USECONCMARKSWEEPGC: Shorten the time of major collection
Tip: This option is more appropriate when the heap size is larger and the major collection time is longer.

Under the stable development architecture environment, it is suggested that a java_opts configuration with practice and experience can be very practical to serve the current development and testing software flow.


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.