Concurrency Quote by Brian Goetz
““Debugging tip: For server applications, be sure to always specify the -server JVM command line switch when invoking the JVM, even for development and testing. The server JVM performs more optimization than the client JVM, such as hoisting variables out of a loop that are not modified in the loop; code that might appear to work in the development environment (client JVM) can break in the deployment environment (server JVM).””
About This Quote
Source Talk: Java Performance Tips, 2015
Using the server JVM switch enables optimizations that prevent code from failing when moving from development to production.
In simple terms: Specify the server JVM for better performance and reliability.
Always use the server JVM in production.
Themes
Mood
Type
When to use this quote
- development
- testing
- production
- performance tuning
Key Concepts
Questions to Reflect On
- Do you test both JVM modes?
- How does this affect debugging?
Server JVM may not be needed for small scripts; adds complexity.