AWR Report-Database profile information (i)

Source: Internet
Author: User

  

Elapse time is two snap intervals, which is equivalent to a sampling difference

DB time:db time= CPU times + wait time (not including idle wait) (non-background process) It's just that the DB is when the logged server spends its hours on database operations (non-background processes) and waits (non-idle waits)


If the DB time > Core Count *elapsed, the database load is very serious and can be used to locate bottlenecks through top event and load profile.
If DB time is much smaller than elapsed, the database is more idle

CPU in DB operation spent: 2152/(1320*8) *100%=20%, more idle (this sampling time point has a problem, should be collected transactions relatively concentrated time period, this includes too many database idle time, the results are meaningless, it also shows that the selection of analysis time is critical, Select a time period that can represent a performance issue. )



The cache miss that occurs in the library cache or dictionary cache is much more expensive than what happens in buffer cache. The shared pool is therefore set up to ensure that the most recently used data is available to the cache


Showing the database load profile, comparing it to baseline data, has more meaning, and if the load varies per second or per transaction, the application runs fairly stably. The single report data only describes the load situation of the application, most of which do not have a so-called "correct" value, however logons is greater than one per second, hard parses greater than 100 per second, all parses more than 300 per second indicates that there may be contention issues.

Redo Size: Log size per second (in bytes), can flag data change frequency, database task is heavy or not.

Logical reads: The number of blocks read logically per second/per transaction. The number of logical reads of block generated per second. Logical reads= consistent gets + DB block gets block changes: number of blocks modified per second/transaction

Physical reads: Number of physical read blocks per second/transaction

Physical writes: Number of blocks physically written per second/transaction

User calls: Number of call per second/per transaction

Parses:sql the number of parsing times. Number of resolutions per second, including the combination of fast Parse,soft parse and hard parse three. Soft parsing of more than 300 times per second means that your "application" is inefficient and adjusts session_cursor_cache.  Here, fast parse refers to the case where the session_cached_cursors=n is hit directly in the PGA, and soft parse refers to the case where the hit is in the shared pool, while hard parse refers to a situation where none is hit. Hard parses: One of the times, hard parsing too many, indicating that the SQL reuse rate is not high. The number of hard parse times per second, more than 100 times per second, may indicate that you are using a bad binding or that the shared pool settings are unreasonable. The parameter Cursor_sharing=similar|force can be enabled at this time, and the default value is exact.    However, when this parameter is set to similar, there is a bug that can cause the execution plan to be suboptimal. Sorts: Number of orders per second/transaction

Logons: Number of logons per second/per transaction

Executes: number of SQL executions per second/transaction

Transactions: Transactions per second. The number of transactions generated per second reflects the heavy workload of the database task.

Blocks changed per Read: Represents the scale at which logical reads are used to modify data blocks. The percentage of blocks changed in each logical read.

Recursive Call: Recursive invocation is the ratio of all operations. Percentage of recursive calls, if there is a lot of PL/SQL, then this value will be higher.

Rollback per transaction: The rollback rate per transaction. Look at the rollback rate is not very high, because rollback is very resource-intensive, if the rollback rate is too high, may indicate that your database has gone through too many invalid operations, excessive rollback may also bring about the competition of the undo block this parameter is calculated as follows : Round (user rollbacks/(user commits + user rollbacks), 4) * 100%.

Rows per sort: Number of rows per sort Note: Oracle's hard-and soft-parsing refers to soft parsing (soft prase) and hard prase, and it's not just about Oracle's handling of SQL. When you issue an SQL statement to Oracle, Oracle performs several steps in this SQL process before executing and getting results:

1. The Grammar check (syntax check) checks the spelling of this SQL syntax.

2. Semantic check (semantic check) such as checking the presence of an Access object in an SQL statement and whether the user has appropriate permissions.

3. Parsing SQL statements (Prase) uses an internal algorithm to parse the SQL, generating the parse tree and execution plan (execution plan).

4. Execute SQL, return result (execute and return) where soft and hard parsing occurs in the third process. Oracle uses the internal hash algorithm to obtain the hash value of the SQL, and then finds the hash value in the library cache, and if so, compares this SQL with the cache, assuming "Same", the existing parse tree and execution plan are used. The work of the optimizer is omitted.   This is also the soft parsing process. Admittedly, if any of the 2 assumptions above are not true, then the optimizer will create a parse tree and generate execution plan actions.    This process is called hard parsing. Creating a parse tree and generating an execution plan are expensive actions for SQL execution, so you should try to avoid hard parsing and use soft parsing as much as possible.

