Please or
Try NowBuy Now

Locations of visitors to this page

SourceForge.net

SourceForge.JP

wrapper.java.maxmemory Property
wrapper.java.maxmemory Property

Configuration Property Overview

wrapper.java.maxmemory

Compatibility : 1.0.0
Editions :Professional EditionStandard EditionCommunity Edition
Platforms :WindowsMac OSXLinuxIBM AIXFreeBSDHP-UXSolarisIBM z/OSIBM z/Linux

The maximum amount of memory in megabytes that the JVM will be allowed to use. The default value is "0" (zero), which will cause the JVM's default value to be used. For most JVMs, The default value is "64MB".

If a non-zero value is specified for this property, then an appropriate -Xmx parameter will be added to the Java command generated by the Wrapper. If specified, the maximum memory must be greater than or equal to the value set for the wrapper.java.initmemory property. The upper limit depends on the JVM, but for 32-bit JVMs, it tends to be a little less than 2048Mb. 64-bit JVMs allow much higher settings.

If this property is set to "0" (zero), then it is also possible to specify the -Xmx parameter manually using the wrapper.java.additional.<n> property.

Example: (64MB)
wrapper.java.maxmemory=64

NOTE

If an application is experiencing java.lang.OutOfMemoryErrors then this often indicates that the maximum amount of memory available to the application needs to be increased. Be aware that setting the maximum memory to a value which is greater than the amount of actual memory on the machine will result in memory swapping. Memory swapping is a function of the OS (operating system), and thus its performance is highly OS specific. However from experience, this tends to result in a large decrease in application performance. In most cases, it is better to set the maximum memory to a value which fits within available memory and then rely on Java's garbage collection.

NOTE

Unless you really do know everything there is to know about memory and Garbage Collection in Java, I would recommend reading through the following document. It describes in detail how the initial and maximum memory values affect Java performance and also goes into detail about what can be done to improve that performance for a given application.

wrapper.java.maxmemory.percent

Compatibility :3.3.0
Editions :Professional EditionStandard EditionCommunity Edition (Not Supported)
Platforms :WindowsMac OSXLinuxIBM AIXFreeBSDHP-UXSolarisIBM z/OSIBM z/Linux

At times, it is necessary to set the memory thresholds relative to the amount of physical memory available on the system. This property accepts a percentage value between 1 and 100 which will translate into a size in MBs. For 32-bit versions of the Wrapper, the value will be calculated relative to lower of physical memory and 2048MB.

Example: (60%)
wrapper.java.maxmemory.percent=60

In the above example (60%), if 1GB (1024MB) of memory is installed on the system, the maximum memory will be set to 614MB (=1024 x 60%).

NOTE

Java behaves very poorly if the JVM has any of its memory swapped so it is important to take the OS requirements and any other applications into account when deciding on a safe memory level.

NOTE

This feature is currently not working correctly on AIX versions. The problem is being looked into, but did not want to hold up the release of Wrapper due to only this reason.

Reference: Java Memory





User Comments

If you notice something that is incorrect, missing, or simply feel that some part of this page could be explained better, feel free to log in and add a comment. You will need to register before you can log on.

Email:
Password:
Java Service Wrapper Version: 3.5.4