Why JVM shows another Heap size when Xms=Xsx?
Hi everybody. I have two instances of oc4j on a cluster of two nodes. The configuration of parameters on opmn.xml is exactly the same for both instances.
Particulary I see an strange behavior on memory heap. I expect that if Xmx and Xms parameters are equals to 4096, then the heap size must be fixed on 4 Gb exactly, and there will be not resizing.
But monitoring the heaps with JVisualVM I can see that the heap size of the first instance is moving between 3.7 and 4 Gb, and the Heap size of the second node is moving around 3.2 Gb. The hosts have both 16 Gb of RAM, it's running on Windows 2003 Server R2 and there is no overload on the OS.
Possibly the behavior is normal and I just have a wrong understanding of what is expectable.
Here are some parameteres extracted from opmn.xml file:
-D64
-Dcom.sun.management.jmxremote
-Xmx4096M
-Xms4096M
-XX:+UseParallelGC
-verbose:gc
-XX:+PrintGCTimeStamps
-XX:+PrintGCDetails
-Xloggc:D:\oracle\product\10.1.3\soa\j2ee\OC4J_SOA\archivo_loggc.log
-Dcom.sun.management.jmxremote.port=8004
-Dcom.sun.management.jmxremote.authenticate=false
-Dcom.sun.management.jmxremote.ssl=false
-Djava.security.policy=D:\oracle\product\10.1.3\soa\j2ee\OC4J_SOA\config\java2.policy
-Djava.awt.headless=true
-Dhttp.webdir.enable=false
-Doc4j.userThreads=true
-Doracle.mdb.fastUndeploy=60
-Doc4j.formauth.redirect=true
-Djava.net.preferIPv4Stack=true
-Dorabpel.home=D:\oracle\product\10.1.3\soa\bpel
-Xbootclasspath/p:D:\oracle\product\10.1.3\soa\bpel\lib\orabpel-boot.jar
-Dstdstream.filesize=8
-Dstdstream.filenumber=30
-Dhttp.proxySet=false
-XX:MaxPermSize=768M
-XX:PermSize=768M
-Doraesb.home=D:\oracle\product\10.1.3\soa\integration\esb
-Dorabpel.process.lock.timeout=300
-Drmi.client.connection.timeout=100
-Doracle.dms.hunter.sleeptime=600000
-Doracle.dms.gatherers=300000,2:1800000:3
-Djavax.net.ssl.keyStore=D:\oracle\product\10.1.3\soa\jdk\jre\lib\security\cacerts
-Djavax.net.ssl.keyStorePassword=changeit
-DopmnPingInterval=90
-Xrs
-DHTTPClient.socket.staleCheck=true
-DHTTPClient.disableKeepAlives=true
-XX:+HeapDumpOnOutOfMemoryError
Hi Sebastien, Thanks for responding.
In fact I'm looking exactly where you say to determine your heap size.
The thing is that I can't understand why one instance takes some minor heap size and fluctuates the size while the other instance take around 4 Gb and kept static in this value. I can see there is no diferences on configuration for both. I know that the used heap must present diferent behavior, but not the total size. I think that the size should be fixed and static with Xmx=Xms=4096, but this is not happening.
I would like to show an image to ilustrate what I'm describing.
About the PermGen, I think there's no problem with that, around 80% is in effective use, and this value is stable.
Best regards
Similar Messages
-
Photoshop elements...the tools (Paintbrush and cloner) no longer show their adjustable size when working. Only a tiny cross shows...is there a way to reset tools ??
Please post Photoshop Elements related queries over at
http://forums.adobe.com/community/photoshop_elements
But a guess: caps lock? -
Why my netweaver's heap size is 3000m? I had changed 256m,not change
dear all:
the log under the dir "work":
filename:dev_jcontrol.b01:
Bootstrap nodes
-> [00] bootstrap : D:\usr\sap\FZB\JC00\j2ee\cluster\instance.properties
-> [01] bootstrap_ID5486600 : D:\usr\sap\FZB\JC00\j2ee\cluster\instance.properties
-> [02] bootstrap_ID5486650 : D:\usr\sap\FZB\JC00\j2ee\cluster\instance.properties
Worker nodes
-> [00] ID5486600 : D:\usr\sap\FZB\JC00\j2ee\cluster\instance.properties
-> [01] ID5486650 : D:\usr\sap\FZB\JC00\j2ee\cluster\instance.properties
-> [02] sdm : D:\usr\sap\FZB\JC00\SDM\program\config\sdm_jstartup.properties
[Thr 5180] JControlExecuteBootstrap: execute bootstrap process [bootstrap]
[Thr 5180] [Node: bootstrap] java home is set by profile parameter
Java Home: C:\j2sdk1.4.2_18
[Thr 5180] JStartupICheckFrameworkPackage: can't find framework package D:\usr\sap\FZB\JC00\exe\jvmx.jar
JStartupIReadSection: read node properties [bootstrap]
-> node name : bootstrap
-> node type : bootstrap
-> node execute : yes
-> java path : C:\j2sdk1.4.2_18
-> java parameters : -Djco.jarm=1
-> java vm version : 1.4.2_18-b06
-> java vm vendor : Java HotSpot(TM) Server VM (Sun Microsystems Inc.)
-> java vm type : server
-> java vm cpu : x86
-> heap size : 3000M
-> root path : D:\usr\sap\FZB\JC00\j2ee\cluster
-> class path : .\bootstrap\launcher.jar
-> OS libs path : D:\usr\sap\FZB\JC00\j2ee\os_libs
-> main class : com.sap.engine.offline.OfflineToolStart
-> framework class : com.sap.bc.proj.jstartup.JStartupFramework
-> registr. class : com.sap.bc.proj.jstartup.JStartupNatives
-> framework path : D:\usr\sap\FZB\JC00\exe\jstartup.jar;D:\usr\sap\FZB\JC00\exe\jvmx.jar
-> parameters : com.sap.engine.bootstrap.Bootstrap ./bootstrap ID0054866
-> debuggable : yes
-> debug mode : no
-> debug port : 60000
-> shutdown timeout : 120000
JControlStartJLaunch: program = D:\usr\sap\FZB\JC00\exe\jlaunch.exe
-> arg[00] = D:\usr\sap\FZB\JC00\exe\jlaunch.exe
-> arg[01] = pf=D:\usr\sap\FZB\SYS\profile\FZB_JC00_tzgl
-> arg[02] = -DSAPINFO=FZB_00_bootstrap
-> arg[03] = -nodeId=-1
-> arg[04] = -file=D:\usr\sap\FZB\JC00\j2ee\cluster\instance.properties
-> arg[05] = -syncSem=JSTARTUP_WAIT_ON_1660
-> arg[06] = -nodeName=bootstrap
-> arg[07] = -jvmOutFile=D:\usr\sap\FZB\JC00\work\jvm_bootstrap.out
-> arg[08] = -stdOutFile=D:\usr\sap\FZB\JC00\work\std_bootstrap.out
-> arg[09] = -locOutFile=D:\usr\sap\FZB\JC00\work\dev_bootstrap
-> arg[10] = -mode=BOOTSTRAP
-> arg[11] = pf=D:\usr\sap\FZB\SYS\profile\FZB_JC00_tzgl
-> lib path = PATH=C:\j2sdk1.4.2_18\jre\bin\server;C:\j2sdk1.4.2_18\jre\bin;D:\oracle\FZB\102\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;;D:\usr\sap\FZB\SYS\exe\uc\NTI386
-> exe path = PATH=C:\j2sdk1.4.2_18\bin;D:\usr\sap\FZB\JC00\j2ee\os_libs;D:\oracle\FZB\102\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;;D:\usr\sap\FZB\SYS\exe\uc\NTI386
[Thr 5180] Mon Oct 18 09:10:09 2010
[Thr 5180] *** ERROR => invalid return code of process [bootstrap] (exitcode = -2) [jstartxx.c 1642]
[Thr 5180] JControlExecuteBootstrap: error executing bootstrap node [bootstrap] (rc = -2)
[Thr 5180] JControlCloseProgram: started (exitcode = -2)
[Thr 5180] JControlCloseProgram: good bye... (exitcode = -2)
who can help me? thanks a lot!Hello,
It wouldn't matter even if you changed the heap size in the config tool to the desired value. The issue here is that your bootstrap process is failing and so the synchronization from DB to file system is not going to happen.
You need to find out what is causing the bootstrap to fail. Please refer to all the files with bootstrap in the work directory.
Also, if 3000M heap size is the cause for any reason that's causing the JVM to not be able to assign that much contguous space, to resolve that you'll also have to modify this value in instance.properties file along with the configtool. That way, atleast it will start first and then it can get the value from DB on synchrnonization.
Please paste the excerpt from the relevant bootstrap so we can help further as to whats causing the bootstrap failure.
REgards,
Snehal -
Increase JVM heap size when calling it from C++
I have a program that loads images and only works properly increasing heap.
java McVImg
gives me an Out of memory error.
java -Xmx120M McVImg
works fine.
If I want to call JVM from a C++ program using Java native interface,
How should I increase JVM heap ?
Thanks in advance. Ignasi Villagrasa.I'm trying to do what you told me and it doesn't work.
I show the C++ code I'm using:
void JavaParam::LoadJVM()
JavaVMInitArgs vm_args;
JavaVMOption options[2];
jint res;
vm_args.version = JNI_VERSION_1_2;
JNI_GetDefaultJavaVMInitArgs(&vm_args);
if (res < 0)
fprintf(stderr, " Requested version is not supported\n");
fputs ("Requested version is not supported\n",traza);
fflush(traza);
exit(-1);
//Establecemos classpath
//Atencion el classpath ser� el jar
//options[0].optionString = "-Djava.class.path=..";
options[0].optionString = "-Djava.class.path=..\\mcjava.jar";
options[1].optionString = "-Xmx120M";
//Nuevos argumentos
vm_args.options=options;
vm_args.nOptions = 2;
vm_args.ignoreUnrecognized = JNI_FALSE;
//Creamos Maquina Virtual Java
res = JNI_CreateJavaVM(&jvm,(void **)&env,&vm_args);
if (res < 0)
fprintf(stderr, "Can't create Java VM: %d\n",(int)res);
fprintf(traza, "Can't create Java VM RES: %d \n",(int)res);
fflush(traza);
exit(1);
jvm_creada = 1;
Is that right ?
Thanks in advance. Ignasi Villagrasa. -
How to increase a bean's heap size using -XMS
Excuse my ignorance. We developed a bean that opens a hi resolution (3,000 pixels by 3,000 pixels) JPEG from the hard drive and through JAI:
1. Zooms in
2. Crops
3. Streams the result to the browser
It works perfectly with small files but when we use the large JPEGs it gives an Out of Memory Exception
I have read extensively about how easy it should be to do the -XMS in the command line to increase the sandbox size to 256 MB or whatever.
But apparently the command requires the name of an application among its parameters. If we try to run it without such parameter it returns the online help.
Does anyone know what to enter in this parameter? Would it be our bean's name? Or certain class within JAI? How can we know which class is the one that runs out of memory?
Please help!!
:o)I'll try that first thing tomorrow when I'm in my
workstation. Although I think we tried that. I'll let
you know of the outcome though.
My next question (in case what you say does not solve
our problem) will very very likely be utterly stupid.
I'll make it anyways.
Our bean resizes and crops the image through calls to
JAI. To follow your example, let's assume the bean is
called FooClass. Is it a fact the memory increase
should be applied to FooClass or can it be another JAR
or class outside of ours the one that is actually
running out of memory?
In our first rounds we didn't even have the code
inside a class but rather just a JSP. Since it was
running out of memory and we didn't know how to assign
memory to a JSP we decided to port it to a bean and
attempt to XMX the bean. Is there a way to solve out
of memory errors triggered by a JSP alone and not a
class?The -Xmx and -Xms switches applies to the whole JVM where the class is running. They can not be applied to a special class. Use the java -Xms etc for starting the application server/servlet container where your jsp runs and it will increase the amount of memory available. -
I opened a .psd file (300 ppi, CMYK, .jpgs (1626px x 2130px), I saved it as a jpg (None, 12, base "standard", preview checked).
I then closed the original .psd file.
I repeated those steps on the same file and saved a series of 6 .jpgs.
Of those 6 files, I received 2 large files (6.2MB) and 4 smaller (3.2MB) files.
My coworkers who were having trouble opening some of my jpg images in Windows Photo Gallery on Vista OS were able to open the smaller files but not the larger ones.
Do you have any idea why the same settings would give me different file sizes from CS5?
Is there a way I can make it consistently keep the smaller more compatible version?How well a image data compresses depends on image content. Image with High detail do not compress well image will little detail will compress well and the file size will be small. Compare a image of a blank white wall to a wall with a black and white checker board wall paper. One is all white it white no other detail to detail the other has squares that vary in size because of perspective angle and distance a lot of detail must be recorded.
I do not know why they can not open some of your images. File size should not be an issue. All your image decoded are the same size Width number of Pixels Height numbers of pixels background layer only for these are jpeg files. -
Default Heap Size when using jmsc.dll
We have had some crashes using Weblogic JMS (v 11.x) with one of our C-API apps.
How can I find out the xmx size being used by Java?If you turn on JMSDEBUG (by setting it to 'y') the JMS C API may print out the JVM options. The log messages will go to the files started with "ULOG" in the directory where your app runs from. You can change the location by setting the ULOGPFX variable in your client environment.
You can override the JVM settings with JMSJVMOPTS variable.
Hope this helps. -
Why not show another IP address?
What is the "::" stand for in the file /etc/hosts. Why another IP address is not listed?
[root@localhost /]# cat /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 localhost.localdomain localhost localhost
::1 localhost6.localdomain6 localhost6What is the "::1" stand for in the file /etc/hosts. Is the IP address for loopback adapter in IPv6 (compressed) format.
Why another IP address is not listed?Check your interface settings in /etc/sysconfig/network-scripts directory. -
Is ist possible to define heap size when start with java -jar
Hi,
I start my application as executable jar. How can I set the heapsize when double clicking myapp.jar ? With java -Xmx512m -jar myapp.jar it should go. But can I specify this when double clicking the myapp.jar ?
Thanks
OliFor all jars it is not acceptable I think.... the value as entry in the manifest.mf could be nice... :(
-
Gurus,
Could some body help me to understand the differentiate between heap size parameters -Xms and -Xmx ? I usually change both of them. One another is that, the maximum heap size we can use is total ram/2 ?
Thanks,Text from the above link
==================
As part of the Best Practices, we know that we should be setting -Xms & -Xmx Java command line parameters. What are these settings and why is it required to set these.
As JAVA starts, it creates within the systems memory a Java Virtual Machine (JVM). JVM is where the complete processing of any Java program takes place. All JAVA applications (including IQv6) by default allocates & reserves up to 64 MB of memory resource pool from the system on which it is running.
The Xms is the initial / minimum Java memory (heap) size within the JVM. Setting the initial memory (heap) size higher can help in a couple of ways. First, it will allow garbage collection (GC) to work less which is more efficient. The higher initial memory value will cause the size of the memory (heap) not to have to grow as fast as a lower initial memory (heap) size, thereby saving the overhead of the Java VM asking the OS for more memory.
The Xmx is the maximum Java memory (heap) size within the Java Virtual Memory (JVM). As the JVM gets closer to fully utilizing the initial memory, it checks the Xmx settings to find out if it can draw more memory from the system resources. If can, it does so. For the JVM to allocate contiguous memory to itself is a very expensive operation. So as the JVM gets closer to the initial memory, the JVM will use aggressive garbage collection (to clean the memory and if possible avoid memory allocation), increasing the load on the system.
If JVM is in need of memory beyond the value set in Xmx, the JVM will not be able to draw more memory from system resource (even if available) and run out of memory. Hence, the -Xms and -Xmx memory parameters should be increased depending upon the demand estimation of the system. Ideally both same should be the same value (set at maximum possible as per demand estimation). This ensure that the maximum memory is allocated right at the start-up eliminating the need for extra memory allocation during program execution. We recommend aggressive maximum memory (heap) size of between 1/2 and 3/4 of physical memory.
Edited by: oracleSQR on Oct 7, 2009 10:38 AM -
The initial heap size must be less than or equal to the maximum heap size.
All,
Please help!!
I have tested my Application Client Project in WSAD on my pc and it works fine.
I have 1gb RAM on my pc. When I deploy the same app on another xp pc(same as mine but 512mb RAM) I get a heap size error. Here is the exact error:
Incompatible initial and maximum heap sizes specified:
initial size: 268435456 bytes, maximum heap size: 267380736 bytes
The initial heap size must be less than or equal to the maximum heap size.
The default initial and maximum heap sizes are 4194304 and 267380736 bytes.
Usage: java [-options] class [args...]
(to execute a class)
or java -jar [-options] jarfile [args...]
(to execute a jar file)
where options include:
-cp -classpath <directories and zip/jar files separated by ;>
set search path for application classes and resources
-D<name>=<value>
set a system property
-verbose[:class|gc|jni]
enable verbose output
-version print product version
-showversion print product version and continue
-? -help print this help message
-X print help on non-standard options
Could not create the Java virtual machine.
Press any key to continue . . .
Here is the batch file that runs my app:
@echo off
SET appClientEar=C:\corp\apps\mts\jars\MTSClientEAR.ear
set JVM_ARGS=-Xms256M -Xmx256M
set CLIENT_PROPS=C:\corp\apps\mts\jars\medicalclient.properties
set APP_ARGS=
call C:\bnsf\IBM\WebSphere\AppClient\bin\launchClientBNSF.bat "%JVM_ARGS%" %appClientEar% "-CCpropfile=%CLIENT_PROPS%" %APP_ARGS%
@pause
I have changed the value of Xms and Xmx of JVM_ARGS to different size but I sitll get error. Anyone knows what the problem is. Thanks..Don't know why, but the "maximum heap size: 267380736 bytes" value is just slightly less than 256*1024*1024, wheras the reported initial size is equal to that.
Try setting the initial value to 255MB. -
Heap sizes with Planning11.1.1.3 & Weblogic help
I'm used to having the xms and xmx heap sizes in the registry with planning. But i installed Planning 11.1.1.3 with weblogic 9.2 (all 32 bit) and deployed as a service. However, the registry does not have the usually heap settings automatically added. I can modify the setDomainEnv script to bump up heap sizes but running that script leaves the command window running in the foreground which is something i don't want. I tried manually adding the heap size settings to the Hyperion Planning registry settings, but they are not taking effect when starting the web server via the services console. Anyone have any ideas. I peaked around the web logic admin console but i didnt really want to try and set the heap sizes through there. plus, i'm not sure any settings in there will take effect when starting from the service console. I thought all the arguments for a service are derived from the registry.
EssbaseInAz wrote:
"We are using 64bit Windows 2003 with Weblogic 9.2 as well. What is the heap size suggestions in Hyperion Planning 11.1.1.3?"
Are the heap sizes already present in your planning registry setting? Did you use the jrockit jvm or the sun jvm when configuring Weblogic. I'm trying to track down what caused my install not to create the heap size jvmoption in my registry. I know Weblogic recommends using the jrockit jvm for performance reasons, but if i can't get the planning service to run with larger heaps, i may have to change jvms. Having the planning web running in the foreground seems to risky for me (someone logging out and shutting down any running windows).We are using Jrockit JVM and the heap size setup is around 1GB.
As John mentioned, 1.8GB may be the max even though you are using 64bit version. -
Is it possible to set the heap size limits in system-wide config?
Hi,
I am trying to set the JRE heap size limits (-Xms and -Xmx) by using the system-level deployment.properties file. The JRE version is 1.6 update 6.
Normally, I would have something like this in the user-level deployment.properties file:
deployment.javapi.jre.1.6.0_06.args=-Xms64M -Xmx192MHowever, when the same line is put in the system-level properties, it does not seem to have any effect. I have tried different options, also unsuccessfully:
javaplugin.vm.options=-Xms64M -Xmx192M
or
javaplugin.minHeapSize=64m
javaplugin.maxHeapSize=192mIs it not possible to address this setting via system-level properties at all? I am hoping that I will not have to resort to per-user config files.
Best regards,
MartinHi Michael,
thank you for your answer. I am sorry, I was unable to find the link to the message 10144001.
My ultimate goal would be setting the system level settings as opposed to settings per applet. I was unable to find any mentioning of "deployment.javapi.jre.X.X.X_XX.args" in the official documentation here: http://java.sun.com/j2se/1.5.0/docs/guide/deployment/deployment-guide/properties.html
Best regards,
Martin -
Can someone tell me if there is a way to :
(1) verify and modify heap size in nt service?
(2) in multi server mode, there are two nt services for weblogic
domains, is it needed to change heap size for weblogicAdmin service for
heap size increase? What will happen if PIA is 1024MB heap size and
weblogicAdmin is 256MB?
Thanks in advance/TNicolas, test show that once the nt service is installed, modifying heap
size in setenv.cmd and run setenv.cmd file reinstall nt service does not
change the heap size already in registry. So, test shows that I can
modify the heap size directly in registry and restart service?. Am i doing something wrong here.. can i correct and only to modify and existing heap size in
registry?
Please let me know what else should I do once the old heap
size in already in registry and not the new heap size when reinstalled NT service.
other question, long the weblogic tuning, I found the following from bea site. During the peak time, we may have 40000 unique users per day. Should I also consider increase maxUserPort? The weblogic domains are hosted on windows 2003 servers.
Windows Tuning Parameters
For Windows platforms, the default settings are usually sufficient. However, under sufficiently heavy loads it may be necessary to adjust the MaxUserPort and TcpTimedWaitDelay. These parameters determine the availability of user ports requested by an application.
By default, ephemeral (that is, short-lived) ports are allocated between the values of 1024 and 5000 inclusive using the MaxUserPort parameter. The TcpTimedWaitDelay parameter, which controls the amount of time the OS waits to reclaim a port after an application closes a TCP connection, has a default value of 4 minutes. During a heavy loads, these limits may be exceeded resulting in an address in use: connect exception. If you experience address in use: connect exceptions try setting the MaxUserPort and TcpTimedWaitDelay registry values under the HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters key:
MaxUserPort = dword:00004e20 (20,000 decimal)
TcpTimedWaitDelay = dword:0000001e (30 decimal)
Increase the value of the MaxUserPort parameter if the exception persists.
For more information about Windows 2000 tuning options, see:
§ The Microsoft Windows 2000 TCP/IP Implementation Details.
§ The Windows 2000 Performance Tuning white paper.
thanks
T -
Any side effects on JRE/JVM when setting Desktop Heap Size?
In Win2003 we experience a limitation of about 70 java.exe's. By setting the Desktop Heap Size we can increase this limit to more than double. Link showing more info on Desktop Heap Size:
http://blogs.msdn.com/ntdebugging/archive/2007/01/04/desktop-heap-overview.aspx
Does this give any side effects to the running java.exe's?
Has anyone experimented with this?Hi Bobo
It seems to be a bit small. I have close the same configuration like you and set the
maxMemory to 512 MB/server
Regards Ruedi :-)
Bob Krause schrieb:
Hello,
I have a customer that is running WLS 6.1 sp4 and they have set the JVM max memory
value to 64M on a Sun Solaris box with over 6 meg of memory and 4 CPUs.
We have an application on it that makes use of connection pooling, session objects,
over 30+ stateless session beans, and has 100-200 users connected to the application
for 4-8 hours at a time.
Does this value of 64M make any sense??? This is the default out of the box setting
that we have setup on our development PCs.
Also as a side note, can any point me in the direction of any formulas for the
calculation of this number and also the number of execute threads.
Thank you,
Bob
Maybe you are looking for
-
I created and inserted a background image in the Container. It includes "link buttons" built into the image in Photoshop, meaning images intended to be clicked in order to move to another page. I can't create hotspots/image maps to use to create li
-
MM:Printing of Purchase Order Ammendment
Dear Gurus, Plz tell me the configuration setting for Printing the PO ammendment, Rgds, Vinay Parne
-
Hi Experts, Can we set Approval stages for Add-on Forms in SAP B1? if it is possible pl. guide me to set the approval. Thanks in Advance. Regards Raja.S
-
For some reason, Safari now opens upon the booting of the computer...I looked at Preferences and don't see anything there that would indicate this command...any ideas????
-
Adobe Premiere Elements 9 Driver Update Problem
I have had Adobe Premiere Elements 9 for almost a year now, and I had just made a movie with my friends. When I go to launch Premiere Elements it says "Incompatible display driver, please update your display driver. I am on a Dell Inspiron E1705 la