2010 International Conference on Data Storage and Data Engineering
Autonomicity in Oracle Database Management System
Basit Raza, Abdul Mateen, Muhammad Sher Department of Computer Science International Islamic University Islamabad, Pakistan
[email protected] [email protected],
[email protected]
Mian Muhammad Awais Department of Comp. Science LUMS Lahore, Pakistan
[email protected]
Abstract—Human world is becoming more and more dependent on computers and information technology (IT). The autonomic capabilities in computers and IT have become the need of the day. These capabilities in software and systems increase performance, accuracy, availability and reliability with less or no human intervention (HI). Database has become the integral part of information system in most of the organizations. Databases are growing w.r.t size, functionality, heterogeneity and due to this their manageability needs more attention. Autonomic capabilities in Database Management Systems (DBMSs) are also essential for ease of management, cost of maintenance and hide the low level complexities from end users. With autonomic capabilities administrators can perform higher-level tasks. The DBMS that has the ability to manage itself according to the environment and resources without any human intervention is known as Autonomic DBMS (ADBMS). The paper explores and analyzes the autonomic components of Oracle by considering autonomic characteristics. This analysis illustrates how different components of Oracle manage itself autonomically. The research is focused to find and earmark those areas in Oracle where the human intervention is required. We have performed the same type of research over Microsoft SQL Server and DB2 [1, 2]. A comparison of autonomic components of Oracle with SQL Server is provided to show their autonomic status. Keywords-Autonomic computing,, Optimization, Oracle, SQL Server.
I.
Human
intervention,
INTRODUCTION AND BACKGROUND
Autonomic computing (AC) is a technology towards selfmanaging system with a minimum human intervention and hiding the low level complexities from the users. The term autonomic is derived from the human autonomous nervous system that works according to the intended behaviour. AC system contains set of elements that includes Managed, Monitor, Analyze, Plan, Execute, Sensor and Effecter. All these elements are connected with each other in a loop. The Process Control theory is the basis of self-managing systems where different activities are monitored and managed [3]. There are five levels of autonomic computing, which are Basic, Managed, Predictive, Adaptive and Autonomic level [4, 5]. The main purpose of AC technology is to make each component autonomic w.r.t external interface and behaviour. To gain AC there are different challenges such as conceptual, architectural, middleware and application challenges. The 978-0-7695-3958-4/10 $26.00 © 2010 IEEE DOI 10.1109/DSDE.2010.72
Tauqeer Hussain Department of Comp. Science University of Central Punjab Lahore, Pakistan
[email protected]
systems are operated by humans; however this human intervention may be the cause of most of the errors. This may happen even by the trained operators and managers due to huge complexity. So less experience is required to users as AC environment is more responsive and real time. Moreover, due to human intervention, cost of ownership also increases [6]. In DBMS all the functions such as memory management, storage management, backup and recovery had been performed by the Database Administrator (DBA). Managing, tuning and testing of any DBMS is difficult and time consuming task especially in complex and real time systems. To handle these kinds of error prone activities there is a need to make DBMS that have self-managing and autonomic capabilities i.e. Autonomic DBMS. The ADBMS has six basic autonomic characteristics (self-*) [7-10], which are Self-Optimization, Self-Configuration, Self-Healing, Self-Protection, Self-Inspection and Self-Organization. The DBMS that have these autonomic characteristics will be a fully autonomic DBMS. A lot of work has been done in context of AC in DBMSs. Major commercial relational DBMSs are evolving towards autonomic DBMSs. The role of the DBAs has been changed due to the advancement in ADBMSs. DBAs defines business strategies and policies for self-managing DBMSs rather than performing operational and repeated tasks This paper presents a viewpoint of AC in Oracle by exhibiting self-managing behaviour in its different components and tools. The self-managing behaviour is depicted through the discussion about the internal functionality and working of these autonomic components. This research identifies the areas in which Oracle DBMS should further improve so that the development of fully autonomic DBMS can be made possible from the current state of partial autonomic DBMS. Moreover, ours work is different from prior work by identifying the optional and mandatory human intervention in Oracle’s AC components; and making a comparison with autonomic components and tools of SQL Server [1] to show its maturity level. The organization of this paper is as follows: Section 2 discusses autonomic features of Oracle w.r.t. AC characteristics, section 3 identifies mandatory and optional human intervention required in operations of Oracle’s AC components and section 4 provides a comparison of AC components available in Oracle with Microsoft SQL Server and section 5 concludes the paper with future directions.
298 296
II.
AUTONOMIC CAPABILITIES IN ORACLE
For each autonomic characteristic, the autonomic capabilities that have been incorporated in Oracle are discussed in this section. A. Self-Optimization Self-optimization is the characteristic that is used to execute a task in an efficient way w.r.t environment. Oracle has following components, which have self-optimization characteristics. 1) Query Optimizer: In Oracle DBMS, SQL tuning is performed in four steps, 1) to identify high load queries, 2) generate optimal plan, 3) then improve Query Execution Plan (QEP), 4) and at the end generate best QEP. Automatic SQL tuning is performed through query optimizer and SQL tuning advisor [11]. The SQL Tuning Advisor is an interface between optimizer and user that generates tuning recommendations for workload. When user selects recommendations it will be stored in SQL profile that is further utilized by Oracle query optimizer for generation of best QEP. Oracle optimizer uses cost based and heuristic based techniques for optimization. A user can set the optimization goals that can be throughput or response time. Oracle optimizer performs optimization in three stages namely query transformation, estimation and plan generation. Based upon the estimates of cardinality, selectivity and other parameters available in the database statistics, it determines the cost of executing a query execution plan. Finally, query optimizer produces candidate plans among which the one with lowest cost is selected for execution. The process of query plan optimization starts from the inner most query to the outermost query. 2) Automatic Statistics Collection (ASC) Component: Oracle generates different types of statistics. These include database statistics, operating system statistics; and interpreting statistics [12]. Database statistics are Wait Events, Active Session History (ASH), System and Session Statistics etc; whereas operating system statistics are CPU, virtual memory, disk and network statistics etc. Oracle optimizer uses both data and system statistics. The estimates for different cardinalities (table, join, distinct, etc.) are calculated from the base statistics using probabilistic models. Sub-optimal plans may be generated due to the old or missing base statistics, wrong estimation of output and inappropriate optimization parameter settings. Oracle optimizer handles this problem by collecting auxiliary information for that specific query. In Oracle, monitoring component is devoted to track changes in the database. Based on these changes, the monitoring process modifies statistics automatically. Oracle optimizer uses dynamic sampling of data [6] to create statistics. In case of missing or old statistics, the optimizer uses total number of extents occupied by the table or gives recommendations to gather statistics as well as to provide auxiliary information for the
objects. The optimizer also performs a number of analysis activities which are: Statistics, Estimates, Parameter Setting, Access Path and SQL Structure Analysis [11]. To achieve sufficient accuracy and efficiency, sampling may have to be done iteratively [13] until optimized solution is not achieved. 3) Automatic Database Diagnostic Monitor: For various tuning activities in the system, ADDM provides the central intelligence [13]. These activities include SQL tuning, space fragmentation analysis, CPU bottlenecks, undersized memory structures, high load requests execution and compilation, database configuration issues, and concurrency issues. In Oracle 10g, manageability solution can be categorized into three phases which are Observe phase, Diagnose phase and Resolve phase [12] as shown in Figure 1. These phases are performed iteratively to attain the desired performance level or until no more tuning is possible. Snapshots are taken on an hourly basis and stored in AWR. These collected snapshots are used in the observe phase. In the diagnosis phase, ADDM acts as an engine which optimizes system throughput through holistic view. Finally, the resolve phase provides a set of recommendations to be implemented for the database.
Figure 1. Manageability Solution Loop
4) Automatic Workload Repository (AWR): The Statspack is introduced in Oracle 8i to monitor performance that is extended in 9i and evolved to AWR in 10g. The database collects performance data and a snapshot on hourly basis, and stores these in AWR. It is used to collect performance statistics including wait events, active session history, system and session, object usage statistics, and resource critical requests [14]. AWR provides information to other components, e.g. ADDM, SQL Tuning Advisor to improve performance. B.
Self Configuration Self-configuration is the characteristic that configures itself as per defined goals and objective. There are three components in Oracle for the automatic configuration, which are discussed as follows: 1) Configuration Management (CM) Pack: All the issues related to the configuration are managed by Oracle’s CM Pack. The main purpose of this pack is to minimize the labour and tedious tasks of DBA while maintaining stable and efficient environment. The CM pack achieves scalability and standardization by discovering the Oracle
297 299
environment and then its management. This management is done by change tracking, search, comparison, and policy management [15]. It collects the configuration information about hardware and software components, which include CPU, memory, storage, operating system and its packages, database, applications and third party software. Some key features of the CM pack are automated discovery of dependency relationships; historical change tracking, faster problem resolution, and extensible configuration schema. 2) SQL Access Advisor: In Oracle 9i, tuning of the index is performed through an Index Tuning Wizard and later enhanced to SQL Access Advisor. It supports different types of workload such as SQL tuning set workload. On the basis of current workload, it recommends partitions, materialized views, and indexes. It performs a quick tuning of a query and recommend building and changing existing materialized views. SQL Access advisor operates in two modes i.e. problem solving and evaluation mode. In problem solving mode, it resolve the tuning problem by enhancing index structure, partitions and materialized views where as in evaluation mode, it provides recommendations for efficient access of the current workload. The process of recommendations generation takes extra time and storage. 3) Memory Management: Oracle 10g introduces Automatic Shared Memory Management (ASMM) component for distribution of memory according to the workload and object’s requirements [15, 16]. DBA simply specify the amount of Shared Global Area (SGA) memory that is required for an instance [17]. ASMM allocates memory as per requirements of the database. Oracle uses a hybrid memory model that is based on SGA and Private Global Area (PGA). ASMM tunes both the SGA and PGA. The flexibility and adaptiveness of this solution ensures the best possible utilization of available resources which helps organizations to reduce expenditure. ASMM cannot tune two critical memory consumers, which are sort and buffer pools with page size greater than 4 KB [18]. C.
Self-Healing Self-healing is used to maintain the system in a working and operational state. In Oracle 9i (and in earlier versions), DBMS_JOB package was responsible for automatic backup and recovery, which is extended and named as DBMS_ SCHEDULER in Oracle 10g. This package collects statistics, recognizes database objects and monitors execution of various tasks to perform backup and recovery. The Figure 2 shows the complicated recovery steps that are taken if a failure occurs in Oracle. D. Self-Protection Self-protection is the capability of a system to protect itself from malicious and unauthorized access. Oracle has self–protection features that are discussed as follows. 1) Oracle Resource Manager (ORM): It controls all the parallel running processes and logically divides the
workload into distinct units and assigns CPU resources [16, 19]. It tracks the consumption of CPU time, concurrently active sessions and performs scheduling of processes/ threads other than the operating system scheduler. It takes decision on the continuation of a currently running process or switching to another process. Its main components are resource consumer group, resource plan and resource plan directive. It allows DBA to set scheduling policies for the execution time of workload.
Figure 2. Backup/ Recovery Steps
2) Authentication/ Security: Oracle provides authentication and security by allocating different privileges to users. The basis of access granularity is row level in Oracle . It provides number of features for security and protection such as Encrypted Network Traffic, Strong Authentication, Middle Tier Support, Directory Enabled (LDAP), Virtual Private Databases, Label Security, Fine Grained Auditing (FGA), Row and Column Level Data Encryption. E.
Self-Inspection Self-Inspection is the characteristic, which have the ability to make intelligent decisions that are based on selfawareness. In DBMSs, various analysis tools are used to analyse the stored information. Oracle Manager Console (OMC) examines the system health at all times automatically, stores performance data within the system, alerts about the signs of un-healthiness and supports configuration. It can also take necessary actions to maintain the system health. In manager console administrator can specify the parts where monitoring is required. Oracle manager console observes storage, memory consumption for caching and sorting, logging, and application concurrency. F.
Self-Organization It is the characteristic in which the layout of data, views and indexes are reorganized and restructured. Automatic components related with the organization of data are storage management and dynamic online reorganization. 1) Storage Management: For storage management, Oracle Managed File (OMF) has been introduced in Oracle 9i and evolve to Automatic Storage Management (ASM) in 10g. Its main concern is the performance enhancement with 298 300
cost benefit and optimal utilization of disk space. The major sub-components of ASM are disk groups where each of the disk group has number of disks [20]. ASM provides the functionalities such as managing disk groups and disk redundancy, I/O balancing etc [21] to maximize throughput and efficiency. It performs storage configuration dynamically and when a new disk is added or removed, ASM rebalance the files across the disk group. The size of disk group can be increased without modifying the table space. ASM is also used to assists RAC/ Grid based cluster deployment and provides cluster file system on Linux and Windows [16]. DBA only allocate a database instance with a set of storage devices and rest of the operations and management is performed by the ASM. 2) Dynamic Online Data Reorganization: Reorganization is performed on tables as well as on indexes. During online data reorganization (ODR), user has full access to data. Reorganization is used to improve the availability and efficiency of database. Oracle provides many reorganization features, such as online index creation, online index rebuild, online index join and online table redefinition. The reorganization feature allows changing table and shrinking segments, too. Table redefinition, which allows changing the attributes and structure of a table, can be online as well as offline. After redefinition of a table, data is transformed physically to a new table. During this process, user has again full access to data. This feature improves database availability, efficiency and space utilization. Oracle provides the ability to move tables while on-line [20]. Oracle allows dynamic online index reorganization that retain the extra storage for efficient resource utilization. III.
HUMAN INTERVENTION IN ORACLE
Human Intervention can be used to measure the autonomicity of a DBMS. The less human intervention reveals the higher degree of autonomicity and vice versa. There may be either no human intervention, optional, or mandatory. In this section, we discuss how much human intervention is required in various components of Oracle. Most of the tasks are performed without human intervention, however, the optional and mandatory human intervention in Oracle components has been identified. The recommendations given by different advisors can be applied automatically or manually. Optimization goals can be set automatically but there is also provision to allow the user to set these goals if needed. Statistics management is automatic operation, which is performed after some specified interval, but it can be performed manually when needed. If the statistics mode or level is BASIC, then AWR statistics can be captured manually. ADDM captures the snapshot automatically but this can be manual. High workload can be identified manually by viewing the AWR. Similarly, the buffer size can be changed manually. SQL plan baseline can be loaded manually. Manual plan loading can be used with or without automatic plan capture. Memory is configured automatically but for the first time the DBA has to allocate
memory to different consumers manually. Later, memory can be distributed among different consumers automatically or manually. Automatic storage management allows relocation of bad blocks to uncorrupted space of the disk. This task can be performed through a utility by the DBA manually. Oracle provides authentication mechanisms to prevent unauthorized access. However human intervention is needed to assign privileges. The optional and mandatory human intervention, its type and degree is shown in Table I. TABLE I.
ORACLE COMPONENTS WITH HUMAN INTERVENTION Type of HI
HI Degree
Query Optimizer
Oracle Components
Optional
-
ASC Component
Optional
-
ADDM
Optional
-
AWR CM Pack SQL Access Advisor ASMM DBMS Scheduler
Optional
-
Mandatory
Low
Optional
-
Mandatory
Low
Optional
-
Oracle Resource Manager
Mandatory
Low
Authentication
Mandatory
High
Row Level Security Oracle Manager Console ASM Dynamic Online Reorganization
IV.
Data
None
-
Optional
-
Mandatory
Low
Optional
-
COMPARISON WITH SQL SERVER
We have discussed and analyzed various autonomic components that exist in Microsoft SQL Server and DB2 [1, 2]. In this section, we are comparing the autonomic components, utilities and tools of Oracle with SQL Server. In Oracle Query Optimizer, Automatic Database Diagnostic Monitor, Automatic Workload Repository and COLLECT_STAT procedure are responsible for optimization while in SQL Server, Query Optimizer, Performance Monitor and Automatic Statistics Management component are used to achieve optimization. Moreover optimization can be achieved through parallelism in both DBMSs for different tasks. Oracle’s DBMS Scheduler and SQL Server’s Maintenance Plan are used for self-healing. The Oracle has configuration components such as CM Pack, SQL Access Advisor and Automatic Shared Memory Management (ASMM) are used to achieve selfconfiguration. Similarly Configuration Manager, Database Tuning Advisor and Dynamic Self-Tuning Memory Manger are used for self-configuration in SQL Server. Automatic Storage Manger and Dynamic Online Data Reorganization are responsible for the reorganization of data in Oracle while in SQL Server Automatic Storage Management component; Dynamic Online Index Reorganization (OIR), Storage Design Wizard and Partition Wizard are used for reorganization of data and indexes. SQL Server provides 299 301
table level security while Oracle provides row level security. Oracle Resource Manger is used for self-protection. It controls all the parallel running processes, logically divides the workload into distinct units and assigns CPU resources. Oracle Manger Console in Oracle while Monitoring Tools and Data Base Consistency Checking (DBCC) are used for the self-inspection in SQL Server. These monitoring tools are further used to maintain the system health. We have mapped the autonomic components of Oracle and SQL Server to the basic autonomic characteristics of a DBMS as shown in Table II. V.
CONCLUSION & FUTURE WORK
We have explored autonomic computing components, utilities and tools of Oracle database and have found that these autonomic components exhibit autonomic behavior. A comparison of autonomic components of Oracle and Microsoft SQL Server is provided that reveals the strength and weaknesses of both DBMSs. We have observed that there is a certain degree of autonomicity present in each of these components, though some components still require human intervention. Nevertheless, the autonomic features available in Oracle improve efficiency of a DBA significantly. In future, we will explore, analyze and identify human intervention in different autonomic components of other DBMSs, so that high level of AC can be achieved. Further there is need to evaluate these autonomic components and tools by performing experiments and simulations. This will help to identify the strength and weaknesses of these components and enhance the autonomic maturity level. TABLE II. AC Feature
SO
ORACLE COMPONENTS WITH AUTONOMIC FEATURES
Query Optimizer
SQL Server Components Query Optimizer
ADDM
PM
Oracle Components
AWR
-
ASC Component
ASC Component
CM Pack
Config Manager
SC
SQL Access Advisor
DTA
ASMM
DSTMM
SH
DBMS Scheduler
Maintenance Plan
ORM SP
SI
SOr
-
Authentication
Authentication
Row Level Security
Table Level Security
OMC
Monitoring Tool -
DBCC
ASM Component
ASM Component
Dynamic ODR
Dynamic OIR Storage Design & Partition Wizard
-
REFERENCES [1]
A. Mateen, R. Basit, T. Hussain, and M.M. Awais, ”Autonomic mputing in SQL Server", 7th International Conference on Computer and Information Science (ICIS’08), Portland, Oregon, U.S.A, 2008. [2] A. Mateen, R. Basit, T. Hussain, and M.M. Awais, “Autonomicity in Universal Database DB2”, 8th International Conference on Computer and Information Science, China, 2009. [3] Y. Diao, J. L. Hellerstein, S. Parekh, R. Griffith, G. Kaiser, and D. Phung, “Self-managing systems: A control theory foundation”, In Pro of 12th IEEE Conference & Workshop on the Engg. of ComputerBased Systems, IEEE Computer Society, 2005, pp 441–448. [4] R. Steve, White, J. E. Hanson, I. Whalley, D. M. Chess, and J.O. Kephart, “An Architectural Approach to Autonomic Computing”, Proceedings of the IEEE International. Conference on Autonomic Computing, 2004. [5] H. A. Muller, L. O. Brien, M. Klein, and B. Wood, “Autonomic Computing”, Technical Note by Carnegie Mellon University, 2006. [6] S. Elnaffar, W. Powley, D. Benoit, and P. Martin, “Today’s DBMSs: How autonomic are they?”, In Proceeding. of the 14th International. Workshop on Database and Expert Systems Applications IEEE Computer Society, 2003, pp 651–655. [7] S. S. Lightstone, G. Lohman, D. C. Zilio, “Toward Autonomic Computing with DB2 Universal Database”, SIGMOD Record 2002, Vol. 31(3), 2002. [8] “Practical Autonomic Computing: Roadmap to Self-Managing Technology”, An IBM Journal Paper, 2006. [9] R. Basit, A. Mateen, T. Hussain, M. M. Awais, “Autonomic Success in Database Management Systems”, 8th International Conference on Computer and Information Science, China, June 2009. [10] M. Parashar and S. Hariri, “Autonomic Computing: An Overview”, LNCS 3566, Springer-Verlag Berlin Heidelberg, pp. 247–259, 2005. [11] B. Dageville, D. Das, K Dias, K Yagoub, M Zait, and M Ziauddin, “Automatic SQL Tuning in Oracle 10g”, Proceeding of the International Conference 30th VLDB, Canada, 2004. [12] “Oracle Database Performance Tuning Guide”, 10g Release 1 (10.1), Part No. B10752-01, December 2003. [13] K. Dias, M. Ramacher, Urishaft, V. Cenktaramani, and G. Wood, “Automatic Performance Diagnosis & Tuning in Oracle”, Proceedings of CIDR Conference, 2005. [14] “Automatic Workload Repository (AWR) in Oracle Database 10g”, An Oracle White Paper. http:\\www.oracle-base - automatic workload repository (AWR) in oracle database 10g.htm [15] The Self-Managing Database, Oracle Database 10g Release 2, An Oracle White Paper, June 2006. [16] D. Gornshtein, B. Tamarkin, “Features, Strengths and weaknesses comparison between MS SQL 2005 (Yukon) and Oracle 10g databases”, 2004. [17] T. Lahiri, A. Nithrkashyap, S. Kumar, B. Hirano, K. Pate, and P. Kumar, “The self-managing database: Automatic SGA memory management”, An Oracle White paper, 2003. [18] “Oracle Database Performance Tuning Guide”, 11g Release 1 (11.1), Part No. B28274-01, July 2007. [19] A. Rhee, S. Chatterjee, T. Lahiri, “Oracle Database Resource Manager Scheduling CPU Resources at the Application Level”, Oracle Corporation, 500 Oracle Parkway [20] “Technical Comparison of Oracle Database 10g versus SQL Server 2005: Focus on Information Integration”, Oracle White Paper, 2005. [21] “Automatic Storage Management (ASM) in Oracle Database 10g”, An Oracle White Paper. ;;kjhh
300 302