SmartIO provides application templates to optimize caching for databases running on VxFS file systems. SmartIO uses the templates to apply policies to particular types of files in the database. For example, caching policies for index files and data files.
The oracle template sets the default policy for the Oracle database, as follows:
Turns off caching (nocache mode) for ARCHLOG files
Sets read caching (read mode) for TEMPFILEs
For OLTP database, sets read caching to the datafiles with the most frequent reads.
For OLAP database, sets read caching to all datafiles that contain INDEXes.
To set the default SmartIO caching policies for a database
# sfcache app cachearea=cachearea_name oracle -S $ORACLE_SID \ -H $ORACLE_HOME -o setdefaults --type={OLTP | OLAP}
Where:
$ORACLE_HOME and $ORACLE_SID are mandatory and uniquely identify the database.
OLAP or OLTP indicates the type of application load. OLAP, or Online Analytical Processing, applications process workloads intended for multi-dimensional analytical queries. OLTP, or Online Transaction Processing, applications process transaction-oriented workloads, such as for data entry and retrieval transaction processing.
Example of an OLTP database:
$ sfcache app cachearea=sfcachearea_1 oracle -S $ORACLE_SID \ -H $ORACLE_HOME -o setdefaults --type=oltp INFO: Oracle Instance tpcc is running INFO: Store DB details at /tpccdata/.CACHE_INFO INFO: Setting oltp policies INFO: Setting nocache mode to /tpccdata INFO: Setting nocache mode to /tpcclog INFO: Setting nocache mode to /tpcclog/log_1_1 INFO: Setting nocache mode to /tpcclog/log_1_2 INFO: Setting nocache mode to /tpcclog/log_1_3 INFO: Setting nocache mode to /tpcclog/log_1_4 INFO: Setting nocache mode to /home/oracle/app/oracle/product/11.2.0 /dbhome_1/dbs/arch INFO: Setting read mode to /tpccdata/temp_0_0 INFO: Setting read mode to /tpccdata/temp_0_2 INFO: Setting read mode to /tpccdata/temp_0_1 INFO: Setting read mode to /tpccdata/temp_0_4 AWR snapid range min=1 max=7 INFO: Setting read mode to /tpccdata/stok_0_25 INFO: Setting read mode to /tpccdata/stok_0_24 INFO: Setting read mode to /tpccdata/stok_0_20 INFO: Setting read mode to /tpccdata/stok_0_29 INFO: Setting read mode to /tpccdata/stok_0_23 INFO: Setting read mode to /tpccdata/stok_0_22 INFO: Setting read mode to /tpccdata/cust_0_5
Example of an OLAP database:
$ sfcache app cachearea=sfcachearea_1 oracle -S $ORACLE_SID \ -H $ORACLE_HOME -o setdefaults --type=olap INFO: Oracle Instance tpcc is running INFO: Store DB details at /tpccdata/.CACHE_INFO INFO: Setting olap policies INFO: Setting nocache mode to /tpccdata INFO: Setting nocache mode to /tpcclog INFO: Setting nocache mode to /tpcclog/log_1_1 INFO: Setting nocache mode to /tpcclog/log_1_2 INFO: Setting nocache mode to /tpcclog/log_1_3 INFO: Setting nocache mode to /tpcclog/log_1_4 INFO: Setting nocache mode to /home/oracle/app/oracle/product/11.2.0 /dbhome_1/dbs/arch INFO: Setting read mode to /tpccdata/temp_0_0 INFO: Setting read mode to /tpccdata/temp_0_2 INFO: Setting read mode to /tpccdata/temp_0_1 INFO: Setting read mode to /tpccdata/temp_0_4 INFO: Setting read mode to /tpccdata/icust2_0_30 INFO: Setting read mode to /tpccdata/ordr_0_32 INFO: Setting read mode to /tpccdata/iordr2_0_44 INFO: Setting read mode to /tpccdata/iordr2_0_29 INFO: Setting read mode to /tpccdata/iordr2_0_47 INFO: Setting read mode to /tpccdata/icust2_0_49 INFO: Setting read mode to /tpccdata/icust1_0_2 INFO: Setting read mode to /tpccdata/istok_0_1 INFO: Setting read mode to /tpccdata/ordr_0_33 INFO: Setting read mode to /tpccdata/ordr_0_37 INFO: Setting read mode to /tpccdata/iordr2_0_37