Monday, May 8, 2017

Best Practices for Performance for Concurrent Managers in E-Business Suite

Best Practices for Performance for Concurrent Managers in E-Business Suite


This Document contains 5 topics

1. Generic Tips

2. Transaction Manager (TM).

3. Parallel Concurrent Processing (PCP) Environment.

4. Tuning Output Post Processor (OPP).

5. Concurrent Processing Server Tuning.

Generic Tips

 1) Sleep Seconds -  is the number of seconds your Concurrent manager waits between checking the list of pending concurrent requests (concurrent requests waiting to be started). A manager only sleeps if there are no runnable jobs in the queue.
Tip: During peak time, when the number of requests submitted is expected to be high, Set the sleep time to a reasonable wait time(e.g. 30 seconds) dependent on the average run time and to prevent backlog. Otherwise set the sleep time to a high number (e.g. 2 minutes). This avoids constant polls to check  for new requests.

2) Increase the cache size (number of requests cached) to at least twice the number of target processes.
For example, if a manager's work shift has 1 target process and a cache value of 3, it will read three requests, and try to run those  three requests before reading any new requests

Tip: Enter a value of 1 when defining a manager that runs long, time-consuming jobs, and a value of 3 or 4 for managers that run small, quick jobs.
This is only guidance and a balance needs to struck in tuning the cache, so with fast jobs you need to cache to get enough work for a few minutes. With slow jobs, a small queue helps should you need to reprioritize requests.

4) To maximize throughput consider reducing the sleep time of the Conflict Resolution Manager (CRM).  The default value is 60 seconds. You can consider setting to 5 or 10 seconds.

5) Avoid enabling an excessive number of standard or specialized managers. It can degrade the performance due polling on queue tables (FND_CONCURRENT_REQUESTS...). You need to create specialized managers only if there is a real need.

6) Set the system profile option "Concurrent: Force Local Output File Mode" to "Yes" if required  . You need to apply Patch 7530490 for R12 (or) Patch 7834670 for 11i to get this profile.

Refer to Note 822368.1 - 'Purge Concurrent Request FNDCPPUR Does Not Delete Files From File System or Slow performance'.

Note:- The profile option "Concurrent: Force Local Output File Mode" is set to "No" by default. After applying the patch, set the profile option to YES will cause FNDCPPUR to always access files on the local file system, hence FNDCPPUR will remove the OS files faster.To enable this feature, All Concurrent Manager nodes must be able to access the output file location via the local filesystem.

7) Truncate the reports.log file in log directory.   Refer to Note 844976.1 for more details.

Truncation of file "reports.log" is a regular maintenance work of Application DBA. Make sure that reports log file size should not increase to its maximum limit of 2 GB. There is no purge program to truncate file "reports.log". This maintenance needs to be done manually and regularly depending on number of concurrent program which uses "reports.log". You can safely truncate "reports.log".

The "reports.log" file can be located under $APPLCSF/$APPLLOG.

8) Ensure "Purge Concurrent Request and/or Manager Data, FNDCPPUR,"  is run at regular intervals with "Entity" parameter as "ALL".  A high number of records in FND_CONCURRENT tables can degrade the performance.

Additionally, the following are very good methods to follow for optimizing the process:
Run the job in hours with low workload. Doing this after hours will lessen the contention on the tables from running against your daily processing.
To get the requests under control, run the FNDCPPUR program with Age=20 or Age=18 would be a good method. That means, all requests older than 18 or 20 days will be purged.
Once the requests are under control, run the FNDCPPUR program with Age=7 to maintain an efficient process. This would solely depend on the level of processing that is performed at your site

9) Ensure that the log/out files are removed from the locations shown below as you run "Purge Concurrent Request and/or Manager Data program".
 $APPLCSF/$APPLLOG
 $APPLCSF/$APPLOUT
In the event that it does not remove the log/out files, over a period of time it will slow down the performance.  Please refer to the following note which suggests the patch which fixes it.

Note 822368.1 - 'Purge Concurrent Request FNDCPPUR Does Not Delete Files From File System or Slow performance'.
Note 1616827.1  Managing Concurrent Manager Log and Out Directories

10) Defragment the tables periodically to reclaim unused space / improve performance.
FND_CONCURRENT_REQUESTS
FND_CONCURRENT_PROCESSES
FND_CRM_HISTORY
FND_ENV_CONTEXT
FND_TEMP_FILES
FND_CONFLICTS_DOMAIN

HOW TO DEFRAGMENT

10.1) alter table <owner>.<table_name> move;

10.2)Note that, some indexes might become unusable after table is moved, check the index status from dba_indexes for the table moved and rebuild them too as explained in next bullet.
select owner, index_name, status from dba_indexes
where table_owner = upper('&OWNER') and
table_name = upper('&SEGMENT_NAME');

