12
返回列表 发新帖
楼主: oracle-plus

請問在操作系統只有一個CPU的情況下,DB_WRITER_PROCESSES>1還有意義嗎?

[复制链接]
论坛徽章:
2
授权会员
日期:2005-10-30 17:05:33会员2006贡献徽章
日期:2006-04-17 13:46:34
11#
发表于 2004-12-2 08:15 | 只看该作者
关注。。。。。。。。。。。

使用道具 举报

回复
论坛徽章:
86
2015中国数据库技术大会纪念徽章
日期:2015-04-24 16:04:24马上有车
日期:2014-02-19 11:55:14马上有车
日期:2014-02-18 16:41:112014年新春福章
日期:2014-02-18 16:41:11优秀写手
日期:2013-12-18 09:29:11日产
日期:2013-10-17 08:44:39马自达
日期:2013-08-26 16:28:022013年新春福章
日期:2013-02-25 14:51:24ITPUB 11周年纪念徽章
日期:2012-10-23 16:55:51马上有房
日期:2014-02-19 11:55:14
12#
发表于 2004-12-2 08:34 | 只看该作者
应该是没有意义的。

但是,对于多线程CPU,又是如何呢?哪为老大来讲解一下。

使用道具 举报

回复
论坛徽章:
2
授权会员
日期:2005-10-30 17:05:33会员2006贡献徽章
日期:2006-04-17 13:46:34
13#
 楼主| 发表于 2004-12-2 08:51 | 只看该作者
對啊!我一直都搞不清楚這些參數和CPU的關系。

使用道具 举报

回复
论坛徽章:
2
授权会员
日期:2005-10-30 17:05:33会员2006贡献徽章
日期:2006-04-17 13:46:34
14#
 楼主| 发表于 2004-12-2 12:24 | 只看该作者
到底有沒有一個准確的答案或者權威的說法呢?

使用道具 举报

回复
论坛徽章:
1
授权会员
日期:2005-10-30 17:05:33
15#
发表于 2004-12-2 12:33 | 只看该作者
你自己做一下试验,看看oracle是否接受db_writer_processes>1.
show parameter db_writer_processes

使用道具 举报

回复
论坛徽章:
168
马上加薪
日期:2014-02-19 11:55:142012新春纪念徽章
日期:2012-02-13 15:10:582012新春纪念徽章
日期:2012-01-04 11:49:54蜘蛛蛋
日期:2011-12-05 16:08:56ITPUB十周年纪念徽章
日期:2011-11-01 16:19:41设计板块每日发贴之星
日期:2011-07-22 01:01:02ITPUB官方微博粉丝徽章
日期:2011-06-30 12:30:16管理团队成员
日期:2011-05-07 01:45:082011新春纪念徽章
日期:2011-01-25 15:42:562011新春纪念徽章
日期:2011-01-25 15:42:33
16#
发表于 2004-12-2 13:10 | 只看该作者
参考:

DBWR_IO_SLAVES
==============

In Oracle7, the multiple DBWR processes were simple slave processes; i.e.,  
unable to perform async I/O calls.  In Oracle80, true asynchronous I/O is  
provided to the slave processes, if available.  This feature is implemented  
via the init.ora parameter dbwr_io_slaves.  With dbwr_io_slaves, there is still  
a master DBWR process and its slave processes.  This feature is very similar to  
the db_writers in Oracle7, except the IO slaves are now capable of asynchronous  
I/O on systems that provide native async I/O, thus allowing for much better  
throughput as slaves are not blocked after the I/O call.
I/O slaves for DBWR are allocated immediately following database open when the  
first I/O request is made.   


DB_WRITER_PROCESSES
===================

Multiple database writers is implemented via the init.ora parameter  
db_writer_processes.  This feature was enabled in Oracle8.0.4, and allows true  
database writers; i.e., no master-slave relationship.  With Oracle8  
db_writer_processes, each writer process is assigned to a LRU latch set.  Thus,  
it is recommended to set db_writer_processes equal to the number of LRU latches  
(db_block_lru_latches) and not exceed the number of CPUs on the system.  For  
example, if db_writer_processes was set to four  and db_lru_latches=4, then  
each writer process will manage its corresponding set.  The parameter  
db_block_lru_latches has been made hidden in oracle 9i.   


