以下的文章主要是对Oracle flashback buffer的实际应用的参数研究,我们大家知道在Oracle 10g中Oracle数据库可以启用flashback功能,以下的文章主要是介绍在Oracle shared pool中如何分配flashback buffer,以下是Oracle部分启动日志,可以清楚的看到Oracle flashback buffer在shared pool分配了3981204 bytes。
引用
- Wed Dec 30 15:20:40 2009
- Allocated 3981204 bytes in shared pool for flashback generation buffer
- Starting background process RVWR
- RVWR started with pid=16, OS id=724
同样在数据字典中也可以看到Oracle flashback buffer的大小:
引用
- SQL> select name,bytes from V$sgastat
- 2 where pool=’shared pool’
- 3 and name like ‘%flash%’;
- NAME BYTES
- ————————– ———-
- flashback generation buff 3981204
当flashback buffer空间紧张时,可能会出现flashback buf free by RVWR等待事件,Oracle并没有提供参数调节Oracle flashback buffer,对于高吞吐量,并发量系统初始大小并不能满足系统要求
目前系统中log_buffer大小为7012352 bytes,将其改为10M,重启数据库,观察flashback buffer变化。
引用
- SQL> show parameter log_buffer
- NAME TYPE VALUE
- ———————————— ———– ——————————
- log_buffer integer 7012352
- SQL> alter system set log_buffer=10000000 scope=spfile;
- System altered.
- SQL> select name,bytes from V$sgastat
- 2 where pool=’shared pool’
- 3 and name like ‘%flash%’;
- NAME BYTES
- —————————— ———-
- flashback generation buff 3981204
- SQL> startup force
- ORACLE instance started.
- Total System Global Area 536870912 bytes
- Fixed Size 1262764 bytes
- Variable Size 155192148 bytes
- Database Buffers 369098752 bytes
- Redo Buffers 11317248 bytes
- Database mounted.
- Database opened.
- SQL> select name,bytes from V$sgastat
- 2 where pool=’shared pool’
- 3 and name like ‘%flash%’;
- NAME BYTES
- —————————— ———-
- flashback generation buff 3981204
可以看到flashback generation buff大小并没有发生变化。
进一步,观察和flashback相关的隐含参数