This content has been marked as final. Show 2 replies
Are all threads allocating from the same memory area?
Are all threads run from a fresh VM ie same initial conditions?
Large arrays get treated differently to smaller objects. You could be seeing a number of different factors at play here.
If you post the entire working program I'd run it to get another set of data-points. But microbenchmarks like this aren't very meaningful to real programs, because it isn't clear what you are actually measuring.
I'd add to David Holmes' comments:
- what was the command line (options etc)?
- home many RTGC reserved bytes?
- what size was your ImmortalMemory?
- how many CPUs on the machine?
- how many CPUs assigned to RTGC?
- what priority were the threads?
- what else was occurring on the machine? I/O? etc.
- which version of Java RTS, 2.0 or 2.0u1?
- which processor, SPARC or x86?
- did you print out RTGC statistics?
- what size heap?
- why didn't you use Clock.getRealtimeClock().getTime()?
- how did you account for OS dispatching w/in the set of statements you are measuring?