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.




EPM Installation and the role of User Account Control (UAC)


Oracle Essentials: Oracle Database 11g (4th Edition) by Greenwald, Ric (Google Affiliate Ad)
During Hyperion EPM installation, Oracle's EPM installation document instructs disabling the Window's User Account Control. If we do not disable the UAC, we will get an error message. This is what I have learned during the EPM installation. Through research on Microsoft page, I have found out the ways of disabling the UAC, and I have then here so that someone with the same issue can have a quick look for reference. These are available in Microsoft's page as well. 


To turn off UAC

  1. Click Start, and then click Control Panel.
  2. In Control Panel, click User Accounts.
  3. In the User Accounts window, click User Accounts.
  4. In the User Accounts tasks window, click Turn User Account Control on or off.
  5. If UAC is currently configured in Admin Approval Mode, the User Account Control message appears. Click Continue.
  6. Clear the Use User Account Control (UAC) to help protect your computer check box, and then click OK.
  7. Click Restart Now to apply the change right away, or click Restart Later, and then close the User Accounts tasks window.

 To disable UAC from prompting for credentials to install applications

  1. Click Start, click All Programs, click Accessories, click Run, type secpol.msc in the Open text box, and then click OK.
  2. From the Local Security Settings console tree, click Local Policies, and then click Security Options.
  3. Scroll down and double-click User Account Control: Detect application installations and prompt for elevation.
  4. Select the Disabled option, and then click OK.
  5. Close the Local Security Settings window.
 To disable Admin Approval Mode
  1. Click Start, click All Programs, click Accessories, click Run, type secpol.msc in the Open box, and then click OK.
  2. If the User Account Control dialog box appears, confirm that the action it displays is what you want, and then click Continue..
  3. From the Local Security Settings console tree, double-click Local Policies, and then double-click Security Options.
  4. Scroll down and double-click User Account Control: Run all administrators in Admin Approval Mode.
  5. Select the Disabled option, and then click OK.
  6. Close the Local Security Settings window.
 To change the elevation prompt behavior for administrators
  1. Click Start, click Accessories, click Run, type secpol.msc in the Open box, and then click OK.
  2. From the Local Security Settings console tree, click Local Policies, and then click Security Options.
  3. Scroll down to and double-click User Account Control: Behavior of the elevation prompt for administrators.
  4. From the drop-down menu, select one of the following settings:
    • Elevate without prompting (tasks that request elevation will automatically run as elevated without prompting the administrator)
    • Prompt for credentials (this setting requires user name and password input before an application or task will run as elevated)
    • Prompt for consent (default setting for administrators)
  5. Click OK.
  6. Close the Local Security Settings window.
To change the elevation prompt behavior for standard users
  1. Click Start, click Accessories, click Run, type secpol.msc in the Open box, and then click OK.
  2. From the Local Security Settings console tree, click Local Policies, and then Security Options.
  3. Scroll down to and double-click User Account Control: Behavior of the elevation prompt for standard users.
  4. From the drop-down menu, select one of the following settings:
    • Automatically deny elevation requests (standard users will not be able to run programs that require elevation, and they will not be prompted)
    • Prompt for credentials (this setting requires user name and password input before an application or task will run as elevated, and it is the default for standard users)
  5. Click OK.
  6. Close the Local Security Settings window.