From: Brian P. C. <bm...@bm...> - 2006-08-11 10:03:00
|
Aggie, According to below: http://developer.apple.com/documentation/Java/Conceptual/JavaPropVMInfoRef/ Articles/JavaVirtualMachineOptions.html The max heap size default is 64M, 128 with the -server flag. For tomcat the options are set in catalina.sh (CATALINA_OPTS) - this is a scary file. We seem to be on defaults. Regards, Brian Heap Size -Xmssize in bytes Sets the initial size of the Java heap. The default size is 2097152 (2MB). The values must be a multiple of, and greater than, 1024 bytes (1KB). (The -server flag increases the default size to 32M.) -Xmnsize in bytes Sets the initial Java heap size for the Eden generation. The default value is 640K. (The -server flag increases the default size to 2M.) -Xmxsize in bytes Sets the maximum size to which the Java heap can grow. The default size is 64M. (The -server flag increases the default size to 128M.) The maximum heap limit is about 2 GB (2048MB). Garbage Collection: Memory Usage Note: Many of the garbage collection flags are dependent on the settings for the heap size. Make sure that you have the appropriate sizes set for the heap before fine-tuning how garbage collection uses that memory space. -XX:MinHeapFreeRatio=percentage as a whole number Modifies the minimum percentage of the heap kept free after garbage collection. The default value of 40. If at least 40% of the heap is not freed after garbage collection, the heap size increases. -XX:MaxHeapFreeRatio=percentage as a whole number Changes the maximum percentage of heap kept free after garbage collection before the heap is shrunk. The default value is 70. This means that if a garbage collection results in more than 70% of the heap being freed, the heap size decreases. -XX:NewSize=size in bytes Sets the default size for the Eden generation of allocated objects. The default value is 640K. (The -server flag increases the default size to 2M.) -XX:MaxNewSize=size in bytes Allows you to change the upper limit of the young object space in which new objects are allocated. The default value is 640K. (The -server flag increases the default size to 2M.) -XX:NewRatio=value Changes the ratio of new to old space sizes from the default value of 8 where the new space is 1/8 the size of the old space. -XX:SurvivorRatio=number Modifies the ratio of size of the Eden to the survivor space from the default of 10 where Eden is survivorRatio+2 times larger than the survivor space. -XX:TargetSurvivorRatio=percentage Desired percentage of survivor space used after scavenge. Default is 50. -XX:MaxPermSize=size in MB Modifies the size of the permanent generation. The default is value is 32 (32MB). -XX:-CleanPagesOnUncommit Normally, when the garbage collection mechanism determines that the heap can be shrunk, i.e., a lot of memory that had been used is no longer needed by the program, the Java VM marks the memory as clean. The operating system is then able to reclaim pages for use by other processes without needing to page out the old memory content to disk. This flag turns off this behavior so that these pages are not marked as clean. > What is the memory set at for the JVM? > > Aggie > > -----Original Message----- > From: soc...@li... > [mailto:soc...@li...] On Behalf Of Brian > Peter Clark > Sent: 10 August 2006 18:07 > To: soc...@li... > Subject: [Socket-developers] PermGen error > > Sockanalia, > > I've just had to re-start tomcat on socket1 because of the following > error: > > java.lang.OutOfMemoryError: PermGen space > > I've mentioned somewhere that I've seen it before, all after heavy > war loading and unloading activity. > > The heap is filling up and not draining out. It suppose that it could > be that the garbage collector isn't quick enough to deal with the > legal class detritus. Or there might be a memory leak. > > It's something to keep an eye on. Maybe try to put a tool on the > job to monitor the heap. > > We could also increase the heap size on the JVM. After all, we > have got a little spare capacity on socket1. > > Guanxi seems happy enough now. > > Regards, > > Brian > > ------------------------------------------------------------------------- > Using Tomcat but need to do more? Need to support web services, security? > Get stuff done quickly with pre-integrated technology to make your job > easier > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > _______________________________________________ > Socket-developers mailing list > Soc...@li... > https://lists.sourceforge.net/lists/listinfo/socket-developers > > > ------------------------------------------------------------------------- > Using Tomcat but need to do more? Need to support web services, security? > Get stuff done quickly with pre-integrated technology to make your job easier > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > _______________________________________________ > Socket-developers mailing list > Soc...@li... > https://lists.sourceforge.net/lists/listinfo/socket-developers > |