This section contains the memory hit ratio of the Oracle key metrics and the efficiency of other DB instance operations. One of the buffer hit Ratio is also known as the cache hit Ratio,library hit Ratio also known as the Library cache hit Ratio. Same as Load profile section, this section does not have the so-called "correct" value, but only according to the characteristics of the application to determine whether appropriate. In a DSS environment that uses direct read to perform large parallel queries, the 20% buffer hit ratio is acceptable, and this value is completely unacceptable for an OLTP system. Based on Oracle's experience, the Buffer hit ratio ideal should be above 90% for OLTP systems.
Buffer NoWait represents the non-waiting scale of the data being obtained in memory. Gets the non-wait ratio of buffer in the buffers. This value of Buffer nowait generally needs to be greater than 99%. Otherwise there may be contention, which can be further confirmed in a later wait event.
Buffer hit indicates that the process is finding the ratio of data blocks from memory, and it is more important to monitor whether the value has changed significantly than the value itself. For a typical OLTP system, if this value is less than 80%, you should allocate more memory to the database. The hit ratio of the data block in the data buffer should typically be above 95%. Otherwise, less than 95%, you need to adjust the important parameters, less than 90% may be to add db_cache_size. A high hit rate, does not necessarily mean that the performance of the system is optimal, such as a large number of non-selective indexes are frequently accessed, will result in a high rate of the false (a large number of DB file sequential read), but a relatively low hit rate, will generally affect the performance of the system, Need to be adjusted. The mutation of the hit rate is often a bad message. If the hit rate suddenly increases, you can check the top buffer get SQL to see the statements and indexes that cause a lot of logical reads, and if the hit rate suddenly decreases, you can check the top physical reads SQL to check the statements that generate a lot of physical reads. The main ones are those that are not indexed or are deleted.
Redo nowait indicates that there is no waiting scale for buffer in the log buffer. If it is too low (refer to the 90% threshold), consider increasing the log BUFFER. When the redo buffer reaches 1M, it is necessary to write to the redo log file, so generally when the redo buffer is set above 1M, it is unlikely that there is a situation waiting for buffer space allocation. Currently, the redo buffer, which is generally set to 2M, should not be a large value for the total amount of memory.


The library hit represents the rate at which Oracle retrieves a parsed SQL or PL/A statement from the library cache, and when an application invokes a SQL or stored procedure, Oracle checks the library cache to determine if there is a resolved version. If present, Oracle executes the statement immediately, and if it does not exist, Oracle resolves the statement and assigns it a shared SQL zone in the library cache. Low library hit ratio can lead to excessive parsing, increased CPU consumption, and reduced performance. If the library hit ratio is below 90%, you may need to increase the shared pool area. Statement the hit rate in the shared area, usually should be kept above 95%, otherwise need to consider: increase the sharing pool, use binding variables, modify cursor_sharing and other parameters.
Latch Hit:latch is a lock that protects the memory structure and can be considered a license for the server process to obtain access to the memory data structure. To ensure latch hit>99%, this means that the shared pool latch contention, possibly due to unshared SQL, or the library cache is too small to be resolved with a binding change or a large shared pool. To ensure >99%, there are serious performance issues. When there is a problem with this value, we can use the wait time and latch analysis to find out the problem.
Parse CPU to parse ELAPSD: Parse actual run time/(parse actual run time + wait for resource time in parsing), the higher the better. The calculation formula is: Parse CPU to parse elapsd%= 100* (Parse time cpu/parse time elapsed). That is: Parse actual run time/(parse actual run time + wait resource time in parsing). If the ratio is 100%, it means that the CPU waits at 0, without any waiting time.
Non-parse Cpu:sql Actual run time/(SQL actual run time +sql parsing time), too low means that parsing consumes too much time. The calculation formula is:% Non-parse CPU
=round (100*1-PARSE_CPU/TOT_CPU), 2). If this value is smaller, it means that parsing consumes too much CPU time. Compared with PARSE_CPU, if the tot_cpu is very high, this ratio will be close to 100%, which is good, which means that most of the work performed by the computer is the work of executing the query, not the work of analyzing the query.
Execute to Parse: is the proportion of statement execution and analysis, which is very high if you want the SQL reuse rate to be high. The higher the value, the more times it is repeated after a resolution. The calculation formula is: Execute to Parse =100 * (1-parses/executions). In this example, a parse is required for almost 5 times per execution. So if the system parses > executions, the ratio of less than 0 may occur. This value <0 usually indicates a problem with shared pool settings or statement efficiency, causing repeated parsing, reparse may be more severe, or may be related to snapshot, often indicating a problem with database performance.
In-memory Sort: The rate of sorting in memory, if too low, indicates that there is a large number of sorts in the temporary tablespace. Consider adjusting the PGA (10g). If less than 95%, can be resolved by suitably tuning the initialization parameters Pga_aggregate_target or sort_area_size, note that the two parameters set the scope of the action is different, Sort_area_size is set for each session, Pga_aggregate_target the hour hand to all the sesion.
Soft Parse: The percentage of soft parsing (softs/softs+hards), approximately as the hit rate of SQL in the share, too low to adjust the application using bound variables. SQL hit ratio in the share, less than <95%, need to consider binding, if less than 80%, then you can think that SQL is basically not reused.

