1、关于 Oracle E-Business Suite 并发处理机制(Current Processing)2015-01-21 14:05 2352 人阅读 评论(0) 收藏 举报分类:Oracle EBS(48) Oracle EBS Concurrent Program(15 ) 版权声明:转载请以链接形式注明出处2012 年写过一篇关于 Oracle E-Business Suite 并发管理器的文章,回头看之前总结的内容还是比较单薄,很多点没说到,最近在看这块的内容,索性再写一篇稍微完整的文章来。Oracle E-Business Suite 并发处理机制(Current Proces
2、sing)的好处区别于普通功能的处理机制,并发处理机制其实是一个异步处理机制,它把程序放到后台来运行,前台的操作还给用户,允许用户可以继续做其他业务。技术上将,异步处理的好处是降低系统特定时间点的负载,提升系统资源的整体使用率。感受上讲,异步的机制可以有效提升整体的使用感受,减少用户无效的等待时间。什么样的程序可以用并发机制来处理报表类报表是一种非常个性化的东西,一般也是每家公司客户化最多的部分,如果为报表需求都开发不同的列表界面来查询、展示,那么工作量将是巨大的。所以 Oracle 把报表嵌入到并发处理中,通过一些灵活的配置或少量的开发(Reports/BI Publisher Report
3、s)既可以实现用户各类报表的需求.流程类多用于批量事务处理,或是长时间运行的业务,如库存管理器批量处理接口表中的临时事务。并发处理机制(Current Processing)的两类组件并发处理机制(Current Processing)包括两类组件: 并发管理器(Concurrent Managers) 并发请求(Concurrent Requests)像公司中“经理 ”一样,Manager 给 Worker 安排任务,Worker 负责具体的执行。Oracle EBS 中的 Concurrent Managers 就是负责安排工作,Concurrent Requests 负责具体的执行。并发
4、管理器(Concurrent Managers)的分类一家企业一般都有许多的经理,有着高低之分,总裁、总监、经理、主管Oracle EBS 这家企业中,同样也有着许多不同层面上的 Concurrent Manager,有核心的 Concurrent Managers 管理团队(Internal Concurrent Manager、Standard Manager、Conflict Resolution Mananger),也有普通 Concurrent Managers。核心的 Concurrent Managers团队管理下边普通 Concurrent Managers。1.核心的三个并发
5、管理器: Internal Concurrent Manager(内部管理器) The master manager is called the Internal Concurrent Manager (ICM) because it controls the behavior of all of the other managers, and because the ICM is the boss, it must be running before any other managers can be activated. The main functions of the ICM are
6、to start up and shutdown the individual concurrent managers, and reset the other managers after one them has a failure. Standard Manager(标准管理器) Another important master Concurrent Manager is called the Standard Manager (SM). The SM functions to run any reports and batch jobs that have not been defin
7、ed to run in any specific product manager. Examples of specific concurrent managers include the Inventory Manager, CRP Inquiry Manager, and the Receivables Tax Manager.It is not recommended to add specialization rules to the standard manager as it can cause problems. Conflict Resolution Manager(冲突解决
8、管理器) The Conflict Resolution Manager (CRM) functions to check concurrent program definitions for incompatibility rules. However, the ICM can be configured to take over the CRMs job to resolve incompatibilities.小结: Internal Concurrent Manager 是管理器中的 BOSS,总负责人,控制着其他并发管理器的运作。 Standard Mananger 是标准管理器,没
9、有纳入其他特定管理器(Specific Concurrent Managers)的请求,默认就会由标准管理器管理。 Conflict Resolution Manager 主要用于处理日程冲突。2.特定用途的并发管理器(Specific Concurrent Managers ,SCM)除了上边说的三个核心并发管理器,还有众多的特定用途的并发管理器,如库存管理员(Inventory Manager),接收事务处理管理器(Receiving Transaction Manager),MRP Manager,以及用户自定义的并发管理器。并发管理器是如何管理并发请求的并发请求从提交到运行大概的过程是
10、这样的:用户首先提交并发程序运行请求,并发请求会首先放入请求队列中,再由 Internal Concurrent Manager 根据特定的规则找到对应的Concurrent Manager(是 Standard Manager,还是特定的并发管理器)来运行这些请求。下图为一个典型的并发管理器管理并发请求的流程图:并发管理器的定义并发管理器(Concurrent Manager) = 参数(缓存大小、节点设置.) + 特殊规则(Specialization Rules) + 工作班次(Work Shifts) 并发管理器的定义路径:系统管理员职责-并发- 经理-定义,定义过程也可以参考官方文档
11、:Link。以 Inventory Manager 为例,下图为库存管理器的定义界面。Cache Size:这个数字表示并发管理器每次读取多少请求来运行。Enter the number of requests your manager remembers each time it reads which requests to run. For example, if a managers work shift has 1 target process and a cache value of 3, it will read three requests, and try to run th
12、ose 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.Node:这个是并发管理器负载均衡的设置,即 Parallel Concurrent Processing(PCP)。如果服务器是多节点的,那么可以在这里设定并发管理器以哪个节点为主节点运行,哪个节点为辅
13、节点。If you are operating in a parallel concurrent processing environment and you want your manager to operate on a specific node, select the name of the node.The primary node, if available, is the node your concurrent manager operates on. If the primary node or the database instance on it goes down,
14、your concurrent manager migrates to its secondary node. Your concurrent manager migrates back to its primary node when that node becomes available. 特殊规则(Specialization Rules)中设定并发管理要包括/排除的并发请求。工作班次(Work Shifts)中赋予 Inventory Manager 并发管理器的运行班次(Work Shift),运行班次决定了并发管理什么日子、什么时间来运行。流程(Processes):这个字段 Or
15、acle EBS 中文翻译的有问题,官方翻译成“流程” ,我觉翻译成“进程”更好,这个参数表示,对于每个班次, Concurrent Manager 能够调用最大操作系统层的进程数量来并发处理请求。休眠秒(Sleep Seconds):表示班次间的间隔时间。The sleep time for your manager during this work shift. Sleep time is the number of seconds your manager waits between checking the list of pending concurrent requests (co
16、ncurrent requests waiting to be started).Tip: Set the sleep time to be very brief during periods when the number of requests submitted is expected to be high. Oracle EBS 并发管理器性能调优的最佳实践一、调整并发参数-Sleep Seconds-Cache Size-Purging-Gather Schema Statistics二、负载调整-Specialized Concurrent managers三、Output Pos
17、t Processor OPP-Java Heap Size四、Tuning PCP/RAC五、Transaction Managers详情可以参考以下文档:Best Practices for Performance for Concurrent Managers in E-Business Suite (Doc ID 1057802.1) EBS - Technology Area - Webcast Recording E-Business Suite - Concurrent Manager Performance - Best Practices video (Doc ID 1367
18、676.1)Specialized / Dedicated Concurrent Managers (Enhancing Performance)Concurrent manager in Oracle AppsBest Practices for Performance for Concurrent Managers in E-Business SuiteInside the Oracle Concurrent Manager如何判断并发管理器是否正常运行系统管理员职责,Concurrent-Managers-Administer,如果 Target 和 Actual 相等,并且都大于 0,
19、则表示并发管理器为启动和运行状态。 The Target column lists the number of processes that should be running for each manager for this particular workshift. The Actual column lists the number of processes that are actually running. If the Actual column is zero, there are no processes running for this manager. If the Ta
20、rget column is zero, then either a workshift has not been assigned to this manager, or the current workshift does not specify any target processes. If the target column is not zero, then the manager processes have either failed to start up,or gone down. One should check the managers logfile and the
21、ICM logfile. One can also search for OS processes using the ps command.It is possible for the form to be inaccurate, i.e. it may show actual processes even though they are not really running. When in doubt, check for processes at the OS level. 操作系统下如何检查 Concurrent Mananger 的运行情况FNDLIBR 进程是否启动,这个表示 I
22、nternal Concurrent Manager 进程是否运行FNDLIBR:Concurrent Managerps -ef | grep FNDLIBRFNDLIBR process indicates that concurrent mnagers are up and requests are running on the system.Sometimes it happens that even after stopping the concurrent managers by adcmctl.sh stop apps/apps some of the requests migh
23、t continue running. In such cases you can wait for say 5 minutes and then if it dos not stop then you can kill those FNDLIBR processes bykill -9 其他 Application Concurrent ManagerINVLIBR is the process for the following ManagersManager to run Immediate Concurrent Programs defined in INVLIBRoraclebej3
24、01441 $ ps -ef | grep INVLIBRoracle 7111 7004 0 Jul03 ? 00:00:07 INVLIBR oracle 14016 13573 0 19:40 pts/5 00:00:00 grep INVLIBRoraclebej301441 $MRCLIB is the process for the following ManagersMRP Manageroraclebej301441 $ ps -ef | grep MRCLIBoracle 7113 7004 0 Jul03 ? 00:00:06 MRCLIB oracle 14024 135
25、73 0 19:40 pts/5 00:00:00 grep MRCLIBoraclebej301441 $PALIBR is the process for the following ManagersPA Streamline Manageroraclebej301441 $ ps -ef | grep PALIBRoracle 7110 7004 0 Jul03 ? 00:00:06 PALIBR oracle 14003 13573 0 19:39 pts/5 00:00:00 grep PALIBRoraclebej301441 $ 并发管理器/并发请求的日志在哪里?可参考 Meta
26、link Note 105133.1:Concurrent Processing - Concurrent Manager Generic Platform Questions and Answers Where do concurrent request or manager logfiles and output files go? What are the logfile and output file naming conventions?Current Processing Tables也可以参考我之前的一篇文章:http:/ 原厂提供并发相关的脚本 - $FND_TOP/sql S
27、cripts表 说明FND_CONCURRENT_REQUESTS Details of user requests, including status, start date, and completion dateFND_CONCURRENT_PROGRAMS Details of concurrent programs,including execution method, whether the program is constrained, and whether it must be run alone.FND_CONCURRENT_PROCESSES Cross-referenc
28、es between concurrent requests and queues,and a history of concurrent manager processesFND_CONCURRENT_QUEUES Information about each of the concurrent manager queues afimchk.sql - Tells the status of the ICM afcmstat.sql - Lists active manager processes afrqrun.sql - Lists all the running, waiting an
29、d Terminating requests afrqwait.sql - Lists requests that are constrained and waiting for the ICM to release them. afrqscm.sql - Prints log file name of managers that can run a given request. afcmcreq.sql - Prints the log file name of the manager that processed the request afrqstat.sql - Summary of
30、completed concurrent requests grouped by completion status and execution type afimlock.sql - Lists locks that the ICM is waiting to get afcmrrq.sql - Lists managers that currently are running a request运行步骤:1.sqlplus apps/appsinstance2.SQL $FND_TOP/sql/afimchk.sql参考Specialized / Dedicated Concurrent
31、Managers (Enhancing Performance)Concurrent manager in Oracle AppsConcurrent Managers WindowBest Practices for Performance for Concurrent Managers in E-Business Suite (Doc ID 1057802.1)Best Practices for Performance for Concurrent Managers in E-Business SuiteEBS - Technology Area - Webcast Recording
32、E-Business Suite - Concurrent Manager Performance - Best Practices video (Doc ID 1367676.1)Concurrent Manager Questions and Answers Relating to Generic Platform ID 105133.1Basic information about Concurrent Managers (Doc ID 69336.1)Concurrent Processing - Concurrent Manager Generic Platform Questions and Answers (Doc ID 105133.1)