java time slice duration performance

Understand the resolution of System.CurrentTimemillisecs

On windows this resolution seem to be 10ms from the above article

More commentary on timing through System.currentTimeMillis()

windows 95: 55 msec
NT, xp single processor: 10 msec
xp dual processor: 16 msec

Another important note on calendar

A nice primer on scheduler

Linux wants the time slice to be around 50 msec decreased from 200 ms in earlier versions. These are called scheduling quanta

The total time all runnable processes comes to conclusion runnign once. A new epoch starts right after.

windows scheduler differs from linux..

windows quanta is 6 ticks or 60 ms

windows server is 36 ticks or 360 msecs

The clock interval for most x86 uniprocessors is 10ms, and for most x86 multiprocessors, 15ms.

Tuning java guidelines from sun

5.0 performance white paper

To replace stringbuffer for not needing threadsafe environments.

Reflection in jdk 1.4 is much improved

See what is ergonomics

The ability of a jvm to tune itself

At least 2 cpus and 2GB of memory

All windows 32 bit machines are classified as clients

-server compiler
-XX:+UseParallelGC
-Xms initial heap 1/64th of the physical memory
-Xmx maximum 1/4 the machines physical memory to a max of 1GB

For a 32 bit box the maximum virtual memory is 4GB

The sum of java heaps should not exceed the physical RAM to avoid paging

Understand hotpot vm better. The home page

There is a ton of material to read and go through for a good set of recommendations. But for now based on what I know this is what I will do:

1. Analyze and Eliminate any application delays

2. Use jdk 1.5 and the latest update

3. Download and install the proper hotspot compiler for server

4. Set the options as laid out in tuning options 4.2.6 of the tuning white paper above .

-Xmx3500m
-Xms3500m
-Xmn2g
-Xss128k
-XX:ParallelGCThreads=20
-XX:+UseConcMarkSweepGC
-XX:+UsePareNewGC
-XX:SurvivorRatio=8
-XX:TargetSurvivorRation=90
-XX:MaxTenuringThreshold=31
-server

1. How to monitor how much memory is being used

2. what are the tools available to monitor a running jvm?