Memory Accounting, JDKs [was: Re: [Techtalk] Java on Linux]

Val Henson val at nmt.edu
Thu Jan 10 18:50:19 EST 2002


On Thu, Jan 10, 2002 at 04:37:55PM -0800, Nicole Zimmerman wrote:
>
>    procs                      memory    swap          io     system       cpu
>  r  b  w   swpd   free   buff  cache  si  so    bi    bo   in    cs  us sy id
>  0  0  0 187480  11264   4196  50596   2   2    10     2   14    13   0  4  8

Basically what this says is you've got around 180MB swapped out to
disk, around 11MB free (but you knew that) and about 50MB in the
buffer cache (used to cache blocks from disk).  The rest of the
numbers basically say your system is hardly loaded at all, which means
the stuff in swap isn't that important.

I'm going to have to say your Java really is using a big pile of
memory.  I had a similar problem with Python (another garbage
collecting language).  The Python script (a Linux installation
program) would run even a 128MB RAM box out of memory, the OOM killer
would kill it, and bam, end of install.  The only solution was to add
swap space halfway through the install.

It'd be interesting to see what would happen without swap.  Perhaps
Java would be prodded into garbage collecting better?  On the other
hand, they might just die horribly.  Just comment out the swap line in
/etc/fstab (or type swapoff -a before you start your programs).

-VAL



More information about the Techtalk mailing list