>From: Bryce McKinlay
>
>Hi, I have a weird problem with JDK 1.2 - 'ps' and 'top' report massive amounts of
>memory being used by the jdk whenever I run *anything* in java:
>
>[bryce@p2-bryce bryce]$ ps aux | grep java
>USER PID %CPU %MEM SIZE RSS TTY STAT START TIME COMMAND
>bryce 31839 6.9 11.6 75424 7380 p0 S 22:12 0:01 /usr/local/java/bin/i
>bryce 31863 0.0 11.6 75424 7380 p0 S 22:12 0:00 /usr/local/java/bin/i
>bryce 31864 0.0 11.6 75424 7380 p0 S 22:12 0:00 /usr/local/java/bin/i
>bryce 31865 0.0 11.6 75424 7380 p0 S 22:12 0:00 /usr/local/java/bin/i
>bryce 31866 0.1 11.6 75424 7380 p0 S 22:12 0:00 /usr/local/java/bin/i
>
>I'm pretty sure that java isn't *really* using 75MB of memory - total mem usage, as
>reported by top, only increases by 5MB or so.
>
>What could be causing this??
Top reports the "virtual address space used" by the process. This includes
shared memory, mapped but uncommitted memory, and mapped files (such as
things that are mmap()'ed) The actual workingset at the current time is
also somewhat hard to count but the RSS is the physical memory currently
used but it also includes the shared libraries (for ELF binaries, which
is what the JDK is)
See the man page for TOP.
As you can see here, the number is 7380K, much of which is shared, but some
of which (depending on the java code that is running) is the byte code that
is running (and any JIT'ed native code if you happen to have a JIT too)
Michael Sinz -- Director of Research & Development, NextBus Inc.
mailto:[EMAIL PROTECTED] --------- http://www.nextbus.com
My place on the web ---> http://www.users.fast.net/~michael_sinz
----------------------------------------------------------------------
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]