Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.albasani.net!.POSTED!not-for-mail From: BGB Newsgroups: comp.lang.java.programmer Subject: Re: 32G ram Date: Tue, 18 Dec 2012 14:57:34 -0600 Organization: albasani.net Lines: 50 Message-ID: References: <7f80256a-03d0-4ecd-b20f-164547e4f573@googlegroups.com> <50ce8cd7$0$287$14726298@news.sunsite.dk> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Trace: news.albasani.net /VKHhANbgeUkAwxFHP4nOz/EueoU0ChKULgkuc1dQ4gWDdok0MkolJlCGQi03RDUnL9tHiJ5IE4n0Yob6iRcVw== NNTP-Posting-Date: Tue, 18 Dec 2012 21:00:40 +0000 (UTC) Injection-Info: news.albasani.net; logging-data="Gg8fZ46pr0/ovE/cWIgocGw3QBdT7TVMIGmmqiYJ99RS4N/ODzyPkeB3NvfhFrRe9UNNSmyJmYpEyxo5APsSADrLer/L+w3dBwJLRS/LTHwVjCfD/3IUTAlR6Xc8lr6q"; mail-complaints-to="abuse@albasani.net" User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/17.0 Thunderbird/17.0 In-Reply-To: Cancel-Lock: sha1:8lMw13vOFQKdAYJokYkQyWoUlGU= Xref: csiph.com comp.lang.java.programmer:20476 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=en-GB&fromgroups=#!topic/comp.lang.java.programmer/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).