10.3) alter index <owner>.<index_name> rebuild online;

Note:

Ensure Concurrent Manager is down before you defragment.

Ensure the tablespace in which the object currently exists has got sufficient space before you move/defragment.

Always take backup of the tables before moving the data. It is recommended to perform ths action on Test instance initially then test it thoroughly before performing it on Production instance.


10.4) You will need to re-collect the statistics for the tables.

For example:
exec fnd_stats.gather_table_stats ('APPLSYS','FND_CONCURRENT_REQUESTS',PERCENT=>99);

11) Ensure you upgraded to the latest code to avoid below known Performance , Availablity & Deadlock related issues issues.
Performance

12 ) Profile Concurrent:Wait for Available TM  -  Total time to wait for a TM before switchover to next available TM.  Consider setting this  to 1 (second).

13) Ensure enough TMs exist to service the incoming request load.

14) When the load is high, set the following profile to optimum values to achieve better results.PO: Approval Timeout Value  -  Total time for workflow call (When initiated from Forms) to time out.

15)  Set the sleep time on the Transaction Manager to a high number (e.g. 10 minutes), this avoids constant polls to check for shutdown requests.

Parallel Concurrent Processing (PCP) Environment

16) If the failover of managers is taking too long refer to Note 551895.1 - 'Failover Of Concurrent Manager Processes Takes More than 30 Minutes'.

17) To avoid known issues, apply Patch 15900099 (11i), Patch 15981173 (12.0 ), Patch 15981176 (12.1.3) along with pre-requisites , when you are in the process of implementing PCP. Also refer to Note 1389261.1.

18) Set profile option 'Concurrent: PCP Instance Check' to 'OFF' if instance-sensitive failover is not required. Setting it to 'ON' means that concurrent managers will fail over to a secondary application tier node if the database instance to which it is connected goes down.

19)Transaction Manager uses DBMS_PIPE to communicate with application session prior to 11i.ATG_PF.H RUP3. DBMS_PIPE in turn uses OS Pipe.We might use Advance Queue(AQ) with 11i.ATG_PF.H RUP3 by setting System Profile Concurrent: TM Transport Type to QUEUE.

Note  Pipes are more efficient but require a Transaction Manager to be running on each DB Instance (RAC). So you might want to use "Queue" for easy maintenance.

20) Add these parameters depends on your Database version

                + _lm_global_posts=TRUE
                + _immediate_commit_propagation=TRUE  (11g RAC)
                + max_commit_propagation_delay=0  (9i RAC)

21) To speed up the PCP Failover ,Tune the below parameters.
Kernel parameters (Find the analogous parameter for your platform)
tcp_keepalive_intvl
tcp_keepalive_probes
tcp_keepalive_time ( Do not set this value to low; since it will then use up your network resources with unnecessary traffic)

DCD (Dead connection detection); To setup update sqlnet.ora from the Database Tier.
sqlnet.expire_time

Set the environment Variable at Concurrent Manager Tier.
FDCPTRW

Check PMON Cycle & Sleep Intervals for ICM (internal Concurrent Manager) setup.
Navigation OAM -> SiteMap -> Monitoring -> Internal Concurrent Manager Link(Under Availability) -> "View Status" -> "Edit ICM Runtime Parameters"

Tune Failover Processes.
In the case of node failover, the maximum number of processes that the work shift can run simultaneously.

Nodes can become overloaded when a middle-tier node fails and service instances on that node failover to their secondary nodes. The Failover Processes value should be smaller than the normal Processes value, to lessen the impact on the existing resources allocated on a secondary node. When failover occurs, the ICM uses the Failover Processes value in place of the normal running processes value as it iterates through service instances to perform queue sizing.

Navigation System Administration > Concurrent Managers > Standard Manager > Edit > Failover Processes

System Administration > Concurrent Managers > Output Post Processor > Edit > Failover Processes

Enable Reviver.
What is FNDREVIVER and How Is It Set? Note 466752.1

Ensure Internal Monitor is up and running on all the PCP Nodes. Ensure it has a valid workshift.
Concurrent > Manager > Define > Query "Internal Monitor" > workshift

Note:- The sole job of an Internal Monitor Process is to monitor the Internal Concurrent Manager and to restart that manager should it fail. The first Internal Monitor Process to detect that the Internal Concurrent Manager has failed restarts that manager on its own node.


Tuning Output Post Processor (OPP)

In order to tune the OPP to improve performance refer the below Note. It discusses  How to monitor the workload of OPP and Suggests you how to tune Output Post Processor (OPP) to improve performance and avoid java.lang.OutOfMemoryError exception.

Note 1399454.1 - 'Tuning Output Post Processor (OPP) to Improve Performance'.

Concurrent Processing Server Tuning

