Hi everybody,
For maximum separation of environment we want to run multiple java
instances (each running a webserver). now at peak moments I want these
to use the maximum heap, however, if the peak moments are passed, it
should free up the heap it doesn't use. Is this possible? Is it even
nessesary? What are the alternatives. I must be able to shut one JVM
down without it affecting the others.
Thanks in advance,
Vincent
Thomas Hawtin - 21 Jul 2006 13:09 GMT
> For maximum separation of environment we want to run multiple java
> instances (each running a webserver). now at peak moments I want these
> to use the maximum heap, however, if the peak moments are passed, it
> should free up the heap it doesn't use. Is this possible? Is it even
> nessesary? What are the alternatives. I must be able to shut one JVM
> down without it affecting the others.
Usually for a server application you want a fixed allocation of memory.
Set -Xms and -Xmx to the same value. It shouldn't be all of the system
memory - you will want some for the operating system and file cache. If
you have variable heap sizes with maximum near physical memory size,
then when all the applications are hit at once the machine will swap badly.
Don't start opening desktop applications on the server. Small
administrative programs should just take physical memory away from the
file cache. Probably the best move is to buy boatloads of RAM.
Tom Hawtin

Signature
Unemployed English Java programmer
http://jroller.com/page/tackline/