[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [ajug-members]: Increasing JVM heap beyond 1.3GB in Win2K
My company worked a lot on this issue for our own web app. Turns out the
issue is not the JVM, but Windows. Windows cannot allocate more than 2GB
contigous space to any one process. The reason the usable heap is
smaller than that is because you have 2.0GB - JVM code (core code +
dlls) which ends up being somewhere between 1.4 and 1.7 GB for your heap
space. If you must have more heap than this, you will probably need to
go to another platform. We moved to Solaris and have been very happy and
can have monsterous heaps. Also, if you are seeing out of memory errors
and thus trying to increase your heap, try increasing your permanent
generation for the gc first. You can do this by setting
-XX:MaxPermSize=128m. I believe the default is 32m, which is often too
small for large web apps.
Cal Watson wrote:
>--- Barry Hawkins <ly5t5@allthingscomputed.com> wrote:
>
>
>>List,
>> Has anyone successfully managed to get a JVM heap
>>size on Windows 2000
>>using the Sun 1.4.2 JVM? Our team has a web app in
>>ColdFusion MX
>>(CFMX) (long story, stay with me on the JVM thing)
>>which runs on an OEM
>>version of Macromedia JRun 4. JRun uses the 1.4.2
>>JDK on Windows 2000,
>>and Macromedia recommends setting the JVM to have a
>>minimum and maximum
>>JVM heap size of 1024MB. They also recommend
>>tweaking the JVM settings
>>if you need to. However, they offer very little
>>advice on doing that,
>>and the advice they do give contains broken links to
>>J2ME resources.
>> The JVM heap size for our app is nailed at an
>>average of 1,473,910,395
>>bytes or ~1.36GB. Stuff I have found with Google
>>and on the Apple Java
>>mailing list indicate that the Sun JVM on Win2K will
>>only get to about
>>1.3 - 1.6GB. Has anyone been able to successfully
>>get a heap size
>>larger than that on Win2K?
>> Along those lines, what JVMs are folks using on
>>their production
>>servers in general? Which JVMs tend to get along
>>with which app
>>servers? I'd love to hear your input.
>>
>>Thanks,
>>--
>>Barry C. Hawkins
>>All Things Computed
>>site: www.allthingscomputed.com
>>weblog: www.yepthatsme.com
>>
>>
>>
>
>Barry
>There is a bug in 1.4.2 where the JVM can't expand the
>heap if all the memory is completely allocated and
>there is no swap space available. You might want to
>try increasing the disk space allocated for virtual
>memory.
>
>here is the info I found on Sun's Website:
>The Java HotSpot VM cannot expand its heap size if
>memory is completely allocated and no swap space is
>available. This can occur, for example, when several
>applications are running simultaneously. When this
>happens, the VM will exit after printing a message
>similar to the following.
>
> Exception java.lang.OutOfMemoryError: requested
><size> bytes
>
>If you see this symptom, consider increasing the
>available swap space by allocating more of your disk
>for virtual memory and/or by limiting the number of
>applications you run simultaneously. You may also be
>able to avoid this problem by setting the command-line
>flags -Xmx and -Xms to the same value to prevent the
>VM from trying to expand the heap. Note that simply
>increasing the value of -Xmx will not help when no
>swap space is available.
>
>This issue is being tracked in bug 4697804.
>
>
>I don't know if this helps at all but I figured it
>couldn't hurt. Let me know how it goes.
>
>Cal
>
>__________________________________
>Do you Yahoo!?
>Yahoo! Search - Find what you’re looking for faster
>http://search.yahoo.com
>
>
>
>
--
"Beware of bugs in the above code; I have only proved it correct, not tried it."
-Donald Knuth