Memory Usage%: For a database that has been running for a period of time, the shared pool RAM usage should be stable between 75% and 90%, if it is too small, it means that the shared pool is wasted, and if it is higher than 90, there is contention in the shared pool and insufficient memory. This number should be stable for a long time in 75%~90%. If this percentage is too low, it indicates that the shared pool settings are too large to incur an additional administrative burden, resulting in performance degradation under certain conditions. If this percentage is too high, the components outside the shared pool will be aged, and if the SQL statement is executed again, this will cause the SQL statement to be parsed hard. In a system of the right size, the utilization of the shared pool will be within the range of 75% to just under 90%.
SQL with executions>1: The SQL ratio that executes more than 1, if this value is too small, indicates that you need to use the binding variable more in your app to avoid too much SQL parsing. In a system that tends to circulate, this number must be carefully considered. In this circulatory system, a different set of SQL statements are executed in part of the day relative to the other part of the time. In a shared pool, there will be a set of SQL statements that have not been executed during the observation, just because the statement to execute them is not running during observation. This number is close to 100% only if the system runs the same set of SQL statements consecutively.
Memory for SQL W/exec>1: The percentage of SQL consumed by execution times greater than 1. This is a measure of how much memory is consumed by frequently used SQL statements compared to infrequently used SQL statements. This number will be very close to the% SQL with executions>1 in general, unless there are some query tasks that consume no regular memory. In a stable state, it is generally seen that over time a shared pool of about 75%~85% is used. If the time window of the Statspack report is large enough to cover all cycles, the percentage of SQL statements that execute more times than once should be close to 100%. This is a statistic that is affected by the duration of the observation.  It can be expected to increase with the length of time between observations. Summary: With Oracle's instance validation statistics, we can get a general impression, but we can't determine the performance of the data run. The current performance problem is determined, we mainly rely on the following waiting events to confirm. We can understand this two parts of the content, hit statistics help us to identify and predict some of the system will produce performance problems, so we can do a rainy day. The wait event indicates that the current database has a performance problem that needs to be addressed, so it is the nature of the mend.

  

This is the last section of the report summary, which shows the worst 5 waits in the system, sorted by the percentage of waiting time taken. When we tune, we always want to observe the most significant effect, so we should start here to determine what we do next. For example, if ' buffer busy wait ' is a more serious wait event, we should continue to study the contents of the buffer wait and file/tablespace IO areas in the report and identify which files are causing the problem. If the most severe wait event is an I/O event, we should study the physical read
Sorts the SQL statement area to identify which statements are performing large amounts of I/O, and to investigate files that tablespace and I/O areas observe slower response times. If there is a higher latch wait, you need to look at the detailed latch statistics to identify which latch problems arise. A well-performing system, CPU time should be in front of top 5, otherwise your system will spend most of it waiting. Here, log file parallel write is a relatively more wait, taking up 7% of the CPU time. Typically, in a database without problems, the CPU time is always listed first. See the Wait Events section of this report for a more waiting event.






AWR Report-Database profile information (i)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.