[oclug] Monitoring memory usage
Stephen M. Webb
stephenw at xandros.com
Mon Feb 21 16:36:39 EST 2005
On 21/02/05 04:10 pm, Mark wrote:
> I am trying to figure out how much memory a process is really using (in
> this case tomcat). I tried ps and top, they give me different numbers.
>
> Here is what top says:
> PID USER PRI NI SIZE RSS SHARE STAT %CPU %MEM TIME CPU COMMAND
> 23691 root 25 0 37584 36M 11300 S 0.0 1.8 0:06 0 java
>
>
> Here is what "ps vgax" says:
> PID TTY STAT TIME MAJFL TRS DRS RSS %MEM COMMAND
> 23691 ? S 0:06 3383 55 456676 37580 1.8
> /usr/java/jdk/bin/java ...bla...
Those numbers look remarkably identical. 37580 vs. 37584 vs. 36M, I can't see
the difference, can you see the difference? You're not even going to swap
(must be an older kernel).
> Tomcat it self says the following (getting it from the Java-VM):
> JVM
> Free memory: 5.09 MB Total memory: 11.62 MB Max memory: 254.06 MB
>
> So what is true now?
> [...]
> But the 36MB of top vs. the 12MB tomcat reports is a little too inaccurate.
> I didnt think that the java VM had that much overhead?!
Well, now you know.
Seriously, 24 M doesn't sound unreasonable for JVM overhead to me.
--
Stephen M. Webb
stephen.webb at bregmasoft.com
More information about the OCLUG
mailing list