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.