Java Startup parameter Two

Source: Internet
Author: User

Non-standard parameters, also known as extension parameters, have the following list:
-xint
Set the JVM to run in interpreting mode, and all bytecode will be executed directly without compiling the cost code.

-xbatch
Turn off background Code compilation, force the foreground compile, compile after the completion of code execution;
By default, the JVM is compiled in the background, and if it is not compiled, the foreground runs in interpreted mode when the code is running.

-xbootclasspath:bootclasspath
Allows the JVM to load Bootclass from the specified path (which can be a semicolon-delimited directory, jar, or zip) to replace the JDK's Rt.jar;
-xbootclasspath/a:path
Appends all files of the specified path to the default bootstrap path;
-xbootclasspath/p:path
Having the JVM take precedence over the bootstrap default path to load all files of the specified path;

-xcheck:jni
Additional check of the JNI function, at which time the JVM officer passed to the validity of the JNI function parameter, when the illegal data is encountered in the local code, the JMV will terminate with a fatal error, and the performance will be degraded after using this parameter, please use caution.

-xfuture
Let the JVM perform a strict format check on the class file (the default JVM does not perform a strict format check) to conform to the class file format specification, which is recommended for developers.

-xnoclassgc
Turn off GC functionality for class, because it prevents memory recycling, so it may cause outofmemoryerror errors, use caution;

-xincgc
Turn on incremental GC (which is off by default), which helps reduce application pauses during long GC, but because it is possible to execute concurrently with the application, it reduces the CPU's ability to handle the application.

-xloggc:file
Similar to the-VERBOSE:GC feature, just log the correlation of each GC event to a file, preferably locally, to avoid potential problems with the network.
If the verbose command appears on the command line at the same time, the-XLOGGC will prevail.

-xmsn
Specifies the initial size of the JVM heap, which defaults to 1/64 of physical memory, with a minimum of 1M, and can specify units, such as K, M, by default, if not specified.

-xmxn
Specifies the maximum value of the JVM heap, which defaults to 1/4 or 1G of physical memory, and the minimum is 2M; units are consistent with-XMS.

-xprof
Keep track of running programs and trace data in standard output, suitable for development environment debugging.

-xrs
Reduce the JVM's use of operating system signals (signals), which is valid from 1.3.1;
Starting with jdk1.3.0, the JVM allows the program to execute some code (such as closing the database's connection pool) before shutting down, even if the JVM is abruptly terminated;
The JVM shutdown tool satisfies the above functions by monitoring the related events of the console, or, more specifically, registering the console's control handler before closing the tool, and then Ctrl_c_event, Ctrl_close_event, ctrl_logoff_ event, and ctrl_shutdown_event these types of events directly return true.
However, if the JVM is running in the background as a service (such as a servlet engine), he can receive the Ctrl_logoff_event event, but it does not need to initialize the shutdown program at this time, in order to avoid the recurrence of similar conflicts, The-XRS parameter is provided starting from jdk1.3.1, and when this parameter is set, the JVM will not receive control handler of the console, that is, he does not monitor and process ctrl_c_event, ctrl_close_event, Ctrl_logoff_event, or Ctrl_shutdown_event event.

-xssn
Sets the size of a single line stacks, which is typically 512k by default.

Above these parameters, such as-xmsn,-XMXN ... are important parameters in our performance optimization;
-xprof,-xloggc:file, etc. are in the absence of professional tracking tools in the wrong position;
The-xbootclasspath/a:path is used in the configuration of the Jprofiler mentioned in the previous section;

Java Startup parameter Two

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.