> -----Ursprungliche Nachricht-----
> Von: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]
> Auftrag von Pier Fumagalli
> Gesendet: Donnerstag, 20. Marz 2003 20:37
> An: [EMAIL PROTECTED]
> Betreff: Re: [HELP] determining possible leak
>
>
> > symptoms:
> > - webapp runs fine for hours (12-24 hours) with a max. cpu
> usage of about
> > 4%
> > - memory usage is continuously rising
> > - at some point cpu usage continuously around 100%, distributed to the
> > processors
>
> Nothing in the logs? No output to standard output/error? Do you see an
> OutOfMemoryException?

no OutOfMemoryException.

>
> > can anyone explain
> > - the discrepancy between the memory usage reported by the store-janitor
> > and ps/top?
>
> Well, what you set by -Xmx is how much memory the JVM will
> allocate for JAVA
> objects... Top reports how much memory the JVM actually occupies (the JVM
> itself PLUS the Java Heap)...

yes, I know, the maximum heap size. but I thought the JVM's consumption
would be fixed size; if I set -Xmx128m and get the mem usage rising higher
than 200MB I assume it's not the memory the JVM needs itself. or is it?

> > - where the leak may be? (from the janitor's values I assume it's not
> > within the JVM but within the java process?)
>
> Are you sure it's a memory leak? How can you be sure of that? The JVM will
> grow slowly to basically occupy all its heap, but will never release back
> its "unused" memory to the underlying OS...

I was not sure, it was my best guess ;-) as mentioned after a fresh start
everything is fine. and the only constantly changing factor directly visible
to me was the memory usage. and the high cpu usage only occuring at high mem
usage. strange though that the cpu usage wouldn't decrease afterwards until
the whole webapp was stopped.

another thing I remember now; before shutting tomcat completely down I tried
it with restarting the context. but to no avail; instead of going back to
normal/decreasing another fixed amount of memory (about 5MB) would be gone
with the wind instantly. the same with the second and third context restart.

> > finally, a snip from the janitor's log. please note that top reports a
> > memory usage of about 223MB. -Xmx is -Xmx196. cpu usage is
> currently normal.
> > but this maybe because the JVM's heap size hasn't reached its
> maximum yet
> > (according to the janitor).
>
> Yes, there's nothing wrong with this log... If you set the VM to run with
> -Xms196 -Xmx196, you'll have a VM which after initialization should not
> claim any more memory from the OS... You should first use this to
> see if you
> actually have a memory leak or not. And then only use the output from the
> store janitor.

will try if the problem shows up again. for some strange reason everything
seems currently normal. murphy's law I guess ;-)

anyway, tnx.

Reply via email to