LimeWire hangs my Ubunutu
Levander
levander at mindspring.com
Mon Aug 1 02:25:29 UTC 2005
Osama I. Dosary wrote:
> I notice that the used Swap is ZERO. How can that be, when the Java
> process is using 341MB of Virtual memory, with only 19MB resedent
> memory. VIRT = SWAP + RES (from 'top' man-page), which means that
> 322MB of swap must be used, so why isn't 'top' showing the swapping.
> ... I'm confused. And is this related to the hangs?
>
Okay, there are a few things I know.
1.) The way the java virtual machine (jvm, aka the java binary that
shows up in your top command) works is that when it starts up, it can
request a giant chunk of memory from the operating system. It doesn't
use this chunk of memory initially, it just reserves it for use by
programs written in Java that run on top of the jvm. Java programs make
use of this memory by instantiating Java objects, using the 'new'
operator. And, this heap size that is manage by the jvm can be
controlled by the -Xmx and -Xms command line options to the java binary.
2.) Linux caches data that your system puts in memory. And, these
caches exist in your RAM memory. As you get closer and closer to the
physical RAM limitations of your computer, the Linux kernel is designed
to cache less memory. The kernel opts to cache less in an attempt to
keep your memory usage below the physical RAM limitations, so that
hopefully you will have to swap memory usage out to disk less.
Now, I may have gotten the words a little wrong, but the general idea of
the above is correct. Next, I start going out on a limb a little,
guessing how this stuff works.
I'm guessing the disparity between your virtual memory use and your
resident memory use isn't do to swap, as you noted when looking at the
top output. I'm guessing it's been requested by the jvm, but since the
jvm hasn't actually used it yet, it hasn't actually been allocated by
the Linux kernel.
And, I can't imagine how this would cause your computer to hang. It
just tries to explain the disparity in the memory numbers you reported.
-Levander
More information about the ubuntu-users
mailing list