FAQ-JVM【官方版】

General

  1. What command-line options does the Java HotSpot VM provide for performance tuning?
  2. Are there any resources for troubleshooting HotSpot issues?
  3. I can't get profiling to work, what should I do?
  4. I keep running out of file descriptors, what should I do?

Memory and Garbage Collection

  1. Pause times are unnecessarily long, what parameters can I use to tune this?
  2. How do I profile heap usage?
  3. The VM prints "OutOfMemoryError" and exits. Increasing max heap size doesn't help. What's going on?
  4. Why can't I get a larger heap with the 32-bit JVM?
  5. Should I pool objects to help GC? Should I call System.gc() periodically?
  6. What determines when softly referenced objects are flushed?
  7. 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

  1. What's the difference between the -client and -server systems?
  2. Where do I get the server and client systems?
  3. 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?
  4. Should I warm up my loops first so that Hotspot will compile them?

64-bit Java

  1. What is 64-bit Java?
  2. Which platforms and Java releases support 64-bit operation?
  3. Where can I download the 64-bit SDK or JRE?
  4. When you download the SDK or JRE, must you choose between the 32 and 64-bit versions?
  5. How do I select between 32 and 64-bit operation? What's the default?
  6. Are both -client and -server VM modes available in 64-bit Java?
  7. Which components do not support 64-bit operation?
  8. How is native code affected?
  9. When writing Java code, how do I distinguish between 32 and 64-bit operation?
  10. Will 32-bit native code work with a 64-bit VMs?
  11. Where can I learn more about 64-bit programming?
  12. What are the performance characteristics of 64-bit versus 32-bit VMs?
  13. What are the default heap sizes for 64-bit VMs if GC ergonomics is not used?
  14. How large a heap can I create using a 64-bit VM?
  15. Which garbage collector should I use for very large 64-bit heaps?

Multithreaded Applications

  1. I have a program which uses a lot of threads and it runs slow.
  2. My application has a lot of threads and is running out of memory, why?
  3. Which thread library should I use on Solaris 8?
  4. What options do I need in order to use the "alternate" one-to-one thread model on Solaris 8 or 9?
  5. How does the JVM map priorities for Java threads onto native thread priorities in Solaris?

Performance

  1. My application runs slowly. Why?
  2. My program isn't scaling with the number of processors.
  3. How many processors will the HotSpot VM scale to?
  4. My server application isn't getting faster, why? I/O is a problem, why?
  5. My application uses a database and doesn't seem to scale well. What could be going on?

Benchmarking the Java HotSpot VM

  1. I write a simple loop to time a simple operation and it's slow. What am I doing wrong? Here's my program
  2. 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.
  3. 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
  4. I'm trying to benchmark object allocation and garbage collection. So I have harness...
  5. I have a graphics-intensive or GUI-based program. Why doesn't HotSpot making my graphics code go faster?
  6. What do you recommend for benchmarking HotSpot, or any virtual machine?
相關文章
相關標籤/搜索