楼主: lunar2000

[精华] 关于数据库的调整(不只是调优)问题

[复制链接]
论坛徽章:
3
ITPUB元老
日期:2005-02-28 12:57:00授权会员
日期:2005-10-30 17:05:33会员2006贡献徽章
日期:2006-04-17 13:46:34
51#
发表于 2002-9-25 10:22 | 只看该作者
db_writer_processes = 1
db_file_multiblock_read_count = 1
我觉得也不太理解
为什么呀

CHECKPOINT
我想是为了减少chechpoint吧


最初由 ggf0626 发布
[B]log_checkpoint_timeout = 0
log_checkpoint_interval = 0
fast_start_io_target = 0
log_checkpoints_to_alert = TRUE
CHECKPOINT应该只受LOGFILE SWITCH的影响,这种系统一般多久做一次CHECKPOINT?

db_writer_processes = 1
db_file_multiblock_read_count = 1
我觉得最慢的肯定是磁盘I/O,为什么这样设啊 [/B]

使用道具 举报

回复
论坛徽章:
4
ITPUB元老
日期:2005-02-28 12:57:00授权会员
日期:2005-10-30 17:05:33会员2006贡献徽章
日期:2006-04-17 13:46:34ITPUB技术丛书作者
日期:2010-09-26 15:24:56
52#
 楼主| 发表于 2002-9-25 11:00 | 只看该作者
我们缺少的设置:
db_files = 748
timed_statistics = FALSE--------我们的timed_statistics = True
db_writer_processes = 1
db_block_lru_latches = 18
cpu_count = 4

db_block_buffers = 5491744 # 10.47gig--------我们的db_block_buffers = 100108
buffer_pool_recycle = (buffers:13180,lru_latches:5)
buffer_pool_keep =(buffers:3844220,lru_latches:5)

log_buffer = 8192000-------你们的怎么这么大?我们的目前log_buffer = 8192000,我打算修改为3M
enqueue_resources = 600
_db_writer_max_writes = 256 # 640
_db_writer_chunk_writes = 64 # 100
db_block_max_dirty_target = 0

fast_start_io_target = 0
shared_pool_size = 200000000--------和我们的一致
shared_pool_reserved_size = 2500000
cursor_space_for_time = TRUE
max_dump_file_size = 900000
db_block_checking = FALSE
replication_dependency_tracking = FALSE
transaction_auditing = FALSE
recovery_parallelism = 80
parallel_max_servers = 80
dml_locks = 300----------------------?????

hash_join_enabled = FALSE
log_archive_start = FALSE------你们执行手工归档么?我们的log_archive_start = True
log_checkpoint_timeout = 0------我们的log_checkpoint_interval = 10000
log_checkpoint_interval = 0------我们的log_checkpoint_timeout = 1800
log_checkpoints_to_alert = TRUE

sort_area_size = 1048576-------我们的是sort_area_size = 65536
hash_area_size = 1048576
hash_multiblock_io_count = 1
open_cursors = 140------我们的是open_cursors = 300
processes = 140
db_file_multiblock_read_count = 1
_db_file_noncontig_mblock_read_count=1
distributed_transactions = 0-------我们的是distributed_transactions = 10
max_rollback_segments = 140
lm_ress = 1431024
lm_locks = 2660000-------------为什么你们设置两次?
gc_releasable_locks = 5000
gc_rollback_locks = "0-1631=50EACH"
gc_files_to_locks = "1=3000EACH:" # system


java_pool_size = 4K------是不是太小了?我们的是java_pool_size = 20M(大么?)
mts_max_servers = 0
_db_aging_stay_count = 1
_spin_count = 3000
_lm_rcv_buffer_size = 1048576
_interconnect_checksum = FALSE
_lm_cache_res_cleanup = 100



你们的_ipc_net = lo0        是做什么的呀?
你们没有设置large_pool_size么?
我们的large_pool_size = 614400,是不是不用MTS,RMAN就可以不设置?



我们的有疑问的设置:
rollback_segments = (rbs2_1,rbs2_2)我们的回滚端是不是太小了?不过,我们的是OLTP,
而且几乎是做个就提交。

我注意到我们有这个设置,你们没有
resource_manager_plan = system_plan

还有些疑问,我再琢磨一下,再来请教

使用道具 举报

