欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  数据库

Oralce中的flash cache

程序员文章站 2024-04-05 08:21:54
...

使用条件:Linux或Solaris机器, AWR中建议doule buffer cache, db file sequential read是top wait event. 大小:2-10倍的buffer c

使用条件:
Linux或Solaris机器, AWR中建议doule buffer cache, db file sequential read是top wait event.

大小:
2-10倍的buffer cache.不能小于2倍. 如果使用ASMM, 2-10倍的SGA_TARGET

两个参数:
DB_FLASH_CACHE_FILE
Specifies a list of paths and file names for the files to contain the flash cache, in either the operating system file system or an Oracle Automatic Storage Management disk group. If a specified file does not exist, the database creates it during startup. Each file must reside on a flash disk device. If you configure the flash cache on a disk drive (spindle), performance may suffer. A maximum of 16 files is supported.

DB_FLASH_CACHE_SIZE
Specifies the size of each file in the flash cache. Each size corresponds with a file specified in db_flash_cache_file. The files and sizes correspond in the order that they are specified. An error is raised if the number of specified sizes does not match the number of specified files.
Each size specification must be less than or equal to the physical memory size of its flash disk device. The size is expressed as nG, indicating the number of gigabytes (GB). For example, to specify a 16 GB flash cache, set db_flash_cache_size value to 16G.

使用方法:
alter system set altdb_flash_cache_file = '/dev/raw/sda' scope=spfile;
alter system set db_flash_cache_size = 32G scope=spfile;

将db_flash_cache_size设为0 可以disable flash cache. 再设回来可以enable. 但不允许动态修改db_flash_cache_size的值.

对于RAC的环境, 需要在每个instance上面都设置以上两个参数 并且不能使用同一个file.

Oralce中的flash cache