Optimizing on Windows 2000

I have a game server that chokes for 2-3 seconds every now and then. It might have to do with:

  1. Garbage collection
  2. External programs in Windows hogging memory
  3. Unoptimized code

What can i use besides -gc to keep track of garbage collection?

What programs are there that keep a history log of how much memory and CPU programs are using?

What programs can be used to find bottlenecks in code?

Start your application with the “-verbose:gc”-switch and you’ll see how often gc kicks in and how long it takes.

With jdk1.5, you might want to try and have a look at jconsole…

http://java.sun.com/developer/technicalArticles/J2SE/jconsole.html

Otherwise, commercial optimizers have stuff for detecting and explaining these pause (at least OptimizeIt and JProfiler). I haven’t tried yet JFluid with netbeans 4.

Lilian