After you install Optim Performance Manager 5.1.1.1, start the web console and try to add a database for monitoring.

After establishing the connection, you may notice an opmConfigurationAdapter.checkLicense error and you may wonder that you specified the license during install and why this error is being thrown.

I do not know the internals but after making some changes in the startup scripts, I did not see this error come again and it appears that it has to do something the way memory is assigned to the Web Client and the OPM Server.

For example:

Your server has plenty of RAM and the server is not running anything at the moment. The maximum memory logic calculation in pestart file allows a large chunk of memory to the OPM server and that seems to be the problem.

The error opmConfigurationAdapter.checkLicense seems to go away if you stop and start the OPM server (OPMstop.sh and OPMstart.sh) and I noticed that the maximum memory allocation is now way less than the one it was allocated when physical machine first started. The error does not pop up again after restarting OPM server. The maximum memory allocation is based upon available free memory at the moment and which is less now when DB2 is now up and running (which was not the case when OPM server started since it also starts DB2 server if not running.)

I looked closely at the startup files and I made following changes in the following scripts and this checkLicense error did not pop-up again.

/opt/ibm/OPM/bin/product.sh
---------------------------

Change -Xmx2048m to -Xmx512m
Change -Xms128m to -Xms256m

/opt/ibm/OPM/RepositoryServer/bin/pestart

Change -Xms128m to -Xms256m
Change percentOfUsage=80 to percentOfUsage=50
Change minJavaHeapSize=1024 to minJavaHeapSize=512
Change maxJavaHeapSize=32384 to maxJavaHeapSize=1024

Explanation:

The Web Console Client memory is controlled in /opt/ibm/OPM/bin/product.sh and in my opinion the minimum memory specified 128MB is too low and I bumped that to 256MB. However, the maximum memory specified to 2048MB may be too aggressive for a machine which has only 4GB of RAM. I set the maximim memory to 512MB for the web console. As a best practice, the maximum memory for Web Console should not be more than 1/8 of the total machine's memory.

The OPM Server memory calculation is very aggressive in the product install files and it does not seem to think that there is also DB2 installed as a repository database which also needs memory.

The default 80% memory based upon its calculation as what is free at the moment is too aggressive and I reduced that to 50%. 

I increased the minimum memory from 128MB to 256MB but reduced the minJavaHeapSize and maxJavaHeapSize to 512 and 1024.

My best estimate is that maxJavaHeapSize memory should not be more than 1/4 of the available memory on the machine. This combination works pretty well for me now even in the constrained environment.

On an OPM server, which also has DB2, the INSTANCE_MEMORY should get enough memory and if Web Console and OPM Server are allowed to gobble up huge memory, it is a problem since STMM has a small room to play. This combination works for me now but further tweak may be required and I will update this article what works best if I need to do some tweaks.