Post on 21-Dec-2015
transcript
Leveraging new Oracle 12c features to reduce storage costs
Wesley Vaske
Kai Yu
Dell Oracle Solutions Engineering
About Authors• Wes Vaske, System Engineer, Dell Databases
Engineering Introduction Bio
• Kai Yu, Senior Principal Engineer, Dell Database Engineering 19 years Oracle DBA/Apps DBAS and Solutions Engineering Specializing in Oracle RAC, Oracle VM and Oracle EBS Oracle ACE Director, Oracle papers author/presenter 2011 OAUG Innovator of Year, 2012 Oracle Excellence Award:
Technologist of the Year: Cloud Architect by Oracle Magazine My Oracle Blog: http://kyuoracleblog.wordpress.com/ Co-author Apress Book “Expert Oracle RAC 12c”
Dell Oracle Solution Engineering Providing solutions on the whole stack from the ground uphttp://www.delltechcenter.com/oracle
• Solutions Deliverable List
• Validated integration
• Best practices
• Virtualization
• Oracle EM12c
• Oracle Applications
• Performance Study
What we doRecent project: High Performance Oracle Workloads with the Dell Acceleration Appliances for Database (DAAD)
Dell Integrated Systems for Oracle Database
6 7 8 10 11 12 13 15 16 17 6 7 8 10 11 12 13 15 16 17
2 x Brocade 6510 16Gbps Fibre Channel SAN Switches
Oracle Database 12c (2 x R920)
(1 x S60) 1GbE Switch (Management)
Management Server (R620)
Top of Rack (2 x S6000) 40GbE Switches (Public & Private)
01
02
03
04
05
06
07
08
09
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
01
02
03
04
05
06
07
08
09
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
U01
U02
U03
U04
U05
U06
U07
U08
U09
U10
U11
U12
U13
U14
U15
U16
U17
U18
U19
U20
U21
U22
U23
U24
U25
U26
U27
U28
U29
U30
U31
U32
U33
U34
U35
U36
U37
U38
U39
U40
U41
U42
KMM FPM185
8
9
10
4
5
6
12
13
14
8
9
10
4
5
6
12
13
14
1
1
0
0
750W 750W
Force10
1
1
0
0
750W 750W
Force10
2 x S6000 40GbE TOR Switches (Public & Private)
Database Servers (R920)
2 x Brocade 6510 16Gbps FC Switches
Dell Acceleration Appliances for Databases (DAAD-HA)
Management Server (R620)1 x S60 Mgmt. Switch
KMM
19U
Database Servers (R920)
Agenda
• Changes in enterprise storage
• Oracle ILM–Heat Map–Automatic Data Optimization
• Examples of using Oracle ILM
• Questions
Dell - Restricted - Confidential
Changes in enterprise storage
Decreasing cost and increasing capacity
• Price / gigabyte continues to drop dramatically but is outpaced by increasing demand for storage.
• This leads to increased spending on storage in spite of decreasing costs.
• Source: Historical External Disk Storage Data: IDC Worldwide tracking report
Storage tiering – Why?
• It allows small capacities of high speed flash to accelerate much larger workloads.
• It allows slow, high capacity disks to store cold data for high performance applications.
• Use the right tool for the job:– SLC Flash for Write Intensive
workloads– MLC Flash for Read Intensive
workloads– 15k SAS for sequential
workloads– 7.2k SATA/NL-SAS for low
performance / archival– Tape for offsite / backup /
archival
SSD
15k SAS
NL SAS / SATA
Tape
Storage tiering – How?
Tiering Layer Description Products DisadvantagesAdvantages
• The storage admin moves or assigns storage to applications/servers based on expected performance/cost requirements.
Manual • All storage products • Requires multiple storage products
• Application awareness dependent on storage admin
• Requires multiple storage products
• Complex configurations
• Application awareness dependent on storage admin
• The storage appliance moves blocks or pages of data from one type of disk to another type of disk based on rules or usage.
Storage • Dell Compellent• Dell EqualLogic• EMC FAST• NetApp
• Storage snapshots can be utilized
• Simplest way to implement storage tiering
• Not application aware
• Can’t combine different vendors in a full-featured configuration.
• Application has access to different storages with varying cost and performance and moves data between these storage tiers.
Application • Oracle ADO• VMware vSAN• Microsoft Storage
Spaces
• Best theoretical performance
• Able to define storage tiers based on better data
• Vendor Agnostic• Consistent
application of tiering rules
• Unable to use storage snapshots over entire dataset
Dell - Restricted - Confidential
Oracle Information Lifecycle Management (ILM)
Information Lifecycle Management (ILM)
• ILM is the practice of applying specific policies for effective information management.
• With respect to databases, ILM refers to the processes and practices of aligning digital records—table “rows”—with the most appropriate and cost effective IT infrastructure at each phase of its useful life.
• Examples:– Moving transaction data to a data
warehouse for improved analytics performance
– Compressing tables or partitions as data ages to reduce storage capacity
– Moving data for completed transactions to read-only storage
Active
Less Active
Historical
Archive
New features in Oracle Database 12c
• While ILM has been practiced for decades the explosion of new data and the proliferation of storage technologies has lead to innovations in improving management of automated ILM.
• Heat Map– Stores system-generated data usage statistics at the block and
segment levels– Segment level Heat Map tracks the time of last modification
and access of tables and partitions– Row level Heat Map tracks modification times for individual
rows (aggregated to the block level)– Heat Map skips internal access done for system tasks—
automatically excluding Stats Gathering, DDLs or Table Redefinitions
• Automatic Data Optimization– Allows you to create policies for data compression (Smart
Compression) and data movement, to implement storage and compression tiering
– Smart Compression refers to the ability to utilize Heat Map information to associate compression policies, and compression levels, with actual data usage
Heat Map• Views for interacting with Heat Map:
• Heat Map can be enabled at the system or session level
• To support ADO it must be enabled at the system level
• You can use the DMBS_HEAT_MAP PL/SQL package to get more detail information from Heat Map via a set of procedures.
View Description
V$HEAT_MAP_SEGMENT Displays real-time access information, including object name, object number and container ID.
DBA_HEAT_MAP_SEGMENT:
Displays the latest segment access time for all segments visible to the specified user. (Support ALL or USER in place of DBA)
DBA_HEAT_MAP_SEG_HISTOGRAM
Displays access information for all segments visible to the specified user. (Support ALL or USER in place of DBA.)
DBA_HEATMAP_TOP_OBJECTS
Displays access information for the top 1,000 objects.
DBA_HEATMAP_TOP_TABLESPACES:
Displays access information for the top 100 tablespaces.
Automatic Data Optimization (ADO)
• Compression types:
• Data can be compressed at the table, partition/segment, or row level (rows are aggregated to the block level)
• Data can be tiered at the table or partition level (there is no row-based tiering)
Compression algorithm Description
COMPRESS; Basic table compression. The same as “ROW STORE COMRESS BASIC”
ROW STORE COMPRESS BASIC:
The standard option (see above)
ROW STORE COMPRESS ADVANCED:
Oracle DB compresses the data during Data Manipulation Language (DML) operations. This is recommended for Online Transaction Processing Applications (OLTP)
COLUMNSTORE COMPRESS FOR QUERY:
Enables hybrid columnar compression in which the data is transformed into a column-oriented format then compressed. This is useful for Data Warehouses (OLAP)
COLUMNSTORE COMPRESS FOR ARCHIVE:
Same as above but compressed at a higher level. This is useful for archiving as it has a negative impact on performance.
NOCOMPRESS: Disables table compression. The default.
Oracle ILM – ADD POLICY
• ILM policies are created via “CREATE TABLE” or “ALTER TABLE” commands.
• Policies will indicate compression or tiering, row/segment/table level, rule for execution.
• Example: Segments in the orders table are compressed as columnar data if 30 days pass with no modifications.– ALTER TABLE orders ILM ADD POLICY– COLUMN STORE COMPRESS FOR QUERY HIGH SEGMENT– AFTER 30 DAYS OF NO MODIFICATION;
• Example: Data in the orders table will be tiered to the tablespace “archiveTableSpace” based on the parameters set via the DBMS_ILM_ADMIN.customize_ilm procedure. With the default options, this policy would tier partitions when the source tablespace reaches 85% used. Partitions would be tiered based on the frequency and date of table access.– ALTER TABLE orders ILM ADD POLICY– TIER DATA TO archiveTableSpace;
Oracle ILM - Administration
• DBMS_ILM_ADMIN Provides an interface to customized Automatic
Data Optimization (ADO) policy execution. – customize_ilm Allows you to set parameters for ILM.– disable_ilm Procedure to turn off background ILM– enable_ilm Procedure to turn on background ILM– clear_heat_map_all Procedure to delete all rows except dummy
row– set_heat_map_all Procedure to update/insert a row for all
tables– set_heat_map_table Procedure to update/insert a row for this
table/segment– clear_heat_map_table Procedure to clear all/some statistics for table– set_heat_map_start Procedure to set start date of heat map
data
Dell - Restricted - Confidential
Automatic Data Optimization Examples
Dell - Internal Use - Confidential19
Automatic Data Optimization Examples• Heat Map tracks usage information at the row and segment level :
Views: DBA_HEAT_MAP or USER_HEAT_MAP
Partition
Table
• Add ADO policy: three parts Ado action: data compression or data movement Level: segment or row level for table or partition Condition: what condition will initiate an ADO action. ADO policy examples:
Dell - Internal Use - Confidential20
Automatic Data Optimization Examples• Ado policy for data movement
• Thresholds at which ADO data movement policy will be started/stoppedTablespace percent usedTablespace percent free%used > 85% start%free < 30% stop
• Tablespaces on tier storage (in this example)
T1DATA tablespace is built on 12x SLC SSDs in RAID10
T2DATA tablespace is built on 12x 1TB 7.2k rpm Hard disks in RAID10
Automatic Data Optimization Examples
• Example 1 : Create segment-level ADO policy to automatically compress table after 10 days no modification
• Create compression policy
. Check the policy
Display Heat map tracking data
Automatic Data Optimization Examples
• Execute the ADO policy immediately
• Check the task status: policy_name: P102, task_id: 2146
• Verify the tables compression
Automatic Data Optimization Examples
• Example 2 : Create ADO policy to move objects from T1DATA to T2DATA
Current TBS:
• Check Tablespaces space usage: PCT_FREE, PCT_USED
Automatic Data Optimization Examples• Check ADO parameters for ADO data migration threshold
T1DATA: PCT_USED: 91.62% > 85% threshold
• Start migration when pct_used > 85% ,stop migration when pct_free < 30%
• Create data movement policy:
• Check the policy: policy name: P122
Automatic Data Optimization Examples
• Execute the ADO policy immediately
• Check the task status : policy_name: P122, task_id: 2214
Automatic Data Optimization Examples
• Check the result
Tablespace space usage: free space on T1DATA tablespace:
T1DATA 8.38% free T1DATA: 15.38% free
Before
Aftersage:
Automatic Data Optimization Examples
• Example 3 : Compress partitions
Check partitions and
their write time
• Create policy
Automatic Data Optimization Examples• Check policy
• Check execution
• Recreate Policy
Automatic Data Optimization Examples• Check policy: policy_name: P145, task_id: 2358
• Check execution of task
• Check the result
Automatic Data Optimization Examples• Example 4: Move partition to tier 2 storage T2DATA:
• Current tablespace:
• Create policy:
• Execute the policy:
Automatic Data Optimization Examples• Why ?? T1DATA’s PCT_USED (84.62%) < 85% threshold
• Force the policy to get executed by changing T1DATa PCT_USED parameter
• Execute the policy again:
Automatic Data Optimization Examples• Check the task:
• Check the result
• Tablespace before the data movement
Dell - Restricted - Confidential
Links
Sources
• Historical External Disk Storage Data - http://stevej-lab-notes.blogspot.com/2014/06/historical-external-disk-storage-data.html
• Heat Map, Automatic Data Optimization and ILM with Oracle Database - http://www.oracle.com/technetwork/database/enterprise-edition/index-090321.html
• DMBS_ILM_ADMIN Documentation - http://docs.oracle.com/database/121/ARPLS/d_ilm_admin.htm
Dell - Restricted - Confidential
Questions?
Contact us at kai_yu@dell.com or visit Kai Oracle Blog at http://kyuoracleblog.wordpress.com/