Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
java [2012/12/06 17:27] 194.249.198.48 [Good/best practices] |
java [2012/12/06 17:29] 194.249.198.48 |
||
---|---|---|---|
Line 42: | Line 42: | ||
</ | </ | ||
- | ==== Good/best practices ==== | + | ==== Choosing the garbage collector ==== |
+ | |||
+ | ===== Good/best practices | ||
1. OpenJDK 1.6 and 1.7 may (as of now, 6. 12. 2012) still be unstable in stressful production environments leading up to segmentation faults and unintended behaviour. Use Sun/Oracle JVM for maximum stability and performance. | 1. OpenJDK 1.6 and 1.7 may (as of now, 6. 12. 2012) still be unstable in stressful production environments leading up to segmentation faults and unintended behaviour. Use Sun/Oracle JVM for maximum stability and performance. | ||
- | ==== Examples ==== | + | ===== Examples |
tying to limit jvm to ~2G of RAM (java x86_64) | tying to limit jvm to ~2G of RAM (java x86_64) | ||
Line 54: | Line 56: | ||
java (i386) | java (i386) | ||
java -Xms1400m -Xmx2G -XX: | java -Xms1400m -Xmx2G -XX: | ||
- | ==== Troubleshooting ==== | + | |
+ | ===== Troubleshooting | ||
=== Resolving java.lang.OutOfMemoryError: | === Resolving java.lang.OutOfMemoryError: | ||
Line 67: | Line 70: | ||
(Note that Xmx is separate from the PermGen space, so increasing Xmx will not help with the PermGen errors). \\ | (Note that Xmx is separate from the PermGen space, so increasing Xmx will not help with the PermGen errors). \\ | ||
**The PermGen memory in addition to the Xmx memory. | **The PermGen memory in addition to the Xmx memory. | ||
- | |||