关于资源计划的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

相关文章

SQL 注入攻击(SQL Injection)原理、利用方式与防御策略深度解析

《SQL注入攻击(SQLInjection)原理、利用方式与防御策略深度解析》本文将从SQL注入的基本原理、攻击方式、常见利用手法,到企业级防御方案进行全面讲解,以帮助开发者和安全人员更系统地理解... 目录一、前言二、SQL 注入攻击的基本概念三、SQL 注入常见类型分析1. 基于错误回显的注入(Erro

Redis中删除策略的几种实现方式

《Redis中删除策略的几种实现方式》本文详细介绍了Redis的过期键删除策略和内存淘汰策略,过期键删除策略包括定时删除、惰性删除和定期删除,具有一定的参考价值,感兴趣的可以了解一下... 目录前言一、设计背景:为什么需要删除策略?二、第一类:过期键的 3 种核心删除策略1. 定时删除(Timed Dele

前端缓存策略的自解方案全解析

《前端缓存策略的自解方案全解析》缓存从来都是前端的一个痛点,很多前端搞不清楚缓存到底是何物,:本文主要介绍前端缓存的自解方案,文中通过代码介绍的非常详细,需要的朋友可以参考下... 目录一、为什么“清缓存”成了技术圈的梗二、先给缓存“把个脉”:浏览器到底缓存了谁?三、设计思路:把“发版”做成“自愈”四、代码

MySQL设置密码复杂度策略的完整步骤(附代码示例)

《MySQL设置密码复杂度策略的完整步骤(附代码示例)》MySQL密码策略还可能包括密码复杂度的检查,如是否要求密码包含大写字母、小写字母、数字和特殊字符等,:本文主要介绍MySQL设置密码复杂度... 目录前言1. 使用 validate_password 插件1.1 启用 validate_passwo

通过配置nginx访问服务器静态资源的过程

《通过配置nginx访问服务器静态资源的过程》文章介绍了图片存储路径设置、Nginx服务器配置及通过http://192.168.206.170:8007/a.png访问图片的方法,涵盖图片管理与服务... 目录1.图片存储路径2.nginx配置3.访问图片方式总结1.图片存储路径2.nginx配置

Go语言使用sync.Mutex实现资源加锁

《Go语言使用sync.Mutex实现资源加锁》数据共享是一把双刃剑,Go语言为我们提供了sync.Mutex,一种最基础也是最常用的加锁方式,用于保证在任意时刻只有一个goroutine能访问共享... 目录一、什么是 Mutex二、为什么需要加锁三、实战案例:并发安全的计数器1. 未加锁示例(存在竞态)

Python实现网格交易策略的过程

《Python实现网格交易策略的过程》本文讲解Python网格交易策略,利用ccxt获取加密货币数据及backtrader回测,通过设定网格节点,低买高卖获利,适合震荡行情,下面跟我一起看看我们的第一... 网格交易是一种经典的量化交易策略,其核心思想是在价格上下预设多个“网格”,当价格触发特定网格时执行买

SpringBoot中4种数据水平分片策略

《SpringBoot中4种数据水平分片策略》数据水平分片作为一种水平扩展策略,通过将数据分散到多个物理节点上,有效解决了存储容量和性能瓶颈问题,下面小编就来和大家分享4种数据分片策略吧... 目录一、前言二、哈希分片2.1 原理2.2 SpringBoot实现2.3 优缺点分析2.4 适用场景三、范围分片

C++中RAII资源获取即初始化

《C++中RAII资源获取即初始化》RAII通过构造/析构自动管理资源生命周期,确保安全释放,本文就来介绍一下C++中的RAII技术及其应用,具有一定的参考价值,感兴趣的可以了解一下... 目录一、核心原理与机制二、标准库中的RAII实现三、自定义RAII类设计原则四、常见应用场景1. 内存管理2. 文件操

Redis过期删除机制与内存淘汰策略的解析指南

《Redis过期删除机制与内存淘汰策略的解析指南》在使用Redis构建缓存系统时,很多开发者只设置了EXPIRE但却忽略了背后Redis的过期删除机制与内存淘汰策略,下面小编就来和大家详细介绍一下... 目录1、简述2、Redis http://www.chinasem.cn的过期删除策略(Key Expir