本文主要是介绍关于资源计划的RATIO 策略,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
文档地址:http://docs.oracle.com/cd/B19306_01/server.102/b14231/dbrm.htm#sthref3355
Using the Ratio Policy
the RATIO policy is asingle-level CPU allocation method.--只在LEVEL1上 GOLD_CG, SILVER_CG, andBRONZE_CG, assume that we specify the following plandirectives:
DBMS_RESOURCE_MANAGER.CREATE_PLAN(PLAN => 'service_level_plan',CPU_MTH -> 'RATIO', COMMENT => 'service level plan'); DBMS_RESOURCE_MANAGER.CREATE_PLAN_DIRECTIVE(PLAN => 'service_level_plan',GROUP_OR_SUBPLAN => 'GOLD_CG', COMMENT => 'Gold service level customers',CPU_P1 => 10);DBMS_RESOURCE_MANAGER.CREATE_PLAN_DIRECTIVE(PLAN => 'service_level_plan',GROUP_OR_SUBPLAN => 'SILVER_CG', COMMENT => 'Silver service level customers', CPU_P1 => 5);DBMS_RESOURCE_MANAGER.CREATE_PLAN_DIRECTIVE(PLAN => 'service_level_plan',GROUP_OR_SUBPLAN => 'BRONZE_CG', COMMENT => 'Bonze service level customers',CPU_P1 => 2);DBMS_RESOURCE_MANAGER.CREATE_PLAN_DIRECTIVE(PLAN => 'service_level_plan', GROUP_OR_SUBPLAN => 'OTHER_GROUPS',COMMENT => 'Lowest priority sessions',CPU_P1 => 1);
The ratio of CPU allocation would be 10:5:2:1 for theGOLD_CG, SILVER_CG,BRONZE_CG, and OTHER_GROUPS consumergroups, respectively.
If sessions exists only in the GOLD_CG andSILVER_CG consumer groups, then the ratio of CPUallocation would be 10:5 between the two groups.
注:RATIO策略不能用在CPU第2级别到第8级别上,即level2---level8上,只能用在level1级别上。见下官方文档--指令创建(字体加粗行)。
地址:http://docs.oracle.com/cd/B19306_01/server.102/b14231/dbrm.htm#sthref3355
Specifying Resource Plan Directives
Resource plan directives assign consumer groups to resourceplans and provide the parameters for each resource allocationmethod. When you create a resource plan directive, you can specifythe following parameters
| Parameter | Description |
|---|---|
PLAN | Name of the resourceplan. |
GROUP_OR_SUBPLAN | Name of the consumergroup or subplan. |
COMMENT | Any comment. |
CPU_P1 | For EMPHASIS(重点), specifies the CPUpercentage at the first level. For RATIO(百分比), specifies the weight of CPUusage. Default is NULL for all CPUparameters. |
CPU_P2 | ForEMPHASIS, specifies CPU percentage at the secondlevel. Not applicable forRATIO. |
CPU_P3 | ForEMPHASIS, specifies CPU percentage at the third level.Not applicable forRATIO. |
CPU_P4 | ForEMPHASIS, specifies CPU percentage at the fourthlevel. Not applicable forRATIO. |
CPU_P5 | ForEMPHASIS, specifies CPU percentage at the fifth level.Not applicable forRATIO. |
CPU_P6 | ForEMPHASIS, specifies CPU percentage at the sixth level.Not applicable forRATIO. |
CPU_P7 | ForEMPHASIS, specifies CPU percentage at the seventhlevel. Not applicable forRATIO. |
CPU_P8 | ForEMPHASIS, specifies CPU percentage at the eighthlevel. Not applicable forRATIO. |
ACTIVE_SESS_POOL_P1 | Specifies maximumnumber of concurrently active sessions for a consumer group.Default is UNLIMITED. |
QUEUEING_P1 | Specified time (inseconds) after which a job in an inactive session queue (waitingfor execution) will time out. Default isUNLIMITED. |
PARALLEL_DEGREE_LIMIT_P1 | Specifies a limit onthe degree of parallelism for any operation. Default isUNLIMITED. |
SWITCH_GROUP | Specifies consumergroup to which this session is switched if other switch criteriaare met. If the group name is 'CANCEL_SQL', then thecurrent call will be canceled when other switch criteria are met.If the group name is 'KILL_SESSION', then the sessionwill be killed when other switch criteria are met. Default isNULL. |
SWITCH_TIME | Specifies time (inseconds) that a session can execute before an action is taken.Default in UNLIMITED. You cannot specify bothSWITCH_TIME and SWITCH_TIME_IN_CALL. |
SWITCH_ESTIMATE | If TRUE,tells the database to use its execution time estimate toautomatically switch the consumer group of an operation prior tobeginning its execution. Default is FALSE. |
MAX_EST_EXEC_TIME | Specifies the maximumexecution time (in seconds) allowed for a session. If the optimizerestimates that an operation will take longer thanMAX_EST_EXEC_TIME, the operation is not started andORA-07455 is issued. If the optimizer does not providean estimate, this directive has no effect. Default isUNLIMITED. |
UNDO_POOL | Sets a maximum inkilobytes (K) on the total amount of undo generated by a consumergroup. Default is UNLIMITED. |
MAX_IDLE_TIME | Indicates the maximumsession idle time. Default is NULL, which impliesunlimited. |
MAX_IDLE_BLOCKER_TIME | Indicates the maximumsession idle time of a blocking session. Default isNULL, which implies unlimited. |
SWITCH_TIME_IN_CALL | Specifies the time(in seconds) that a session can execute before an action is taken.At the end of the call, the consumer group of the session isrestored to its original consumer group. Default isUNLIMITED. You cannot specify bothSWITCH_TIME_IN_CALL and SWITCH_TIME |
这篇关于关于资源计划的RATIO 策略的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!