Java concurrent programming practice (3) JVM server mode and client Mode

Source: Internet
Author: User

When talking about the volatile keyword, the author of java concurrent programming practices mentions the JVM server mode and client mode. I have never heard of this before, and I have to feel the narrow knowledge of myself, the vast world of programming! So I went to the Internet to read some other people's blogs and scanned them for blindness. Here I will record some related concepts.

First, let's talk about the difference between server mode and client mode. The Jvm has two versions: client and server, which are optimized for desktop applications and server applications respectively. The client Version loading speed is faster, while the server version loading speed is slower but runs faster. In short, the client Version starts fast and the server version runs fast. Because the CPU, memory, and hard disk of the server are more powerful than those of the client machine, after the program is deployed, it should be started in server mode to obtain better performance.

How can I check whether the installed JDK is client or server? You can run the java-version command in JDK_HOME/bin to view information about JVM.

Release + release/release + tjbGllbnSho9XiuPa + zcrHy/release/4i7Ex8O01PXDtMfQu7vE2D/release + qPC9wPgo8cD48cHJlIGNsYXNzPQ = "brush: java; ">-client KNOWN-server KNOWN-hotspot ALIASED_TO-client-classic WARN-native ERROR-green ERROR
Because-client is on top, it is started in client mode by default. If you want to start in server mode, switch the order of-client and-server.









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.