Things to know and watch out for....
====================================

-- 1.  Multiple DBWRs and DBWR IO slaves cannot coexist.  If both are enabled,  
then the following error message is produced: ksdwra("Cannot start multiple  
dbwrs when using I/O slaves.\n";  Moreover, if both parameters are enabled,  
dbwr_io_slaves will take precedence.

-- 2.  The number of DBWRs cannot exceed the number of db_block_lru_latches.   
If it does, then the number of DBWRs will be minimized to equal the number  
of db_block_lru_latches and the following message is produced in the  
alert.log during startup:  
("Cannot start more dbwrs than db_block_lru_latches.\n";
However, the number of lru latches can exceed the number of DBWRs.  

-- 3. dbwr_io_slaves are not restricted to the db_block_lru_latches;  
i.e., dbwr_io_slaves >= db_block_lru_latches.


Should you use DB_WRITER_PROCESSES or DBWR_IO_SLAVES?
=====================================================

Although both implementations of DBWR processes may be beneficial, the general  
rule, on which option to use, depends on the following :   
1) the amount write activity;  
2) the number of CPUs (the number of CPUs is also indirectly related to the  
    number LRU latch sets);  
3) the size of the buffer cache;  
4) the availability of asynchronous  I/O (from the OS).

There is NOT a definite answer to this question but here are some considerations
to have when making your choice.  Please note that it is recommended to try  
BOTH (not simultaneously) against your system to determine which best fits the  
environment.  

-- If the buffer cache is very large (100,000 buffers and up) and the  
application is write intensive, then db_writer_processes may be beneficial.  
Note, the number of writer processes should not exceed the number of CPUs.

-- If the application is not very write intensive (or even a DSS system) and  
async I/O is available, then consider a single DBWR writer process;   
If async I/O is not available then use dbwr_io_slaves.

-- If the system is a uniprocessor(1 CPU) then implement may want to use  
dbwr_io_slaves.

Implementing db_io_slaves or db_writer_processes comes with some overhead cost.  
Multiple writer processes and IO slaves are advanced features, meant for high  
IO throughput.   Implement this feature only if the database environment  
requires such IO throughput.  In some cases, it may be acceptable to disable  
I/O slaves and run with a single DBWR process.


Other Ways to Tune DBWR Processes
=================================

It can be easily seen that reducing buffer operations will be a direct benefit  
to DBWR and also help overall database performance.   Buffer operations can be  
reduced by:  
1) using dedicated temporary tablespaces  
2) direct sort reads
3) direct Sqlloads
4) performing direct exports.   
  
In addition, keeping a high buffer cache hit ratio will be extremely beneficial  
not only to the response time of applications, but the DBWR as well.

使用道具 举报

回复
论坛徽章:
2
授权会员
日期:2005-10-30 17:05:33会员2006贡献徽章
日期:2006-04-17 13:46:34
17#
 楼主| 发表于 2004-12-4 23:29 | 只看该作者
非常清楚了,谢谢!

使用道具 举报

回复
论坛徽章:
1
授权会员
日期:2005-10-30 17:05:33
18#
发表于 2004-12-5 17:12 | 只看该作者
单个cpu配置DBWR_IO_SLAVES这个参数才有意义

使用道具 举报

回复

您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

TOP技术积分榜 社区积分榜 徽章 团队 统计 知识索引树 积分竞拍 文本模式 帮助
  ITPUB首页 | ITPUB论坛 | 数据库技术 | 企业信息化 | 开发技术 | 微软技术 | 软件工程与项目管理 | IBM技术园地 | 行业纵向讨论 | IT招聘 | IT文档
  ChinaUnix | ChinaUnix博客 | ChinaUnix论坛
CopyRight 1999-2011 itpub.net All Right Reserved. 北京盛拓优讯信息技术有限公司版权所有 联系我们 未成年人举报专区 
京ICP备16024965号-8  北京市公安局海淀分局网监中心备案编号:11010802021510 广播电视节目制作经营许可证:编号(京)字第1149号
  
快速回复 返回顶部 返回列表