东南亚印尼 ,系统在下5月1号13 点左右变的非常慢
出awr 报告
Snap Id | Snap Time | Sessions | Cursors/Session | |
---|---|---|---|---|
Begin Snap: | 5107 | 01-May-13 13:00:02 | 131 | 1.0 |
End Snap: | 5108 | 01-May-13 14:00:04 | 138 | .9 |
Elapsed: | 60.04 (mins) | |||
DB Time: | 898.90 (mins) |
系统比平时高出了很多
Top 5 Timed Foreground Events
Event | Waits | Time(s) | Avg wait (ms) | % DB time | Wait Class |
---|---|---|---|---|---|
DB CPU | 24,951 | 46.26 | |||
enq: TS - contention | 3,980 | 18,991 | 4772 | 35.21 | Other |
db file sequential read | 1,651,217 | 7,166 | 4 | 13.29 | User I/O |
log file sync | 430,820 | 473 | 1 | 0.88 | Commit |
gc current block busy | 22,970 | 277 | 12 | 0.51 | Cluster |
enq:ts- contention wait event temp tablespace 不足引发的等待事件
temp tablespace 真的不够了吗, 查看alter.log
Stopping background process CJQ0
Wed May 01 13:29:31 2013
ORA-1652: unable to extend temp segment by 128 in tablespace TEMP
Wed May 01 13:29:31 2013
ORA-1652: unable to extend temp segment by 128 in tablespace TEMP
Wed May 01 13:29:31 2013
ORA-1652: unable to extend temp segment by 128 in tablespace TEMP
Wed May 01 13:29:31 2013
ORA-1652: unable to extend temp segment by 128 in tablespace TEMP
果然temp 报不足了,不能正确扩展了
查看
select file#, blocks*8/1024/1024 from v$tempfile;
FILE# |
BLOCKS*8/1024/1024 |
1 |
31.99902344 |
2 |
2 |
3 |
2 |
4 |
2 |
5 |
2 |
6 |
2 |
7 |
2 |
8 |
2 |
9 |
2 |
10 |
2 |
11 |
2 |
temp tablespace 空间数据文件多达11个,但10个只有2G ,本系统是一个olap的系统的应用特性,又是三节点的rac
对temp tablespace 使用的比较大, 是不是另外10 个数据文件不能扩展呢,先解燃眉之急。
select * from dba_temp_files ;
原来的后面10个临时表空间不能扩展
alter database tempfile 2 autoextend on ;
alter database tempfile 3 autoextend on ;
一会观察wait event enq:ts- contention 消失。
问题解决。
借着这个机会,学习一下temp 空间的相关知识。
temp tablespace 相关的视图
dba_temp_files v$tempfiles 这两个视图记录temp 表空间的基本信息,大小,可扩展,文件的位置
v$sort_segment temp tablespace 的使用情况, 临时表,排序段
v$tempseg_usage 显示那些用户在使用临时空间,使用了多少,其session的id,SQL的ID等
dba_temp_free_space 记录空间大小、空闲、 使用的大小情况