关于资源计划的RATIO 策略

2024-06-04 17:18
文章标签 资源 计划 策略 ratio

本文主要是介绍关于资源计划的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上 Instead of percentages, youspecify numbers corresponding to the ratio of CPU you want to giveto the consumer group. For example, given three consumer groupsGOLD_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

ParameterDescription
PLANName of the resourceplan.
GROUP_OR_SUBPLANName of the consumergroup or subplan.
COMMENTAny comment.
CPU_P1For EMPHASIS(重点), specifies the CPUpercentage at the first level. For RATIO(百分比), specifies the weight of CPUusage. Default is NULL for all CPUparameters.
CPU_P2ForEMPHASIS, specifies CPU percentage at the secondlevel. Not applicable forRATIO.
CPU_P3ForEMPHASIS, specifies CPU percentage at the third level.Not applicable forRATIO.
CPU_P4ForEMPHASIS, specifies CPU percentage at the fourthlevel. Not applicable forRATIO.
CPU_P5ForEMPHASIS, specifies CPU percentage at the fifth level.Not applicable forRATIO.
CPU_P6ForEMPHASIS, specifies CPU percentage at the sixth level.Not applicable forRATIO.
CPU_P7ForEMPHASIS, specifies CPU percentage at the seventhlevel. Not applicable forRATIO.
CPU_P8ForEMPHASIS, specifies CPU percentage at the eighthlevel. Not applicable forRATIO.
ACTIVE_SESS_POOL_P1Specifies maximumnumber of concurrently active sessions for a consumer group.Default is UNLIMITED.
QUEUEING_P1Specified time (inseconds) after which a job in an inactive session queue (waitingfor execution) will time out. Default isUNLIMITED.
PARALLEL_DEGREE_LIMIT_P1Specifies a limit onthe degree of parallelism for any operation. Default isUNLIMITED.
SWITCH_GROUPSpecifies 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_TIMESpecifies 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_ESTIMATEIf 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_TIMESpecifies 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_POOLSets a maximum inkilobytes (K) on the total amount of undo generated by a consumergroup. Default is UNLIMITED.
MAX_IDLE_TIMEIndicates the maximumsession idle time. Default is NULL, which impliesunlimited.
MAX_IDLE_BLOCKER_TIMEIndicates the maximumsession idle time of a blocking session. Default isNULL, which implies unlimited.
SWITCH_TIME_IN_CALLSpecifies 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 策略的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!



http://www.chinasem.cn/article/1030623

相关文章

SpringBoot如何通过Map实现策略模式

《SpringBoot如何通过Map实现策略模式》策略模式是一种行为设计模式,它允许在运行时选择算法的行为,在Spring框架中,我们可以利用@Resource注解和Map集合来优雅地实现策略模式,这... 目录前言底层机制解析Spring的集合类型自动装配@Resource注解的行为实现原理使用直接使用M

Redis 内存淘汰策略深度解析(最新推荐)

《Redis内存淘汰策略深度解析(最新推荐)》本文详细探讨了Redis的内存淘汰策略、实现原理、适用场景及最佳实践,介绍了八种内存淘汰策略,包括noeviction、LRU、LFU、TTL、Rand... 目录一、 内存淘汰策略概述二、内存淘汰策略详解2.1 ​noeviction(不淘汰)​2.2 ​LR

Rust中的Drop特性之解读自动化资源清理的魔法

《Rust中的Drop特性之解读自动化资源清理的魔法》Rust通过Drop特性实现了自动清理机制,确保资源在对象超出作用域时自动释放,避免了手动管理资源时可能出现的内存泄漏或双重释放问题,智能指针如B... 目录自动清理机制:Rust 的析构函数提前释放资源:std::mem::drop android的妙

Deepseek使用指南与提问优化策略方式

《Deepseek使用指南与提问优化策略方式》本文介绍了DeepSeek语义搜索引擎的核心功能、集成方法及优化提问策略,通过自然语言处理和机器学习提供精准搜索结果,适用于智能客服、知识库检索等领域... 目录序言1. DeepSeek 概述2. DeepSeek 的集成与使用2.1 DeepSeek API

Redis的数据过期策略和数据淘汰策略

《Redis的数据过期策略和数据淘汰策略》本文主要介绍了Redis的数据过期策略和数据淘汰策略,文中通过示例代码介绍的非常详细,对大家的学习或者工作具有一定的参考学习价值,需要的朋友们下面随着小编来一... 目录一、数据过期策略1、惰性删除2、定期删除二、数据淘汰策略1、数据淘汰策略概念2、8种数据淘汰策略

SpringBoot中的404错误:原因、影响及解决策略

《SpringBoot中的404错误:原因、影响及解决策略》本文详细介绍了SpringBoot中404错误的出现原因、影响以及处理策略,404错误常见于URL路径错误、控制器配置问题、静态资源配置错误... 目录Spring Boot中的404错误:原因、影响及处理策略404错误的出现原因1. URL路径错

解读静态资源访问static-locations和static-path-pattern

《解读静态资源访问static-locations和static-path-pattern》本文主要介绍了SpringBoot中静态资源的配置和访问方式,包括静态资源的默认前缀、默认地址、目录结构、访... 目录静态资源访问static-locations和static-path-pattern静态资源配置

Redis多种内存淘汰策略及配置技巧分享

《Redis多种内存淘汰策略及配置技巧分享》本文介绍了Redis内存满时的淘汰机制,包括内存淘汰机制的概念,Redis提供的8种淘汰策略(如noeviction、volatile-lru等)及其适用场... 目录前言一、什么是 Redis 的内存淘汰机制?二、Redis 内存淘汰策略1. pythonnoe

Python 中 requests 与 aiohttp 在实际项目中的选择策略详解

《Python中requests与aiohttp在实际项目中的选择策略详解》本文主要介绍了Python爬虫开发中常用的两个库requests和aiohttp的使用方法及其区别,通过实际项目案... 目录一、requests 库二、aiohttp 库三、requests 和 aiohttp 的比较四、requ

Redis过期键删除策略解读

《Redis过期键删除策略解读》Redis通过惰性删除策略和定期删除策略来管理过期键,惰性删除策略在键被访问时检查是否过期并删除,节省CPU开销但可能导致过期键滞留,定期删除策略定期扫描并删除过期键,... 目录1.Redis使用两种不同的策略来删除过期键,分别是惰性删除策略和定期删除策略1.1惰性删除策略