整理一篇关于11g smart flash cache 的文章,louisliu
我们来做一下演示 采用FusionIO SLC 160G
[oracle@db-41 ~]$ ls -l /dev/fioa
brw-r----- 1 oracle oinstall 252, 0 Jul 17 14:26 /dev/fioa
[root@db-41 dev]# fio-status
Found 1 ioDrive in this system
Fusion-io driver version: 2.3.1 build 123
Adapter: ioDrive
Fusion-io ioDrive 160GB, Product Number:VRG5T SN:479912
External Power: NOT connected
PCIE Power limit threshold: 24.75W
Sufficient power available: Unknown
Connected ioDimm module:
fct0: Fusion-io ioDrive 160GB, Product Number:VRG5T SN:479912
fct0 Attached as 'fioa' (block device)
Fusion-io ioDrive 160GB, Product Number:VRG5T SN:479912
Located in slot 0 Upper of ioDrive SN:479912
PCI:08:00.0, Slot Number:1
Firmware v5.0.6, rev 101583
160.00 GBytes block device size, 203 GBytes physical device size
Sufficient power available: Unknown
Internal temperature: 43.3 degC, max 44.8 degC
Media status: Healthy; Reserves: 100.00%, warn at 10.00%
SQL*Plus: Release 11.2.0.3.0 Production on Thu Aug 30 11:13:32 2012
Copyright (c) 1982, 2011, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, Real Application Clusters, OLAP, Data Mining
and Real Application Testing options
SQL> show parameter sga;
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
lock_sga boolean FALSE
pre_page_sga boolean FALSE
sga_max_size big integer 68096M
sga_target big integer 68096M
SQL> alter system set db_flash_cache_size=150G scope=spfile;
System altered.
SQL> alter system set db_flash_cache_file='/dev/fioa' scope=spfile;
System altered.
SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup
ORACLE instance started.
Total System Global Area 7.1085E+10 bytes
Fixed Size 2235608 bytes
Variable Size 8053064488 bytes
Database Buffers 6.2814E+10 bytes
Redo Buffers 215855104 bytes
Database mounted.
ORA-24324: service handle not initialized
ORA-24323: value not allowed
ORA-03113: end-of-file on communication channel
SQL> startup
ORACLE instance started.
Total System Global Area 7.1085E+10 bytes
Fixed Size 2235608 bytes
Variable Size 8053064488 bytes
Database Buffers 6.2814E+10 bytes
Redo Buffers 215855104 bytes
Database mounted.
Database opened.
SQL> show parameter flash_cache
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
db_flash_cache_file string /dev/fioa
db_flash_cache_size big integer 149G
SQL> alter system set db_flash_cache_size=150G scope=spfilel
2
SQL> alter system set db_flash_cache_size=150G scope=spfile;
System altered.
SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup
ORACLE instance started.
Total System Global Area 7.1085E+10 bytes
Fixed Size 2235608 bytes
Variable Size 8053064488 bytes
Database Buffers 6.2814E+10 bytes
Redo Buffers 215855104 bytes
Database mounted.
ORA-24324: service handle not initialized
ORA-24323: value not allowed
ORA-03113: end-of-file on communication channel
ORA-27042: not enough space on raw partition to fullfill request
Additional information: 3
modify db_flash_cache_size to 149G
SQL*Plus: Release 11.2.0.3.0 Production on Thu Aug 30 11:04:10 2012
Copyright (c) 1982, 2011, Oracle. All rights reserved.
Connected to an idle instance.
SQL> create spfile from pfile;
File created.
SQL> startup
ORACLE instance started.
Total System Global Area 7.1085E+10 bytes
Fixed Size 2235608 bytes
Variable Size 8053064488 bytes
Database Buffers 6.2814E+10 bytes
Redo Buffers 215855104 bytes
Database mounted.
Database opened.
SQL> show parameter flash_cache
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
db_flash_cache_file string /dev/fioa
db_flash_cache_size big integer 149G
SQL> select 149/68 from dual;
149/68
----------
2.19117647