Database Configuration and I/O Issues(1)

Database Configuration and I/O Issues.
数据库配置与I/O相关事项。
Objectvies:


1.List the advantages of distributing different Oracle file types.
2.Diagnose tablespace usage problems.
3.List reasons for partitioning data in tablespaces
4.Describe how checkpoints work
5.Monitor and tune checkpoints.
6.Monitor and tune redo logs.


Oracle I/O Architecture
1.File system
Network attached storage(NAS)
Storage area network(SAN)
Direct attached storage
2.Raw partitions
3.Automatic Storage Management(ASM)


以后主要是文件系统与ASM。


Oracle Processes and Files.
Proceess Oracle file I/O
         Datafiles    Log    Archive     Control
CKPT     R/W                             R/W
DBWn     W
LGWR                  W                  R/W
ARCn                  R      W           R/W
SERVER   R/W          R      W           R/W


Performance Guidelines
1.Keep disk I/O to a minimum.
2.Spread your disk load across disk devices and controllers.负载均衡
3.Use temporary tablespaces where appropriate.


Distributing Files
Separate data files and redo log files.
将数据文件与redo文件分开磁盘存放。redo文件应该放在最快的磁盘上,并且这个磁盘不应该再有别的I/O操作。
Stripe table data.
条带化表数据。
Reduce disk I/O unrelated to the database.
减少与数据库不相关的I/O,或者做备份那些也应该在空闲的时候。


数据文件可以放在不同的目录,每个目录挂载到不同的磁盘,那就可以做到负载均衡。表与对应的索引放在不同的磁盘上,更是一个通常的做法。


Tablespace Usage
system表空间是数据库的心脏,因为他存了很多数据字典,不要放用户数据。
创立独立的表空间,而不要用system表空间里面的undo segment.undo表空间越大越好,在不挤占其他数据文件空间的前提下。很大的对象用专门的表空间去存储。每个用户创建自己专用的临时表空间。


Tools for I/O Statistics
v$filestat:在文件级别对这个文件的单块或多块I/O的次数。
select phyrds,phywrts,d.name
from v$datafile d,v$filestat f
where d.file#=f.file#
order by d.name;
一目了然,把每个文件的读写次数列出来。
select d.tablespace_name,TABLESPACE,d.file_name,f.phyrds,f.phywrts
FROM v$filestat f,dba_data_files d
where f.file#=d.file_id;
可以把把表空间也列出来。
v$tempstat
v$datafile




  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值