1. Any Concurrent Processing (CP) server tuning or load balancing needs are to be addressed by Oracle Consulting. There are way too many site specific factors that needs to be considered for optimum CP throughput: from machine hardware, to user request volume, to required Work Shifts, to programs run time characteristics (long / short running)--not to mention also testing and benchmarking. Such a tasks, is beyond the scope of ATG Support.

ATG support would be glad to investigate a failing manager or program issue; however, CP performance issues due to increased concurrent request volume or due to a new installation needs to be addressed by Oracle Consulting.

2. The "Tuning Concurrent Processing" chapter of the white paper "A Holistic Approach To Performance Tuning Oracle Applications Systems Release 11 and 11i" Note 69565.1 may provide some basic insight. Also reference the "Defining Concurrent Managers" and the "Setting Up and Starting Concurrent Managers" chapters of the "Oracle Applications System Administrator's Guide - Configuration".

3. As per Note 69565.1 "A Holistic Approach to Performance Tuning Oracle Applications Systems", "50% of concurrent processing performance tuning is in the business!"

4. Visit the Concurrent Processing Product Information Center (PIC) Note 1304305.1 for additional performance and setup documentation.

Concurrent Manager Not Starting After EBS Cloning

Concurrent Manager Not Starting After EBS Cloning


Symptoms:

When attempting to start the concurrent manager after recent clone, the following is shown in the

Internal Concurrent manager log:

ERROR
-----------------------
07-FEB-2014 12:42:03 - Node list before TNS Update
Could not contact Service Manager FNDSM_SRVEBSUAT1_UAT. The TNS alias could
not be located, the listener process on SRVEBSUAT1 could not be contacted,
or the listener failed to spawn the Service Manager process.
07-FEB-2014 12:42:04 - Node list after TNS Update
Node=SRVEBSUAT1, Inst=, SM Name=FNDSM_SRVEBSUAT1_UAT, Up=0

Process monitor session started : 07-FEB-2014 12:42:04
Queue size posting session started : 07-FEB-2014 12:42:04
Could not contact Service Manager FNDSM_SRVEBSUAT1_UAT. The TNS alias could
not be located, the listener process on SRVEBSUAT1 could not be contacted,
or the listener failed to spawn the Service Manager process.
Node list before Update
Node=SRVEBSUAT1, Inst=, SM Name=FNDSM_SRVEBSUAT1_UAT, Up=0
Node list after Update
Node=SRVEBSUAT2, Inst=, SM Name=, Up=1
Node=SRVEBSUAT1, Inst=, SM Name=FNDSM_SRVEBSUAT1_UAT, Up=0
No default node found.
0: Target processes raised to Min
Set max processes for queue (0/0) to 100, and sleep seconds to 30
4: Target processes raised to Min

Cause:

The issue is caused by problems with the clone process. .

Solution:

Carry out the following steps :

1- Repeat perl adcfgclone.pl  dbTier.

2- Repeat perl adcfgclone.pl  appsTier .

3-  Relink the following executables by running:

adrelink  force=y "fnd FNDSM"

adrelink force=y "fnd FNDLIBR"

adrelink force=y "fnd FNDFS"

adrelink force=y "fnd FNDCRM"

4-  Run FNDCPASS to recerate all passwords.

5- Run adautocfg.sh  on application node.

Reference metalink Doc ID 1622433.1

Concurrent Managers Status shows ”Target node/queue unavailable” in Concurrent–>Manager–>Administer screen form.

Concurrent Managers Status shows  ”Target node/queue unavailable”  in Concurrent–>Manager–>Administer screen form.


Managers down – Status show “Target node/queue unavailable  

Symptoms:

The environment is a clone of a Production created using Rapid Clone. Most of the concurrent managers

came up fine, but the Conflict Resolution Manager (and a couple of other managers) are showing:

Target node/queue unavailable.

Cause:

The table FND_NODES was not populated correctly.

Solution:

1. Stop all concurrent managers.

2. Run the following in SQL*Plus:

SQL> EXEC FND_CONC_CLONE.SETUP_CLEAN;
COMMIT;
EXIT;

3.. Run AutoConfig on all tiers, firstly on the DB tier and then the APPS tiers, to repopulate the
required system tables.

4. Start all managers to re-test.

Reference metalink Doc ID 732709.1

Thursday, May 4, 2017

Network Test and Analyze Client System for Oracle E-Business Suite

Network Test and Analyze Client System for Oracle E-Business Suite

Oracle provide us tool to diagnose network performance and Analyze Client System at remote location in Oracle EBS:

The Network test Form
The Client Analyzer

How to Run Network Test Form:

1. Login to Applications as the Sysadmin Responsibility.
2. Navigate to Application > Network Test
3. Click the ‘Clear Old Test Data’ button to purge previous test results from the database.4. Specify the number of Trials (5 Default Value) and the Iterations for each trial for both the latency and bandwidth blocks.
4. Click on “Run Test” button to perform the test.










