Re: options to java.exe
mitsura@skynet.be wrote:
Hi,
in our company we are using an monitoring tool that comes with a
console written in Java. It's a commercial product so we don't have
access to sources or to design info.
What I notice is that this console becomes slow after a few hours.
After a fresh restart the console is snappy again.
I see the memory usage increasing from about 50Mb to 170Mb. After
restart, the memory usage is again 50Mb.
There 'should' be no persistent data in the console itself. What I
mean is that the console gets all it's data from the server so the
data that you see in the console before/after a restart is the same.
My question is, are there any parameters that I can give to Java
runtime that might keep the performance of this console somewhat
constant? It is using j2re1.4.2.
I see that the only parameter given is '-Xmx128m'.
Any help much appreciated.
Kris
It depends on why it is running slowly. There could be two main reasons, and
each requires a different remedy.
Specifying -Xmx128m tells the JVM that the maximum heap size it can use is
128MB. If the Java application creates many objects then there is a good chance
that all this heap will be used, and the JVM will use garbage collection to
free unused objects. If the application is creating and destroying a lot of
objects and the heap is full then there will be a lot of garbage collection
going on. If your system has spare physical RAM then you might be able to
alleviate the garbage collection by increasing the heap size. However, if the
application is badly written then this might only serve to increase the
application size until the larger heap is full and the same problem re-occurs.
If this happens there's not a lot you can do, other than contact the software
developers and suggest they might want to improve their code ;-)
If your system is low on physical RAM then the application may be causing page
faulting. If the application can run with a smaller heap then you could try
lowering the max. heap size to avoid page faulting. If the system can be
upgraded you could add in more physical RAM, or stop any other applications
which are using up RAM.
--
Nigel Wade, System Administrator, Space Plasma Physics Group,
University of Leicester, Leicester, LE1 7RH, UK
E-mail : nmw@ion.le.ac.uk
Phone : +44 (0)116 2523548, Fax : +44 (0)116 2523555