回复
论坛徽章:
3
ITPUB元老
日期:2005-02-28 12:57:00授权会员
日期:2005-10-30 17:05:33会员2006贡献徽章
日期:2006-04-17 13:46:34
53#
发表于 2002-9-25 11:11 | 只看该作者
rollback_segments = (rbs2_1,rbs2_2)
只有两个?太少了
肯定会有竞争的

resource_manager_plan = system_plan
觉得没有什么大用.
是和resource分陪有关系的

我觉得cluster的配置是基于一个不用archive的系统
最大限度的减少IO

使用道具 举报

回复
论坛徽章:
21
ITPUB元老
日期:2005-02-28 12:57:002012新春纪念徽章
日期:2012-02-13 15:11:182012新春纪念徽章
日期:2012-02-13 15:11:182012新春纪念徽章
日期:2012-02-13 15:11:182012新春纪念徽章
日期:2012-02-13 15:11:18马上有车
日期:2014-02-19 11:55:14马上有房
日期:2014-02-19 11:55:14马上有钱
日期:2014-02-19 11:55:14马上有对象
日期:2014-02-19 11:55:142012新春纪念徽章
日期:2012-02-13 15:11:18
54#
发表于 2002-9-25 11:20 | 只看该作者
最初由 Cluster 发布
[B]You answer yourself questions already.

parallel_max_servers = 80 for less indexes usage and increase the CPU usage
log_buffer for reduce the LGWR activity.
If the system never down, do you think I should worry about the log file sync? [/B]

不太理解。
1。从别的配置参数来看,希望是全部走Index的意思。比如dbfile_multiblock_read_count, hash_join 等。
但是如果不是选择Index,那么没有必要把那些参数这么设置。
2。log file sync是Commit时候发生的事件,不是log file swich时候。所以log buffer太大,影响COmmit的速度,尤其是繁忙的oltp系统。这一点我比较有体会。把log buffer从2M降低到256K,log file sync从38%的系统wait event降低到25%.
请指教

使用道具 举报

回复
论坛徽章:
4
ITPUB元老
日期:2005-02-28 12:57:00授权会员
日期:2005-10-30 17:05:33会员2006贡献徽章
日期:2006-04-17 13:46:34ITPUB技术丛书作者
日期:2010-09-26 15:24:56
55#
 楼主| 发表于 2002-9-25 12:56 | 只看该作者
希望讨教一些认识和经验:

db_files = 748
对于db_files,是说database可以打开的最多的文件的数目。确省值依OS不同而不同。
这个值的范围:最小值当前数据库中包含的所有的数据文件的个数,其最大值依赖于不同的OS.
文档中指出在Oracle Parallel Server中,必须设置这个参数,并且多个实例必须有同样的设置。
那么你们设置为db_files = 748,想知道你们这么考虑的原因(我希望能参考)


timed_statistics = FALSE--------我们的timed_statistics = True
这个参数好像是设置是否允许系统收集和时间有关的信息,比如在V$SYSSTATS,$SESSTSTS中,或者设置跟踪时需要。
确省值是False。这个到是无所谓了,呵呵(如果不用到那些功能,不过,我现在需要tuning数据库,那么我也许还是设置为True比较好,对么?)

db_writer_processes = 1
确省值是1。它初始化了DBWR 的个数.
如果调整了这个参数,就绪要调整db_block_lru_latches,以便让每一个DBWR有相同的LRU buffer lists。

db_block_lru_latches = 18
确省值是CPU_COUNT/2(通常,这个值足够了)。文档上说,它指出了LRU latch的最大数量。
设置它时,一般设置它的值等于CPU的个数或者CPU个数的倍数。
而且,只有当查询select misses from V$LATCH;时,misses的值大于3%才考虑增加它的值,对么?
所以,很希望知道你们设置为db_block_lru_latches = 18的考虑


cpu_count = 4
这个不是oracle自己设置的么?你们为什么需要手工设置呀?
当latch contention比较严重的时候,需要将LOG_SIMULTANEOUS_COPIES设置为cpu_count的两倍,对么?

使用道具 举报

回复
论坛徽章:
1
授权会员
日期:2005-10-30 17:05:33
56#
发表于 2002-9-25 14:08 | 只看该作者

Re: 关于数据库的调整(不只是调优)问题

最初由 lunar2000 发布
曾有朋友这样说:
I've the same error message as you before, it was caused by the binary files were not linked properly. I solved it as below:

