FAQ-JVM【官方版】
General
- What command-line options does the Java HotSpot VM provide for performance tuning?
- Are there any resources for troubleshooting HotSpot issues?
- I can't get profiling to work, what should I do?
- I keep running out of file descriptors, what should I do?
Memory and Garbage Collection
- Pause times are unnecessarily long, what parameters can I use to tune this?
- How do I profile heap usage?
- The VM prints "OutOfMemoryError" and exits. Increasing max heap size doesn't help. What's going on?
- Why can't I get a larger heap with the 32-bit JVM?
- Should I pool objects to help GC? Should I call System.gc() periodically?
- What determines when softly referenced objects are flushed?
- I'm getting lots of full GC's when I turn on -verbose:gc at regular intervals, I've tuned the heap and it makes no difference, what's going on?
JIT Compiler
- What's the difference between the -client and -server systems?
- Where do I get the server and client systems?
- I would like java to default to -server. I have a lot of scripts which I cannot change (or do not want to change). Is there any way to do this?
- Should I warm up my loops first so that Hotspot will compile them?
64-bit Java
- What is 64-bit Java?
- Which platforms and Java releases support 64-bit operation?
- Where can I download the 64-bit SDK or JRE?
- When you download the SDK or JRE, must you choose between the 32 and 64-bit versions?
- How do I select between 32 and 64-bit operation? What's the default?
- Are both -client and -server VM modes available in 64-bit Java?
- Which components do not support 64-bit operation?
- How is native code affected?
- When writing Java code, how do I distinguish between 32 and 64-bit operation?
- Will 32-bit native code work with a 64-bit VMs?
- Where can I learn more about 64-bit programming?
- What are the performance characteristics of 64-bit versus 32-bit VMs?
- What are the default heap sizes for 64-bit VMs if GC ergonomics is not used?
- How large a heap can I create using a 64-bit VM?
- Which garbage collector should I use for very large 64-bit heaps?
Multithreaded Applications
- I have a program which uses a lot of threads and it runs slow.
- My application has a lot of threads and is running out of memory, why?
- Which thread library should I use on Solaris 8?
- What options do I need in order to use the "alternate" one-to-one thread model on Solaris 8 or 9?
- How does the JVM map priorities for Java threads onto native thread priorities in Solaris?
Performance
- My application runs slowly. Why?
- My program isn't scaling with the number of processors.
- How many processors will the HotSpot VM scale to?
- My server application isn't getting faster, why? I/O is a problem, why?
- My application uses a database and doesn't seem to scale well. What could be going on?
Benchmarking the Java HotSpot VM
- I write a simple loop to time a simple operation and it's slow. What am I doing wrong? Here's my program
- I'm trying to time method invocation time. I don't want there to be any extra work done, so I'm using an empty method. But when I run with HotSpot I get times that are unbelievably fast.
- Okay, so I'll put some random code in the body of the method so it's not empty and the inlining can't just remove it. Here's my new method
- I'm trying to benchmark object allocation and garbage collection. So I have harness...
- I have a graphics-intensive or GUI-based program. Why doesn't HotSpot making my graphics code go faster?
- What do you recommend for benchmarking HotSpot, or any virtual machine?
歡迎關注本站公眾號,獲取更多信息