![]() |
32G ram
hi all
i got 32GB ram, why i can't -Xmx2G, it got an error "Could not create the Java Virtual Machine" /root>free -m total used free shared buffers cached Mem: 32387 16973 15413 0 243 11906 -/+ buffers/cache: 4823 27563 Swap: 1906 0 1906 /root>uname -a Linux localhost.localdomain 3.6.9-2.fc17.i686.PAE #1 SMP Tue Dec 4 14:15:28 UTC 2012 i686 i686 i386 GNU/Linux thanks from Peter (cmk128@hotmail.com) |
Re: 32G ram
On 12/16/2012 10:05 PM, mcheung63@gmail.com wrote:
> i got 32GB ram, why i can't -Xmx2G, it got an error "Could not create the Java Virtual Machine" > > /root>free -m > total used free shared buffers cached > Mem: 32387 16973 15413 0 243 11906 > -/+ buffers/cache: 4823 27563 > Swap: 1906 0 1906 > /root>uname -a > Linux localhost.localdomain 3.6.9-2.fc17.i686.PAE #1 SMP Tue Dec 4 14:15:28 UTC 2012 i686 i686 i386 GNU/Linux 32 bit or 64 bit Java? Arne |
Re: 32G ram
On Sun, 16 Dec 2012 19:05:11 -0800 (PST), mcheung63@gmail.com wrote,
quoted or indirectly quoted someone who said : >hi all > i got 32GB ram, why i can't -Xmx2G, it got an error "Could not create the Java Virtual Machine" try using m for megabytes. -- Roedy Green Canadian Mind Products http://mindprod.com Students who hire or con others to do their homework are as foolish as couch potatoes who hire others to go to the gym for them. |
Re: 32G ram
On 12/17/2012 3:39 AM, Donkey Hottie wrote:
> 17.12.2012 05:09, Arne Vajhøj kirjoitti: >> On 12/16/2012 10:05 PM, mcheung63@gmail.com wrote: >>> i got 32GB ram, why i can't -Xmx2G, it got an error "Could not >>> create the Java Virtual Machine" >>> >>> /root>free -m >>> total used free shared buffers >>> cached >>> Mem: 32387 16973 15413 0 243 11906 >>> -/+ buffers/cache: 4823 27563 >>> Swap: 1906 0 1906 >>> /root>uname -a >>> Linux localhost.localdomain 3.6.9-2.fc17.i686.PAE #1 SMP Tue Dec 4 >>> 14:15:28 UTC 2012 i686 i686 i386 GNU/Linux >> >> 32 bit or 64 bit Java? > > Apparently 32 bit, as the i686 OS is 32 bit PAE too. Then that explains it. 32 bit Java on x86 usually only allows for around 1.7 GB of heap space. Arne |
Re: 32G ram
Arne Vajhøj wrote:
> Donkey Hottie wrote: >> Arne Vajhøj kirjoitti: >>> mcheung63 wrote: >>>> i [sic] got 32GB ram, why i [sic] can't -Xmx2G, it got an error "Could not >>>> create the Java Virtual Machine" Because you allocated all the available memory to the heap, and none to theJVM or class space, stack, ... . How much RAM you have is irrelevant; it's how much RAM you are allowed to allocate per process with a 32-bit Java. Assuming the other posters are correct and you're using a 32-bit system. Are you? That might have been good to tell us in the beginning. >>>> /root>free -m >>>> total used free shared buffers >>>> cached >>>> Mem: 32387 16973 15413 0 243 11906 >>>> -/+ buffers/cache: 4823 27563 >>>> Swap: 1906 0 1906 >>>> /root>uname -a >>>> Linux localhost.localdomain 3.6.9-2.fc17.i686.PAE #1 SMP Tue Dec 4 >>>> 14:15:28 UTC 2012 i686 i686 i386 GNU/Linux >>> >>> 32 bit or 64 bit Java? > >> Apparently 32 bit, as the i686 OS is 32 bit PAE too. > > Then that explains it. > > 32 bit Java on x86 usually only allows for around 1.7 GB > of heap space. Bear in mind, OP, that "2 GB" is the maximum allocation for the *entire process*, not just the heap. If you allocate the whole amount for heap, that leaves nothing for stack or the interpreter. That's why it fails. So the 1.7 GB or so is all you can get and still leave room for Java itself.. But why, pray tell, are you using a 32-bit system? -- Lew |
Re: 32G ram
On 12/17/2012 3:31 AM, Roedy Green wrote:
> On Sun, 16 Dec 2012 19:05:11 -0800 (PST), mcheung63@gmail.com wrote, > quoted or indirectly quoted someone who said : >> i got 32GB ram, why i can't -Xmx2G, it got an error "Could not create the Java Virtual Machine" > try using m for megabytes. Really. You don't think Java can do that calculation correct?? Arne PS: It can! |
Re: 32G ram
On 17/12/12 08:39, Donkey Hottie wrote:
> 17.12.2012 05:09, Arne Vajhøj kirjoitti: >> On 12/16/2012 10:05 PM, mcheung63@gmail.com wrote: >>> i got 32GB ram, why i can't -Xmx2G, it got an error "Could not >>> create the Java Virtual Machine" >>> >>> /root>free -m >>> total used free shared buffers >>> cached >>> Mem: 32387 16973 15413 0 243 11906 >>> -/+ buffers/cache: 4823 27563 >>> Swap: 1906 0 1906 >>> /root>uname -a >>> Linux localhost.localdomain 3.6.9-2.fc17.i686.PAE #1 SMP Tue Dec 4 >>> 14:15:28 UTC 2012 i686 i686 i386 GNU/Linux >> >> 32 bit or 64 bit Java? >> >> Arne >> >> > > Apparently 32 bit, as the i686 OS is 32 bit PAE too. > 32bit Java on 32bit Linux should allow an application of up to 4GB. How much can of that can be allocated to the heap depends on the particular application. I've allocated more than 2G to heap on a 32bit Linux system, see this old thread on Google Groups: https://groups.google.com/forum/?hl=...er/iGr3bxL9ZCA There may be a per-process limit. Try "ulimit -a" to see what limits the sysadmin has set. -- Nigel Wade |
Re: 32G ram
On 12/18/2012 3:19 AM, Nigel Wade wrote:
> On 17/12/12 08:39, Donkey Hottie wrote: >> 17.12.2012 05:09, Arne Vajhøj kirjoitti: >>> On 12/16/2012 10:05 PM, mcheung63@gmail.com wrote: >>>> i got 32GB ram, why i can't -Xmx2G, it got an error "Could not >>>> create the Java Virtual Machine" >>>> >>>> /root>free -m >>>> total used free shared buffers >>>> cached >>>> Mem: 32387 16973 15413 0 243 >>>> 11906 >>>> -/+ buffers/cache: 4823 27563 >>>> Swap: 1906 0 1906 >>>> /root>uname -a >>>> Linux localhost.localdomain 3.6.9-2.fc17.i686.PAE #1 SMP Tue Dec 4 >>>> 14:15:28 UTC 2012 i686 i686 i386 GNU/Linux >>> >>> 32 bit or 64 bit Java? >>> >>> Arne >>> >>> >> >> Apparently 32 bit, as the i686 OS is 32 bit PAE too. >> > > 32bit Java on 32bit Linux should allow an application of up to 4GB. How > much can of that can be allocated to the heap depends on the particular > application. I've allocated more than 2G to heap on a 32bit Linux > system, see this old thread on Google Groups: > https://groups.google.com/forum/?hl=...er/iGr3bxL9ZCA > > > There may be a per-process limit. Try "ulimit -a" to see what limits the > sysadmin has set. > you only get a 4GB process limit if the kernel is built with a special option, which gives 4GB per process but at the cost of making switching to/from kernel-space (such as in a system call) slower. in a more typical setup, it is 3GB for application, 1GB for kernel. this sets an effective upper limit of 3GB which the application can use. 32-bit Windows currently has the same limit, although older versions only allowed around 2GB per application (the other 2GB was: 1GB shared memory, 1GB kernel). |
Re: 32G ram
On 12/18/2012 4:19 AM, Nigel Wade wrote:
> On 17/12/12 08:39, Donkey Hottie wrote: >> 17.12.2012 05:09, Arne Vajhøj kirjoitti: >>> On 12/16/2012 10:05 PM, mcheung63@gmail.com wrote: >>>> i got 32GB ram, why i can't -Xmx2G, it got an error "Could not >>>> create the Java Virtual Machine" >>>> >>>> /root>free -m >>>> total used free shared buffers >>>> cached >>>> Mem: 32387 16973 15413 0 243 >>>> 11906 >>>> -/+ buffers/cache: 4823 27563 >>>> Swap: 1906 0 1906 >>>> /root>uname -a >>>> Linux localhost.localdomain 3.6.9-2.fc17.i686.PAE #1 SMP Tue Dec 4 >>>> 14:15:28 UTC 2012 i686 i686 i386 GNU/Linux >>> >>> 32 bit or 64 bit Java? >> >> Apparently 32 bit, as the i686 OS is 32 bit PAE too. > > 32bit Java on 32bit Linux should allow an application of up to 4GB. How > much can of that can be allocated to the heap depends on the particular > application. I've allocated more than 2G to heap on a 32bit Linux > system, see this old thread on Google Groups: > https://groups.google.com/forum/?hl=...er/iGr3bxL9ZCA 32 bit Java can in theory use up to 3 GB on 32 bit OS on x86 if the border between process and system is changed (/3GB). But on Windows JRocket is supposedly the only Java that can do it. 32 bit Java can never use 4 GB on 32 bit OS on x86, because that does not leave any address space for the OS. 32 bit Java can use 4 GB on 64 bit OS on x86, because the OS are running in 64 bit addresses (or something like that), if various requirements are in place. I don't know what Java versions support that. Arne |
Re: 32G ram
On 19/12/12 01:22, Arne Vajhøj wrote:
> On 12/18/2012 4:19 AM, Nigel Wade wrote: >> On 17/12/12 08:39, Donkey Hottie wrote: >>> 17.12.2012 05:09, Arne Vajhøj kirjoitti: >>>> On 12/16/2012 10:05 PM, mcheung63@gmail.com wrote: >>>>> i got 32GB ram, why i can't -Xmx2G, it got an error "Could not >>>>> create the Java Virtual Machine" >>>>> >>>>> /root>free -m >>>>> total used free shared buffers >>>>> cached >>>>> Mem: 32387 16973 15413 0 243 >>>>> 11906 >>>>> -/+ buffers/cache: 4823 27563 >>>>> Swap: 1906 0 1906 >>>>> /root>uname -a >>>>> Linux localhost.localdomain 3.6.9-2.fc17.i686.PAE #1 SMP Tue Dec 4 >>>>> 14:15:28 UTC 2012 i686 i686 i386 GNU/Linux >>>> >>>> 32 bit or 64 bit Java? >>> >>> Apparently 32 bit, as the i686 OS is 32 bit PAE too. >> >> 32bit Java on 32bit Linux should allow an application of up to 4GB. How >> much can of that can be allocated to the heap depends on the particular >> application. I've allocated more than 2G to heap on a 32bit Linux >> system, see this old thread on Google Groups: >> https://groups.google.com/forum/?hl=...er/iGr3bxL9ZCA >> > > 32 bit Java can in theory use up to 3 GB on 32 bit OS on x86 if the > border between process and system is changed (/3GB). But on Windows > JRocket is supposedly the only Java that can do it. Sorry, yes, I had confused myself by thinking about PAE. For normal 32bit systems this is true. > > 32 bit Java can never use 4 GB on 32 bit OS on x86, because that > does not leave any address space for the OS. However, the OP is using a PAE kernel. That should theoretically allow a per-process limit of 4GB. I've never had the chance to use PAE kernels on PAE supported hardware, but IIRC that's what PAE is for, isn't it? -- Nigel Wade |
| All times are GMT. The time now is 05:45 AM. |
Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.