tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Endre Stølsvik <>
Subject Re: JVM memory size changing dramatically
Date Thu, 29 Jul 2004 09:08:25 GMT
On Wed, 28 Jul 2004, Dennis Dai wrote:

| Can't remember where I read it but it's something like this on
| NT/2k/XP/2k3 family:
| Windows is using the physical memory as cache to cache the real app
| image in the swap file. So if your app has been idle for a while, it's
| very likely to be swap out of the physical memory. This is regardless of
| how much physical memory you have.
| Interesting approach but sometimes annoying.

Yes, this is called something "progressive" or "aggressive" swapping or
something: it swaps away idle physical memory even if it isn't short in
it, just to have max amount of physical memory ready at any time.

On windows, you'll often notice that it's a real drag to get your windows
desktop going in the morning (given that it is on 24/7, of course), like
every app is taking a long time to get its window up and such. This is
caused by this aggressive swapping scheme.

Regarding the initial question, have you turned on every column there is
on the task manager? There are lots other than the inital few ones. It
might be that you're looking at something like the "memory actually mapped
physically"-column, while the "image size" is the same.

When you get your 500 visitors, it won't go down to 5 MB - since
everything is active then. But do some testing.. (!) - your app might
crash for other reasons than memory.

Also, you apparently say that 256 MB should be the -inital- memory
allocated (-Xms256), it is actually a bit weird that it shows steadily 80,
when you've asked java to pre-allocate 256 MB. You could log, now and
then, the values reported by the all the Runtim.*Memory() methods (there
are one extra on 1.4 than 1.3) - they give you a clues to how much mem the
JVM has allocated for "java".

As a side note, I'll heavily recommend swapping the bad task manager for
the MUCH better and information-rich "process explorer" from sysinternals:
(One thing that is just amazing with this, is the feature of scanning
through the processes to find which process have opened/locked a file - MS
themselves haven't come up with this obvious feature yet ("lsof" on
unix).. )

Have fun!

One question from me: where do you get all those other options from? Where
do I get a listing of those extra-options, documentation?

Endre Stølsvik               M[+47 93054050] F[+47 51625182]
Developer @ CoreTrek AS         -
CoreTrek corporate portal / EIP -

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message