We've had pretty good luck monitoring JVM usage with JMX. We can
certainly do everything that sherod@ claims is done in the real
world.
On the other hand, one thing that we cannot discover, that I *really*
wish we could, is when the GC is about to run a major collection. No
matter what we do,
I agree with Phil. All VM's should allow memory usage to grow without
bound. Someone should alert VMWare to this great idea too.
While we're fixing shorted-sighted design problems in Java, let's take
care of some other things too:
- I should be able to access arbitrary memory locations with
There was a discussion about this in the Linux community a few years ago and
some kernel developer claimed to having good results from designating a
RAM-drive to be swap. Maybe it's a good middle road between keeping the
functionality that now depends on swap and not using disk...
BR,
John
On
if the RAM drive itself needed to swap, we might not need the large
hadron collider. sounds like black hole territory :)
On Jan 2, 8:10 pm, John Nilsson j...@milsson.nu wrote:
There was a discussion about this in the Linux community a few years ago and
some kernel developer claimed to having
yes, I meant heap size - -Xmx is limiting the heap size but not the
mmapped memory - to me it becomes a discussion about how many objects
a java app can have at the same time and at what count of objects you
might want to reconsider your design approach as well as do we really
need to store
Actually it can work nicely. I use TMPFS for my dev work, it
automatically uses available/specified amount of RAM but starts to use
swap if required. By my experience, that approach speeds up Ant and
Maven builds by order of magnitudes - makes NetBeans fly.
/Casper
On Jan 2, 11:52 am,
:
From: sherod steven.he...@gmail.com
Subject: [The Java Posse] Re: why doesn't java allocate memory as needed (max
heap size)
To: The Java Posse javaposse@googlegroups.com
Date: Wednesday, December 31, 2008, 10:00 PM
It's things like this that gives Java such a low
reputation in some
Yeah, I didn't meant to suggest it wouldn't work. I'm just keeping up
my quota of non-serious posts. :)
On Jan 3, 1:15 am, Casper Bang casper.b...@gmail.com wrote:
Actually it can work nicely.
--~--~-~--~~~---~--~~
You received this message because you are
Sherod, your rant doesn't really work:
There is simple no one right way to do memory limits. If you allow an
app to eat up as much as it would need, then there are plenty of
situations where THAT was clearly the wrong thing to do, particularly
on the client, which, contrary to some insinuations
A recap of issues with eating as much memory as you want:
FACT A: OSes manage virtual memory and make it relatively hard for
userland apps to meddle and/or inspect this.
FACT B: There's no way for the JVM to see any difference between an
app leaking memory and an app that has a
NIO virtual memory mapped is outside of the VM memory.
Do you mean Java heap? 'cos, mmapeed memory is part of the process
space though not Java heap if that is what you meant.
Regards,
Kirk
--~--~-~--~~~---~--~~
You received this message because you are
I always thought it weird that java was originally targetted for
embedded. These don't typically use compacting collectors - combine
this with limited memory and you are asking for fragmentation and out
of memory conditions based on the dyamics of the runtime conditions.
Nothing you can
It's not perfect. But its pretty cool!
false positive: Let's say you have a very long running open connection
on a web server (comet or some such) and it's been almost a day since
the last update or access. Its occupying memory for a purpose, and
assuming the OS is still tracking the connection
Kirk: Last time I owned a windows box (I admit, that was quite a while
ago, but it did have XP SP2, which as far as everyone is concerned is
the 'latest' version of windows still, I believe), when I tried to
turn swap off a whole host of apps stopped working. I then configured
swap to be 50MB in
Reinier Zwitserloot wrote:
Kirk: Last time I owned a windows box (I admit, that was quite a while
ago, but it did have XP SP2, which as far as everyone is concerned is
the 'latest' version of windows still, I believe), when I tried to
turn swap off a whole host of apps stopped working. I
I'm not sure, but I *think* this is roughly how it works:
Java doesn't just allocate the entire 'max heap size' when it starts
up, instead it will allocate up to that amount if needed. Whenever
java runs out of memory, it'll aggressively garbage collect first.
You'll only get OOME when, after a
Your test app is going to behave differently than your production
app. So you may not know how much memory you will use until you
launch it. And then when it crashes, you make the adjustment.
But even if you are right, it's to keep your whole server from
failing why not have an option to
Hi,
If I remember rightly, the max heap size was 16Mb during the 1.0.x
days of Java. The rationale I heard/read was to set a low base memory,
so application would be designed to run on most 'modern' computers. Of
course, back then, there was a lot of discussion about using Java for
Applet and
It's things like this that gives Java such a low reputation in some
operational areas.
This is how the 'real world' should work:
System monitoring software watches memory usage on a process /
machine.
It alerts operational staff when it moved beyond acceptable bounds
Investigation starts -
19 matches
Mail list logo