How to Increase CSS Misscount in single instance ASM installations [ID 729878.1]

How to Increase CSS Misscount in single instance ASM installations [ID 729878.1]

 修改时间 10-MAR-2011     类型 HOWTO     状态 MODERATED 

In this Document
  Goal
  Solution
  References


Platforms: 1-914CU;

This document is being delivered to you via Oracle Support's Rapid Visibility (RaV) process and therefore has not been subject to an independent technical review.

Applies to:

Oracle Server - Enterprise Edition - Version: 10.1.0.2 to 10.2.0.1 - Release: 10.1 to 10.2
Information in this document applies to any platform.
***Checked for relevance on 10-Mar-2011***

Goal

CSS is an essential component of ASM installations as it is required to syncrohize ASM resources and ASM crashes in the absence of CSS component.

When there is any OS resource saturation (ie, CPU, memory shortage, etc), CSS sometimes could not obtain the OS resource and thus determines there is a problem and abort itself. A solution for this issue is to add more CPU/memory resources to the server or to move resource intensive applications (grid control, etc.) and some databases to another server to consume less resources on this server.

Another workaround is to bump up the CSS misscount. This will give the OS more time to recover before css eviction. The purpose of this note is to document the steps needed to modify the CSS misscount in single instance ASM installations.

Those steps should NOT be followed for RAC installations. Please follow Note 284752.1 to see the steps needed to modify the CSS misscount in 10g RAC environment. Please also review Note 294430.1 to understand the implications before editing misscount settings.

Solution

Steps to increase CSS process miscount to 300 (5 minutes).

1) Shut down all ASM instances and DB instances depending on ASM.

2) Run $ORACLE_HOME/bin/localconfig delete to remove the existing CSS configuration.

3) Edit the $ORACLE_HOME/bin/localconfig file and look for the CLSCFG invocation, it should look something like this:

$CLSCFG -local -o $CH -l "AMERICAN_AMERICA.WE8ISO8859P1"

At the end of the line, add trace and misscount params as follows:

#Create CSS keys only if needed to
$CLSCFG -local -o $CH -l "AMERICAN_AMERICA.WE8ISO8859P1" -misscount 300

4) Re-add CSS by running $ORACLE_HOME/bin/localconfig add.

5) Restart ASM and DB instances.

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/756652/viewspace-712407/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/756652/viewspace-712407/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
以下是基于提供的代码框架,完成LRU算法的完整代码: ```c++ #include <iostream> #include <cstring> using namespace std; void OutputPageNumofRef(int *PageNumofRef, int PageNumRefCount) { cout << "页面引用串号为:"; for (int i = 0; i < PageNumRefCount; i++) { cout << PageNumofRef[i] << " "; } cout << endl; } void OutputBlockofMemory(int *BlockofMemory, int BlockCount, int pos, int val) { if (pos != -1) { cout << "页面" << BlockofMemory[pos] << "被页面" << val << "替换" << endl; } cout << "内存块状态为:"; for (int i = 0; i < BlockCount; i++) { cout << BlockofMemory[i] << " "; } cout << endl; } bool PageInBlockofMemory(int pageNum, int *BlockofMemory, int BlockCount) { for (int i = 0; i < BlockCount; i++) { if (BlockofMemory[i] == pageNum) { return true; } } return false; } void Lru(int *BlockofMemory, int *PageNumofRef, int BlockCount, int PageNumRefCount) { int i; int MissCount = 0; int *lastUsedTime = new int[BlockCount]; memset(lastUsedTime, -1, sizeof(int) * BlockCount); // 初始化为-1,表示从未使用过 cout << "************最近最久未使用页面置换算法:************" << endl; OutputPageNumofRef(PageNumofRef, PageNumRefCount); for (i = 0; i < PageNumRefCount; i++) { if (!PageInBlockofMemory(PageNumofRef[i], BlockofMemory, BlockCount)) { // 页不在内存中 MissCount++; int minTime = 0x3f3f3f3f; // 初始化为一个很大的数 int pos = -1; for (int j = 0; j < BlockCount; j++) { if (lastUsedTime[j] < minTime) { minTime = lastUsedTime[j]; pos = j; } } BlockofMemory[pos] = PageNumofRef[i]; // 将页面替换到空闲块中 lastUsedTime[pos] = i; // 更新该页面的使用时间 OutputBlockofMemory(BlockofMemory, BlockCount, pos, PageNumofRef[i]); } else { for (int j = 0; j < BlockCount; j++) { if (BlockofMemory[j] == PageNumofRef[i]) { lastUsedTime[j] = i; // 更新该页面的使用时间 break; } } OutputBlockofMemory(BlockofMemory, BlockCount, -1, PageNumofRef[i]); } } delete[] lastUsedTime; cout << "缺页次数为:" << MissCount << endl; cout << "LRU缺页率为:" << (float)MissCount / PageNumRefCount << endl; } int main() { int BlockCount = 3; int PageNumRefCount = 20; int BlockofMemory[3] = {-1, -1, -1}; int PageNumofRef[20] = {1, 2, 3, 4, 1, 2, 5, 1, 2, 3, 4, 5, 4, 2, 3, 1, 4, 3, 2, 5}; Lru(BlockofMemory, PageNumofRef, BlockCount, PageNumRefCount); return 0; } ``` LRU算法的核心思想是,选择最近最久未使用的页面进行淘汰。以上代码实现了一个LRU页面置换算法。在每次缺页时,遍历内存块中的所有页面,找到最久未使用的页面,将其替换为当前需要访问的页面。为了实现该算法,需要记录每个页面最近一次被访问的时间,可以使用一个数组来存储。在每次访问页面时,更新该页面的时间戳。当需要替换页面时,遍历所有页面的时间戳,选择最小的一个页面进行淘汰。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值