Appendix A. Summary of Tuning Flags
Flag | What it does | When to use it | See also |
| Chooses the server compiler. | For long-running applications that need fast performance. | |
| Chooses the client compiler. | For applications where startup is the most important factor. | |
| Uses tiered compilation (both client and server). | For applications where you want the best possible performance and have enough available native memory for the extra compiled code. | |
| Reserves space for code compiled by the JIT compiler | When you see a warning that you are out of code cache, and generally when using tiered compilation. | |
| Allocates the initial space for code compiled by the JIT compiler. | If you need to preallocate the memory for the code cache, which is very uncommon. | |
| Sets the number of times a method or loop is executed before compiling it. | When using the server compiler, this can cause more methods to be compiled, and methods to be compiled sooner. The first case is sometimes an advantage if you aren’t using tiered compilation. | |
| Provides a log of operations by the JIT compiler. | When you suspect an important method isn’t being compiled, or are generally curious as to what the compiler is doing. |
Get Java Performance: The Definitive Guide now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.