Oh, yes I do that all the time as a matter of sheer habit if you’re referring to keeping Xms and Xmx to be the same and equal to 300MB, for instance. If you look at some of my earlier e-mails under “GC Implementation Specifics” and “Problem with OutOfMemoryError” under this tuning topic, you will notice that that’s what I do. I picked up this hint, to be honest, from the Sun Performance Tuning “white paper”.
Just to keep the record straight, I’ve been fairly vocal in claiming that Java’s polymorphic method call and number crunching performances have been quite good and, if I may guardedly say so, even better than C++ in some cases with the server option.
In principle, my application should be able to handle gigabytes of data, even if not taxed typically in one shot, but certainly when run in a transient mode with hundreds of streaming datasets all within a max heap of 300-500MB or so. Each time a new dataset comes in, a dataflow network in conjunction with Java3D’s scenegraph structure, updates itself automatically and allocates and deallocates memory for humble things like texture mapping to more exotic things like dynamically phong shaded haloed lines, texture advection, animation, and convolution etc.
Some of my microbenchmarks for stressing gc indeed show that the gc munches garbage as if it were the last sweetest thing on earth :).
Let me know if you or folks here run into any extra-ordinary gc pauses.