From: DaveR on
On Sun's 1.5 VM running on Windows, it looks like the VM is trying to
allocate (possibly contiguously) the entire virtual address space
specified by -mx. This seems to be a change in behavior from previous
VM's. Does anyone know if this is the case? I'm trying to wrap my
head around what exactly -mx means now if this is the true. Do we need
to ensure there's enough swap configured on the machine before booting
the VM with a particular value for -mx?

From: Steve W. Jackson on
In article <1155837348.179944.283670(a)m73g2000cwd.googlegroups.com>,
"DaveR" <drubin99(a)yahoo.com> wrote:

> On Sun's 1.5 VM running on Windows, it looks like the VM is trying to
> allocate (possibly contiguously) the entire virtual address space
> specified by -mx. This seems to be a change in behavior from previous
> VM's. Does anyone know if this is the case? I'm trying to wrap my
> head around what exactly -mx means now if this is the true. Do we need
> to ensure there's enough swap configured on the machine before booting
> the VM with a particular value for -mx?

I've seen no evidence of a change in the behavior of -Xmx since
switching to 1.5 on XP.

-Xms is the initial heap size and -Xmx is the maximum. So over the life
of an app, the heap should never exceed that size. You're sure to
suffer ill effects if your combination of real RAM and swap space is
tight (and I've never considered Windows good at managing its virtual
memory), but it should still work if the -Xmx setting doesn't exceed
what the VM can support.

= Steve =
--
Steve W. Jackson
Montgomery, Alabama
From: DaveR on
Understood regarding -Xms. I've create a single test class with a main
containing only a System.out.println and have tried launching the 1.5
vm using -Xmx1024m (note there is no -Xms specified) and I get the
following:

Error occurred during initialization of VM could not reserve enough
space for object heap

Which makes absolutele no sense to me. If I lower the -Xmx to
something like 750m, the VM launches successfully.

The NT kernel is purely demand paged, so if you're Java code exhibits
good page locality, you can get away with a small amount of physical
adresses space while having adequate swap to cover the needs of your
heap.

Dave

Steve W. Jackson wrote:
> In article <1155837348.179944.283670(a)m73g2000cwd.googlegroups.com>,
> "DaveR" <drubin99(a)yahoo.com> wrote:
>
> > On Sun's 1.5 VM running on Windows, it looks like the VM is trying to
> > allocate (possibly contiguously) the entire virtual address space
> > specified by -mx. This seems to be a change in behavior from previous
> > VM's. Does anyone know if this is the case? I'm trying to wrap my
> > head around what exactly -mx means now if this is the true. Do we need
> > to ensure there's enough swap configured on the machine before booting
> > the VM with a particular value for -mx?
>
> I've seen no evidence of a change in the behavior of -Xmx since
> switching to 1.5 on XP.
>
> -Xms is the initial heap size and -Xmx is the maximum. So over the life
> of an app, the heap should never exceed that size. You're sure to
> suffer ill effects if your combination of real RAM and swap space is
> tight (and I've never considered Windows good at managing its virtual
> memory), but it should still work if the -Xmx setting doesn't exceed
> what the VM can support.
>
> = Steve =
> --
> Steve W. Jackson
> Montgomery, Alabama

From: Steve W. Jackson on
In article <1155840761.883917.45180(a)h48g2000cwc.googlegroups.com>,
"DaveR" <drubin99(a)yahoo.com> wrote:

> Understood regarding -Xms. I've create a single test class with a main
> containing only a System.out.println and have tried launching the 1.5
> vm using -Xmx1024m (note there is no -Xms specified) and I get the
> following:
>
> Error occurred during initialization of VM could not reserve enough
> space for object heap
>
> Which makes absolutele no sense to me. If I lower the -Xmx to
> something like 750m, the VM launches successfully.
>
> The NT kernel is purely demand paged, so if you're Java code exhibits
> good page locality, you can get away with a small amount of physical
> adresses space while having adequate swap to cover the needs of your
> heap.
>
> Dave

Not being able to use -Xmx1024m there is a serious problem, I'd say...
I've been using that with our application for years now, even before we
later added the -Xms part. I just pulled out a small class I use for
quick testing that has a main with just a println and tested it using
only the -Xmx1024m and it worked fine -- Java 1.5.0_06 on XP SP2. We
stopped supporting NT 4 and earlier, so I haven't got access to any of
those to see what I'd get.

= Steve =
--
Steve W. Jackson
Montgomery, Alabama
From: nicolas.lehuen on
> Not being able to use -Xmx1024m there is a serious problem, I'd say...
> I've been using that with our application for years now, even before we
> later added the -Xms part. I just pulled out a small class I use for
> quick testing that has a main with just a println and tested it using
> only the -Xmx1024m and it worked fine -- Java 1.5.0_06 on XP SP2. We
> stopped supporting NT 4 and earlier, so I haven't got access to any of
> those to see what I'd get.
>
> = Steve =
> --
> Steve W. Jackson
> Montgomery, Alabama

I'm also encountering problems under both Windows XP and Windows 2003
Server with 2 GB of RAM.

Up until a few weeks ago, I could use -Xmx1600M without any problem.
Then during my vacation a colleague called me to tell me that the JVM
wouldn't start anymore on our development server (the one under Windows
2003 Server) with this error message :

Error occurred during initialization of VM
Could not reserve enough space for object heap
Could not create the Java virtual machine.

Back then, I tried on my development machine (the one under Windows XP)
and everything worked properly at -Xmx1600M.

Now, coming back at work, my Windows has been updated up to the latest
Patch Thursday (we run Windows Update Server at work so my PC wasn't
updated until I returned to work). And now, -Xmx1600M doesn't work
anymore on my dev PC AND on the dev server.

This leads me to think about a negative interaction between the latest
patches from Windows Update and the JVM. But I'm really not sure, so if
anyone has a similar problem, I'd be glad to hear about it.

Regards,
Nicolas

 |  Next  |  Last
Pages: 1 2
Prev: Try to install JSIM
Next: Arkanoid / Breakout