Tuesday, January 22, 2013

Heap Size: Increase it sparingly

I had a pretty interesting encounter with the HEAP size which is why I am writing this. It may or may not hold 100 percent true, however, reading someone else always gives us perspective which is why I am writing this. Please do comment what you have experienced or if you agree or disagree. And you can even play withe the heap size to see how it affects your performance. 

Because the Financial reports started crashing more frequently than usual while users tried to pull reports, we thought about increasing the heap size and do some other enhancements in order to make our EPM system work more efficiently and more accurately.
1.       First we rebooted the Servers as they had not been turned off for a while which is why we thought the system was lagging. 
2.       The other step we took was increase the Java heap size for all the EPM products, such as Planning, Financial Reports, WebAnalysis, EAS, et, al. – There are two ways (that I know of) that we can increase the Java heap size.

As per Oracle’s technical documentation regarding increasing heap size, titled INCREASING THE JVM MEMORY ALLOCATION (source: http://docs.oracle.com/cd/E17236_01/epm.1112/epm_install_11121/frameset.htm?ch07s01s01.html) there are two different methods:
a.       Using the Registry Editor: Command line > regedit
b.      Editing the product’s custom start script to specify the desired heap sizes. Example, EPM_INSTANCE/bin/deploymentscripts/ path and the .bat or .sh file and modify Xms and Xmx (128, 1024 etc)
The instruction also suggests restarting Windows service or rerunning the script to see the change.
As per the instruction, we changed the heap size and ran the .bat file, however, we could not verify the change. Because there are so many products installed and the paths are not very clear, we were not being able to check and see if the changes took effect.
3.       In order to make sure we are changing the Heap size in the right manner, I called Oracle for their support So, we created an SR, explained the issue and Oracle, and Oracle got someone to help us out. 

           Oracle suggested us change/increase the HEAP size by using the Registry Editor (change the values and then restart he service). For example, in order to change the Heap Size for the Financial Reporting. The following would be the process (if you are not aware about the HEAP size or if you have not changed the HEAP size yet, this is a good example, for those who are experts, please do comment)
                                                                          i.      Regedit on the command prompt.
                                                                        ii.      HKEY_LOCAL_MACHINE -> Software -> Hyperion Solutions -> FinancialReporting0 -> HyS9FRReports
                                                                      iii.      On the right, check for JVMOption name that corresponds to Xmx (Xms is the minimum heap size). You will see something like JVMOption4 for example. The number can be whatever.          
                                                                        iv.      Right-click and MODIFY
                                                                        v.      Change the number to whatever you want to increase to. In this case we have changed from 512 to 1024.
                                                                      vi.      Restart Financial Reporting for the changes to take effect.

We can change HEAP size for any of the products. The following is a list that I have, however, it is environment or system-specific. It all depends on what you are doing, what kind of environment you have, how big the system you have, etc. So, these numbers are just for example. 

Provider services 512/1024
EAS 512/1024
FRPrint na/1024
FReporting 512/1024
Foundation 1024/1024 as is
HReports 1024
Planning 1024/1024 as is
RA Framework 1024/1024 as is
RA Framework Agent 512/1024
WebAnalysis 512/1024
etc. 

After changing the heap size on all the different products, I checked to see if everything was working and the Financial Reporting print servers did not seem to work after the size was increased. In fact, when I checked it, the PDF files did not work.
Later on, I changed the size back to the original size just for the HR Reports and the PDF worked fine after restarting the print servers.
What I have learned from this experience is that even though the HEAP size increase helps in most cases, it may, at times, effect adversely.




No comments: