Also the heap size is limited by the operating system
http://forum.java.sun.com/thread.jspa?forumID=37&threadID=328755
http://forum.java.sun.com/thread.jspa?forumID=37&threadID=233293
http://forum.java.sun.com/thread.jspa?threadID=202978&messageID=2713288
Java Max Heap Size
Win (2000/XP) - 1.6 GB
Mac OS X - 2 GB
Solaris 2.6 and x86 - 2 GB
Solaris 7 and Solaris 8 SPARC - 4 GB
AS/400 / iSeries (V5R1M0) - 240 GB
http://www.unixville.com/~moazam/categories/jvmInternals/
Why can't I allocate 2GB of heap to the JVM on Windows?
It is a known fact that 32bit architectures limit the amount of memory any single process can allocate to 4GB.
So why does the JVM limit the maximum heap size (-Xmx) to under 2GB?
When you try to run your JVM with a -Xmx2gb flag, you'll get the following error:
Error occurred during initialization of VM
Could not reserve enough space for object heap
This is a limitation of the Windows 32bit OS.
32bit processes can only use a max of 4GB memory address space.
Windows further splits that into half by allocating 2GB to the kernel and 2GB to the application.
Also this 2GB is fragmented and in reality is only around 1648MB to 1.8G
http://forum.java.sun.com/thread.jspa?threadID=202978&start=0&tstart=0
================================================================================
"The solution would be to move to a 64bit machine and OS"
==========================================================================================
http://www.microsoft.com/whdc/system/platform/server/PAE/PAEmem.mspx
Operating systems based on Microsoft® Windows NT® technologies have always provided applications with a flat 32-bit virtual address space that describes 4 gigabytes (GB) of virtual memory.
The address space is usually split so that 2 GB of address space is directly accessible to the application and the other 2 GB is only accessible to the Windows executive software.
==========================================================================================
Scaling out versus scaling up
These limitations could mean that scaling up (adding more memory) may not be as appropriate as scaling out (adding more nodes to the cluster).
http://support.microsoft.com/kb/268230/
==========================================================================================
Windows 2000 Advanced Server or Windows 2000 Datacenter or Windows Server 2003
The maximum amount of physical memory addressable by a 32-bit addressing mode is 4 GB (2 ^ 32 = 4,294,967,296).
All processors based on the IA-32 architecture that begin with the Intel Pentium Pro, support a new 36-bit physical addressing mode known as Physical Address Extension (PAE).
PAE allows up to 8 GB of physical memory on Windows 2000 Advanced Server and up to 32 GB of physical memory on Windows 2000 Datacenter Server.
This is because the tested memory limit on Windows 2000 Datacenter Server is 32 GB.
The PAE mode kernel requires an Intel architecture processor, Pentium Pro, or later and either Windows 2000 Advanced Server or Windows 2000 Datacenter.
Note The maximum amount of memory that can be supported on Windows Server 2003 is 4 GB.
However, Windows Server 2003 Enterprise Edition supports 32 GB of physical RAM.
Windows Server 2003 Datacenter Edition supports 64 GB of physical RAM by using the Physical Address Extensions (PAE) feature.
You can use the 3 GB switch that is in the Boot.ini file with Microsoft Windows Server 2003, Microsoft Windows Server 2003 Enterprise Edition, or with Microsoft Windows Server 2003 Datacenter Edition.
==========================================================================================
http://support.microsoft.com/default.aspx?scid=kb;en-us;274750&sd=tech
NOTE: You cannot allocate more than 4 GB of physical memory to an application on Windows 2000 Server because Physical Address Extension (PAE) is not available on Microsoft Windows 2000 Server.
Also, you cannot use the 3 GB switch in the Boot.ini file with Windows 2000 Server; however, you can use the 3 GB switch in the Boot.ini file with Microsoft Windows 2000 Advanced Server or Microsoft Windows Datacenter versions.
A description of the 4 GB RAM Tuning feature and the Physical Address Extension switch
http://support.microsoft.com/kb/291988/
IMPORTANT These configurations are not supported on Windows 2000 Professional and Windows 2000 Server. These configurations are only made available for testing purposes. Do not use these switches in a production environment unless you are using one of the products in the bulleted list at the top of this section.
==========================================================================================
-----Original Message-----
From: Bell, Douglas [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, 15 November 2005 8:44 AM
To: [email protected]
Subject: RE: Submitting large byte[] with Axis
You'll have to allocate more memory when you start the JVM
i.e. java -Xms1000m -Xmx2500m Main
-----Original Message-----
From: Michael Rudolf [mailto:[EMAIL PROTECTED]]
Sent: Monday, November 14, 2005 1:15 PM
To: [email protected]
Subject: Submitting large byte[] with Axis
Hi,
i am experimenting with submitting byte[] over axis. When they reach a
certain size i get an exception in the Client that called the WS:
Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
The Server Exception is:
java.io.IOException:
ClientAbortException: java.net.SocketException: Software caused
connection abort: socket write error
at
org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffer.j
ava:366)
at org.apache.tomcat.util.buf.ByteChunk.append(ByteChunk.java:299)
at
org.apache.catalina.connector.OutputBuffer.writeBytes(OutputBuffer.java:
392)
at
org.apache.catalina.connector.OutputBuffer.write(OutputBuffer.java:381)
at
org.apache.catalina.connector.CoyoteOutputStream.write(CoyoteOutputStrea
m.java:76)
at org.apache.axis.utils.ByteArray.writeTo(ByteArray.java:375)
at org.apache.axis.SOAPPart.writeTo(SOAPPart.java:265)
at org.apache.axis.Message.writeTo(Message.java:528)
at
org.apache.axis.transport.http.AxisServlet.sendResponse(AxisServlet.java
:902)
at
org.apache.axis.transport.http.AxisServlet.doPost(AxisServlet.java:777)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at
org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.j
ava:327)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
tionFilterChain.java:252)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
erChain.java:173)
at
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilte
r.java:81)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
tionFilterChain.java:202)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
erChain.java:173)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValv
e.java:213)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValv
e.java:178)
at
org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrincipa
lValve.java:39)
at
org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAs
sociationValve.java:159)
at
org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.j
ava:59)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java
:126)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java
:105)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.
java:107)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:1
48)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:85
6)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processC
onnection(Http11Protocol.java:744)
at
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint
.java:527)
at
org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorker
Thread.java:112)
at java.lang.Thread.run(Thread.java:595)
Has anybody transferred larger byte[] over axis successfully. How big
can they get (MBytes?). Any ideas how to submit such large data over
axis?
Thanks!
Michael