1) go to $ORACLE_HOME/rdbms/lib
2) make -f ins_rdbms ops_on
3) relink -all

我不太确定我们的是不是这个问题,我如何确定呢?
希望集思广益,收集一些线索,不胜感谢。 [/B]


lunar,
you told me that you have this error

ORA-29702: error occurred in Cluster Group Service operation

Our 8i OPS has this error before,
we solved by above procedure I told you.

使用道具 举报

回复
论坛徽章:
4
ITPUB元老
日期:2005-02-28 12:57:00授权会员
日期:2005-10-30 17:05:33会员2006贡献徽章
日期:2006-04-17 13:46:34ITPUB技术丛书作者
日期:2010-09-26 15:24:56
57#
 楼主| 发表于 2002-9-25 14:10 | 只看该作者
db_block_buffers = 5491744 # 10.47gig--------我们的db_block_buffers = 100108
buffer_pool_recycle = (buffers:13180,lru_latches:5)
buffer_pool_keep =(buffers:3844220,lru_latches:5)

log_buffer = 8192000------
-你们的怎么这么大?我们的目前log_buffer = 8192000,我打算修改为3M
我仍然感觉超过3M的log buffer会浪费,因为它的使用每超过1M或者每隔写满1/3就会触发LGWR
这样看起来,超过3M就完全没必要了,是么?

enqueue_resources = 600
它设置了能够被锁管理器并发的锁的资源的数目。通常这个值也足够用了。
文档上说,一般只有在报enqueues are exhausted错的时候,才会设置这个值,那么你们这么显示的设置是出于什么靠呀?

_db_writer_max_writes = 256 # 640
_db_writer_chunk_writes = 64 # 100
上面这两个隐含参数是做什么的,可以讲解一下么?

db_block_max_dirty_target = 0

通常说,下面三个是改善数据库的性能的参数,对于你们的设置存在一些疑问:
log_checkpoint_timeout = 0------你们禁用了基于时间的检查点,对么?对于这个你们如何考虑的呢。我们的log_checkpoint_interval = 10000
log_checkpoint_interval = 0------这样的设置可能导致非常频繁地启动检查点对么?我们的log_checkpoint_timeout = 1800
fast_start_io_target = 0-------看起来,你们是不考虑实例失败恢复的性能,是吧?
这三个都设置为0,就是说不考虑LGWR写OS BLOCKS(物理I/O)与检查点之间的影响,是么?
我们的系统也是OLTP,每秒钟大约有100个并发呼叫,每个呼叫2个select,我该如何考虑呢?

log_checkpoints_to_alert = TRUE
在alert.log中记录检查点,这个参数我也应该在我们的init.ora中,呵呵,用来观察和调节redo log buffer的大小。


shared_pool_size = 200000000--------和我们的一致
shared_pool_reserved_size = 2500000
这个参数指出了在share pool中预留出来的连续的大内存块的大小。确省值是shared_pool_size的5%。
看起来,你们目前设置的是1.25%,那么具体如何考虑它的大小呢?
我们发生了4031的错误,我打算将shared_pool_reserved_size设置为shared_pool_size的10%,合适么?
如果不合适,该如何考虑具体的大小?

cursor_space_for_time = TRUE
确省值为False。为了保存cursor,采用用空间换取时间的考虑方法,这样可以加快SQL的执行速度。
我在考虑,是否我们也可以这样设置呢?


max_dump_file_size = 900000
指定跟踪文件的尺寸,这个我想我们暂时就不管了,先解决主要问题吧,呵呵。


db_block_checking = FALSE-------这是确省值。

replication_dependency_tracking = FALSE
确省值是True。不太理解这个参数,该如何设置希望指点。

transaction_auditing = FALSE
确省值是True。文档上说,如果transaction_auditing = FALSE,就没有redo 产生对么?
你们这个又是如何考虑的,希望指点。

使用道具 举报

回复
论坛徽章:
4
ITPUB元老
日期:2005-02-28 12:57:00授权会员
日期:2005-10-30 17:05:33会员2006贡献徽章
日期:2006-04-17 13:46:342009新春纪念徽章
日期:2009-01-04 14:52:28
58#
发表于 2002-9-25 14:13 | 只看该作者
不懂,跟一下

使用道具 举报

