Thursday, December 8, 2011

JVM Controllers and Pooling

Are your 11g frmweb.exe processes consuming too much memory in a Windows 2008 x64 environment? Noticed that those processes are using webutil?

Heres a short story.

There are issues with Webutil and a Win x64 environement. An SR was opened with Oracle. The guide below tells each forms process to use the "community" JVM instead of spawning its own.
**UPDATE: Oracle will not continue to work on this request. It is closed. It is considered normal.

The default behaviour is for each session to start and maintain its own JVM.

For an idea of what the heck a JVM controller is on an application server click here (diagrams included)

To interface with a JVM Controller click here

You can either administrator JVM controllers via Middleware EM (7001) or you can use the cmd line on the server.

Enterprise Manager:


Logon to enterprise manager, expand the forms folder and rclick on "forms". Select JVM Configuration

 On the JVM Configuration, choose "Create Like" , input "testingJvm" and select "EXAMPLE" as the jvm to copy, then complete by clicking the "Create" button.

For JVM options : -Xms1024m -Xmx2048m for good measure.
Classpath : Basically the same classpath as the one found inside your application server environment file. D:\Oracle\Middleware\11gfr\forms\j2ee\frmsrv.jar;D:\Oracle\Middleware\11gfr\jlib\ldapjclnt11.jar;D:\Oracle\Middleware\11gfr\jlib\debugger.jar;D:\Oracle\Middleware\11gfr\jlib\ewt3.jar;D:\Oracle\Middleware\11gfr\jlib\share.jar;D:\Oracle\Middleware\11gfr\jlib\utj.jar;D:\Oracle\Middleware\11gfr\jlib\zrclient.jar;D:\Oracle\Middleware\11gfr\reports\jlib\rwrun.jar;D:\Oracle\Middleware\11gfr\forms\java\frmwebutil.jar;D:\Oracle\Middleware\11gfr/jlib/start_dejvm.jar;D:\Oracle\Middleware\11gfr\opmn\lib\optic.jar;D:\Oracle\Middleware\11gfr\forms\java\jacob.jar;D:\Oracle\Middleware\11gfr\forms\java\frmall.jar

User count
: 200 - also for good measure.

: D:\Oracle\Middleware\Forms\FRComponent\frcommon\tools\jvm\log

: "ON"

And thats it, the next step is to navigate to JVM Controller, select your control and click start.

One last step is required to take advantage of your new JVM Controller. Open formsweb.cfg and add the following parameter to the otherparameters option:


All sessions using the configuration under which this option is set will use less memory when needing to use a JVM.Save formsweb.cfg.

Your otherparameters will look like this: otherparams=jvmcontroller=testingJvm

JVM Controller command line
If you want to control DEJVM, you should make use of the cmd line options for JVM Controllers.

It's really simple, open a command window and run the following commands, dont forget to adjust the paths for your environment:

echo Set your home and instance info.
set ORACLE_HOME=D:\Oracle\Middleware\11gfr
set ORACLE_INSTANCE=D:\Oracle\Middleware\Forms

echo Stop any dejvm which might be running with specified name.
dejvm -stop jvmcontroller=testingJvm

echo Start testingJvm
dejvm -start jvmcontroller=testingJvm jvmoptions="-Xms256m -Xmx512m" maxsessions=200 classpath=D:\Oracle\Middleware\11gfr\forms\j2ee\frmsrv.jar;D:\Oracle\Middleware\11gfr\jlib\ldapjclnt11.jar;D:\Oracle\Middleware\11gfr\jlib\debugger.jar;D:\Oracle\Middleware\11gfr\jlib\ewt3.jar;D:\Oracle\Middleware\11gfr\jlib\share.jar;D:\Oracle\Middleware\11gfr\jlib\utj.jar;D:\Oracle\Middleware\11gfr\jlib\zrclient.jar;D:\Oracle\Middleware\11gfr\reports\jlib\rwrun.jar;D:\Oracle\Middleware\11gfr\forms\java\frmwebutil.jar;D:\Oracle\Middleware\11gfr/jlib/start_dejvm.jar;D:\Oracle\Middleware\11gfr\opmn\lib\optic.jar;D:\Oracle\Middleware\11gfr\forms\java\jacob.jar;D:\Oracle\Middleware\11gfr\forms\java\frmall.jar logdir=D:\Oracle\Middleware\Forms\FRComponent\frcommon\tools\jvm\log logging=on

Things to consider:Restarting your weblogic server will not kill the dejvm process, it will soldier on. So if you have a scheduled WLS_FORMS restart on the cards, I would recommend taking the above commands and adding them along with your service restart routines. By default, should a DEJVM process not be running when a forms process requires it, the DEJVM specified inside the session config file will be started automatically.  

Also:IMPORTANT NOTE:  Before restarting the Oracle WebLogic managed server, all the JVM Controller processes (dejvm) started by that server must be stopped. Otherwise, WLS_FORMS will not restart after a shutdown. See Stop dejvm Before Stopping and Restarting WLS_FORMS


No comments:

Post a Comment