从Oracle 11gR2开始,Oracle终于如大家所预料的那样,开始支持SSD(solid-state disk),该特性允许使用SSD硬盘作为Buffer Cache的二级缓存,以在磁盘和内存之间增加一级缓冲,提升数据访问性能.
●A transparent extension of the database buffer cache using solid-state disk (SSD) technology
SSD acts as a Level 2 cache (SGA is Level 1)
Faster than disk (100x faster for reads)
Cheaper than memory ($50 per gigabyte)
Large capacity (hundreds of gigabytes per flash disk)
●Fewer drives and better performance
For I/O throughput, users often use hundreds of drives today
Flash enables I/O throughput without all the drives
Large jobs complete faster
11gR2中,对这一特性的支持是通过新引入的2个参数来控制的
db_flash_cache_file Specifies the path and file name for the file to contain the flash cache, in either
the operating system file system or an Oracle Automatic Storage Management disk group.
If the file does not exist, the database creates it during startup. The file must
reside on a flash disk device. If you configure the flash cache on a disk drive
(spindle), performance may suffer.
The following is an example of a valid value for db_flash_cache_file:
/dev/fioa1
db_flash_cache_size Specifies the size of the flash cache. Must be less than or equal to the physical
memory size of the flash disk device. Expressed as nG, indicating the number of
gigabytes (GB). For example,to specify a 16 GB flash cache,
set db_flash_cache_size to 16G.
注,1)如果db_flash_cache_size>0表示enable flush cache特性.
如果db_flash_cache_size=0表示disable flush cache特性.
2)Flash cached blocks Headers是被保存在SGA中,所以配置了flash cache特性,需要适当的增加sga的size.
Flush cache size设置多大合适?
根据Oracle官方doc的建议,一般设置Flush cache为buffer cache的2-10倍左右,少于2倍的设置,将不会带来什么好处.
新的存储参数
storage_clause
STORAGE
({ INITIAL size_clause
| NEXT size_clause
| MINEXTENTS integer
| MAXEXTENTS { integer | UNLIMITED }
| maxsize_clause
| PCTINCREASE integer
| FREELISTS integer
| FREELIST GROUPS integer
| OPTIMAL [ size_clause | NULL ]
| BUFFER_POOL { KEEP | RECYCLE | DEFAULT }
| FLASH_CACHE { KEEP | NONE| DEFAULT }
...
说明: KEEP和buffer_pool参数对应的keep含义一样
DEFAULT和buffer_pool参数对应的含义一样(按照类似LRU算法将长时间不用的数据从flash disk中清理出去)
NONE表示不起用