回复
论坛徽章:
4
ITPUB元老
日期:2005-02-28 12:57:00授权会员
日期:2005-10-30 17:05:33会员2006贡献徽章
日期:2006-04-17 13:46:34ITPUB技术丛书作者
日期:2010-09-26 15:24:56
59#
 楼主| 发表于 2002-9-25 14:14 | 只看该作者

Re: Re: 关于数据库的调整(不只是调优)问题

最初由 icemanh 发布
[B]

lunar,
you told me that you have this error

ORA-29702: error occurred in Cluster Group Service operation

Our 8i OPS has this error before,
we solved by above procedure I told you. [/B]


噢,原来是解决27902的,呵呵
我搞错了,以为是解决4031的,不好意思,呵呵
好,等我忙完了泰国的4031,再来考虑这个29702,到时候再仔细请教吧,因为我担心错误的起因会不同,谢谢你,呵呵。

使用道具 举报

回复
论坛徽章:
3
ITPUB元老
日期:2005-02-28 12:57:00授权会员
日期:2005-10-30 17:05:33会员2006贡献徽章
日期:2006-04-17 13:46:34
60#
发表于 2002-9-25 14:36 | 只看该作者
_db_writer_max_writes = 256 # 640
我找到一篇doc
_db_writer_chunk_writes = 64 # 100
没有看到说明

Oracle Performance Tuning Tips
Use asynchronous I/O
The default value of the disk_asynch_io parameter is TRUE. This means that Oracle will attempt to use asynchronous I/O if possible. Asynchronous I/O is important to DBWn to allow it to make effective use of the hardware's I/O bandwidth. LGWR also needs asynchronous I/O to parallelize writes to multiple log file members and to overlap redo writes when transactions are committed in quick succession. Asynchronous I/O is important to foreground processes so that they can prefetch blocks for full table scans and fast full index scans before they are required. Foreground processes also use asynchronous I/O for direct reads and direct writes, normally to temporary segments. This enables the I/O to be done in parallel with other, CPU intensive work such as comparisons for sorts and hash joins.
The availability of asynchronous I/O to log files and tempfiles is much less problematic than the availability of asynchronous I/O to datafiles. This is because log files and tempfiles do not need to be backed up. So there is no impediment to using raw log files and tempfiles, and several other compelling reason for doing so (see here and here). As a consequence of using raw log files and tempfiles, the most efficient form of asynchronous I/O, namely kernelized asynchronous I/O, is almost always available for I/O to these files. However, the availability of asynchronous I/O to datafiles is a more taxing question.

The availability of asynchronous I/O to datafiles affects DBWn's ability to make use of the hardware I/O bandwidth, and it affects the the prefetching of data for sequential reads by foregrounds. Prefetching has an obvious performance impact that is particularly important in environments like data warehouses. However, because DBWn does its work in the background, the benefit of asynchronous I/O for DBWn is better scalability, not better performance as such. That is, asynchronous I/O allows DBWn to work more efficiently and thus manage higher workloads without foreground processes needing to wait for its services.

If the datafiles are file system based, Oracle's attempts to use asynchronous I/O to the datafiles will result in the use of threaded asynchronous I/O -- but only if the operating system supports threaded asynchronous I/O to file system files, and assuming that the values of the disk_asynch_io and _filesystemio_options parameters have not been changed from their defaults to disable asynchronous I/O. The performance of threaded asynchronous I/O to datafiles is acceptable in many environments. It enables asynchronous prefetching, and does not result in a proliferation of I/O threads unless the DBWn workload is moderately intensive.

If DBWn workload is an issue, the maximum number of asynchronous I/O threads used by the DBWn processes can be limited with the _db_writer_max_writes parameter. Alternatively, asynchronous I/O can be disabled for DBWn only using the _dbwr_async_io parameter, and explicit I/O slave processes can be configured instead using the dbwr_io_slaves parameter. These options are preferable to disabling asynchronous I/O entirely using disk_asynch_io or just threaded asynchronous I/O using _filesystemio_options, because the ability to use asynchronous I/O against raw files and for asynchronous prefetching from filesystem based datafiles is preserved. Unfortunately, the physical write bandwidth may not be fully used if DBWn's write bandwidth has to be constrained.

Of course, for performance critical databases constraining the write bandwidth in this way to avoid wasting CPU time is unacceptable. Instead, raw datafiles or Quick I/O must be used to enable the use of efficient kernelized asynchronous I/O.

使用道具 举报

回复

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

本版积分规则 发表回复

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