Latency and Bandwidth result will be appear on Network Test form:

What is Latency:

In a network, latency, a synonym for delay, Latency is an expression of how much time it takes for a packet of data to get from one designated point to another. In some usages, latency is measured by sending a packet that is returned to the sender and the round-trip time is considered the latency.
There are a number of factors that contribute to network latency. These include transmission, propagation, routers and computer hardware delays. All of these play an important role in the overall determination of network latency. In some cases, there may not be a delay the user can notice. Fortunately, if network latency does become a problem, there are things that can be done to improve the situation.

What is Bandwidth:

Bandwidth is a term used to describe how much information can be transmitted over a connection. Bandwidth is usually given as bits per second, or as some larger denomination of bits, such as Megabits per second, expressed as kbit/s or Mbit/s. Bandwidth is a gross measurement, taking the total amount of data transferred in a given period of time as a rate, without taking into consideration the quality of the signal itself.

This Network Test is used to evaluate the performance of the network with Oracle Applications, and it provides the following tests:

a. Latency Test. The latency measured is for a forms packet.

b. Bandwidth Test. The bandwidth tests from the client to the Applications Tier and then to the DB server.

Analyze the Result:
Oracle Recommends Network latency should be low and bandwidth should be high.
How to Run Analyze Client System

1. Login to Applications as the Sysadmin Responsibility.
2. Navigate to Application > Network Test
3. Click the ‘Help -----Diagnostics--------Client System Analyzer
4. Click on “View Result” button.
Viewing Data Collected by the Client System Analyzer . The Client System Analyzer collects information about a computer’s configuration, such as:

Hard drive size
CPU speed
Memory
Installed software
It also performs some network performance measurements.

Wednesday, May 3, 2017

Top 10 Sessions With Largest Temp Usage

Top 10 Sessions With Largest Temp Usage


SELECT *
  FROM (  SELECT s.sid,
                 s.status,
                 s.sql_hash_value sesshash,
                 u.SQLHASH sorthash,
                 s.username,
                 u.tablespace,
                 SUM (u.blocks * p.VALUE / 1024 / 1024) mbused,
                 SUM (u.extents) noexts,
                 NVL (s.module, s.program) proginfo,
                    FLOOR (last_call_et / 3600)
                 || ':'
                 || FLOOR (MOD (last_call_et, 3600) / 60)
                 || ':'
                 || MOD (MOD (last_call_et, 3600), 60)
                    lastcallet
            FROM v$sort_usage u, v$session s, v$parameter p
           WHERE u.session_addr = s.saddr AND p.name = 'db_block_size'
        GROUP BY s.sid,
                 s.status,
                 s.sql_hash_value,
                 u.sqlhash,
                 s.username,
                 u.tablespace,
                 NVL (s.module, s.program),
                    FLOOR (last_call_et / 3600)
                 || ':'
                 || FLOOR (MOD (last_call_et, 3600) / 60)
                 || ':'
                 || MOD (MOD (last_call_et, 3600), 60)
        ORDER BY 7 DESC, 3)
 WHERE ROWNUM < 11;

Tuesday, May 2, 2017

Terminate Runway Process Of Cancel Concurrent Request

Terminate Runway Process Of Cancel Concurrent Request


Even after cancel concurrent request, Resource related concurrent request process may not be released such processes are called RUNWAY processes. So we need to manually kill the processes from database.

Concurrent request id:

Find OS Process id:

In my case: Request_id=32565148

select a.request_id, d.sid, d.serial# ,d.osuser,d.process , c.spid ,d.inst_id from apps.fnd_concurrent_requests a, apps.fnd_concurrent_processes b, gv$process c, gv$session d where a.controlling_manager = b.concurrent_process_id and c.pid = b.oracle_process_id
and b.session_id=d.audsid and a.request_id = 32565148 and a.phase_code = 'R';

Output:

REQUEST_ID SID #SERIAL OSUSER PROCESS SPID INST_ID

32565148 1049 1797 oracle 6880 19922 1


Check runways:

In my case: Process=6880

select s.sid , s.serial# from v$session s , v$process p where s.paddr = p.addr and s.process ='6880';

Output:

SID #SERIAL

1049 1797

Kill runaway process:

alter system kill session '1049,1797';

 or

How to kill long running/hang concurrent request

SELECT ses.sid, ses.serial# from v$session ses, v$process pro WHERE ses.paddr = pro.addr and pro.spid IN (SELECT oracle_process_id FROM fnd_concurrent_requests WHERE request_id =11613265);

You will get spid & pid from above request. Pass your request id in above query. And run below query with sys user.

SQL> ALTER SYSTEM KILL SESSION ' 1114, 8017' IMMEDIATE;

System altered.