Professional Documents
Culture Documents
Performance Tuning
[next]
[next]
[next]
By default, the data within those sections get refreshed once every
one minute. You can control the refresh frequency period from the
drop list in the upper right corner of the EM Express window.
[zoom]
[zoom]
Each tab contains a chart. In all the charts of the EM express, they
present their statistics using Stacked Column charts.
With this type of charts, the values are represented using attached
colored bars. Each bar is read by its thinkness. The thicker the
bar, the more is its value.
The horizontal axe is a time axe for the past hour. So, this chart
displays the activity workload for only the past one hour. If you
need to analyze performance data that is older than one hour ago,
you need to change this view. You will see how later.
[shift]
This chart has basically three graphs: the green graph, which
represents the CPU consumption from all the sessions...
the blue graph, which represent the I/O activities from all the
sessions...
and the brown graph, which represents the total wait time by all
the sessions.
The total of the CPU consumption, I/O processing, and wait time
levels represent the entire processing time... which means the
total of their percentage values is one hundred.
The blue graph is the I/O activity. In my case, the blue graph
height is very tiny compared to the CPU height... which means it
represents a small fraction of the total database activity. I will
show you soon how to precisely measure its overhead level.
The third graph is the total wait graph. So, in my case, the wait
activity is nearly the same or slightly more than the CPU activity.
When the system is heavily loaded, the total wait time per minute
may become more than the CPU load. In this case, the wait graph
may exceed the red line... and in this case, the maximum value of
the vertical axe increases accordingly.
So, in conclusion, what we get from this chart is the total database
CPU load and the total database wait time per minute in the past
hour.
This is similar to what we get from the Time Model. Over there, the
total DB time is the summation of the DB CPU and the total Wait
time. What is added over here is the total I/O activity time.
In my case, at 10:44 pm, the total CPU load is 0.43 seconds. This
represents 52.13% of the total DB time.
When I moved the cursor to the top of the wait time graph, it
reported that the total wait time is 0.30 seconds, which represents
46.78% of the total DB time.
Now, if I add the total CPU percentage to the total wait time
percentage, the result will be 99%. The remaining 1% must be the
total I/O processing time at that specific time.
and the CPU time is 1.58 seconds. Obviously this is not a very
healthy situation.
The CPU graph displays the percentage of CPU time used by the
database instance and other processes during the last minute.
If you hover the mouse cursor to the top of the graph...
[next]
... it will display the value of the bar... and how the total CPU
consumption is divided by the foreground and background
processes.
Let's run a piece of code that consumes a lot of CPU power and
see how it may affect the graph.
declare
I will wait for a couple of minutes to see the code impact on the
graph.
If you hover the mouse cursor on the top of the CPU graph in the
“Active Sessions” chart...
[next]
... the CPU value is 1.19. This is 67.61% of the total processing
time in this chart. Now, hover the mouse cursor in the last reading
of the CPU graph in the Activity Class chart.
[next]
You can also hover the mouse pointer on the legend boxes as well.
The next chart displays the database data file types and their
sizes. Again, if you hover the mouse pointer on any graph bar, the
size of the file type is displayed.
The last chart in the EM Express home page is the SQL Monitor
chart. This section displays up to maximum 20 monitored SQL
statements.
[next]
In the Performance Hub page, you can view performance data for
a specified time period.
From this page, you can select from viewing real-time data or
historical data.
In the timeline bar, we can see the timepicker. Use it to select any
time range from within this time line. The default selection is the
past 5 minutes.
Click on the middle of the window and pull the window over to an
interesting time period of activity.
[next]
Use the handles on the left and right edges of the timepicker
window to change the window time period length.
[next]
Notice the grayed areas change in the charts to match the window
slider.
Let's have a deeper look into the the performance hub page
components.
The summary tab has four charts... they are named as Host
Runnable Processes, Memory, Active Sessions, and I/O.
In all the charts in this tab, you cannot drill down into their details.
This tab displays only summary statistics. They help you to know if
there is an issue that requires diagnosis.
The Host Runnable Processes chart displays the Load Average
and the CPU processing.
In the home page, we've seen the total instance CPU overload...
over here, the CPU load is divided by the process types:
foreground CPU, background CPU, and other host CPU.
[next]
The green graph shows the Foreground CPU usage per second.
[next]
The orange line is the total number of CPU cores in the system.
[next]
The red graph represents the total Load Average. This represents
everything: the DB CPU and the Wait time. I am not sure if the I/O
processing is counted in this graph or not.
[next]
If you mark the check box "Show host memory", the chart axe will
be scaled up to the maximum memory size in the host machine.
The nice thing about this chart, it shows the history of SGA
component sizes along the past one hour period. If you notice a
large jump in one area, it may trigger you to perform more
investigation.
The next chart is the Active Sessions chart. This chart is similar
to the Active Sessions chart that we saw in the home page. It
displays the current load on the database and how it is distributed
between the activity types and waits.
However, this chart provides more details that the one in the home
page. This chart allows us to apply a simple filter.
[next]
The first drop list allows you to change the view of the graph to
show the activity type or the services.
[next]
The second drop list allows you to display the statistics for the
foreground processes or foreground and background processes.
The next chart displays statistics about I/O activities. This chart is
useful to measure the load and efficiency of the database storage
system.
By default, it displays its figures by the number of requests per
second. You can change this measurement unit using the first drop
list in the chart.
[next]
[next]
The breakdown drop list can be changed to i/o type, i/o function or
i/o consumer group.
This tab has three charts. The first chart is similar to the active
sessions chart in the summary tab.
By default, the other two charts display the top SQL statements
and the top sessions respectively for the selected time period.
But for all those three charts, you can change the chart breakdown
data. This can be done by the drop list that is associated with each
chart.
Use the first chart to figure out which area requires your attention.
Use the other two charts to obtain more details about the area that
you're troubleshooting.
[click on the first drop list and select Top Dimensions]
I can change the chart to display the top specific dimensions. You
can select from the following dimensions: Wait Class, Wait event,
Instances, services, modules, actions, user sessions, and SQL ID.
For example, I will change the data of the top chart to wait events.
It’s common to look at the top wait events in performance
troubleshooting investigations.
[next]
Now I will change the second graph to display the top PL/SQL,,
probably because I know the culprit code is a PL/SQL code.
[next]
[next]
[next]
[next]
... you will see a page that provides full details and statistics about
the selected SQL statement. Including the execution plans used to
execute the statements.
Observe that you cannot delete the SQL ID filter. This is because
all the tabs now describe activity for that specific SQL ID.
This is the same charts as the ones you see in the Performance
Hub page.. but their contents are filtered by only the select
statement.
Over here, you see the execution plan of the selected statement.
The execution plan is displayed in a graphical layout... which
makes it easy for you to read its operations. Viewing SQL
statement execution plans in this view is much easier than viewing
them using the command line SQL*plus utility.
Under the Plan Control tab, you will see the components that are
related to the optimizer execution plans... like SQL Profiles and
Patches and SQL Plan Baselines. Those components are part of
SQL tuning topic.
[ Activity tab ]
Let's select the top session that was responsible for the load in the
selected period.
[next]
You will see sections that describe the connection to server, client
process, activity, and monitored SQL statement that is being
executed by the session.
[click on activity tab]
Under the activity tab, you will see the same charts that you saw
in the Performance Hub page... but their contents are filtered by
only the selected session.
[click on Metrics]
Under the Metrics tab, you will see metrics figures for the selected
sessions.
[workload tab]
As its name indicated, this tab displays statistics that describe the
workload on the database.
The first chart in the page displays workload profile. This chart
could display the workload statistics for the User Calls, Parse calls,
Redo Size, and SQL*Net.
Under the "user calls", you can get important performance metrics
like the number of user calls per second, number of executions per
second, and number of transactions per second.
As is the case with all the charts in EM Express, if you hover the
mouse pointer on the graph line, it displays its value at that point.
Observe those figures are not absolute statistics since last instance
startup. They are metrics... which mean specific statistics per
second.
The second chart allows you to display three statistics: logon rate,
current logons, Open Cursors.
[next]
[next]
Over here, you will see a list of the monitored SQL statements. We
have seen in an earlier lecture how to navigate into the monitored
SQL statements in EM Express. Allow yourself to refresh your
memory about it, if you want to.
These statistics are obtained from the AWR data dictionary views,
not from the V$ views. That's why the view is a little bit different
from the real time panels that we've seen so far.
Observe that the Time Picker ribbon scale has changed. You can go
through the history of the performance statistics.
Again, as you move the time picker along the time scale, the
charts are automatically updated.
[do it]
The "Wait Events" chart allows to select which Wait Class you want
to display in the chart.
In addition to that, you can select which metrics the chart should
display.
[do it]
The Activity tab contains charts that are similar to the charts in the
Activity tab when displaying real-time statistics.
[click on the first drop list -> Top Dimensions]
Again, you can modify the chart to display the top list of
dimensions based on your requirement.
Database Time tab displays the Time Model chart. You can select
to display the percentage DB Time values of the absolute DB Time
values.
From this chart, we can know the changes on the time model
across the AWR time history.
Resources Tab contains two charts. The first one allows you to
display the per cent CPU or the Load. Per cent CPU values are
broken down to System CPU, W I O, and User CPU.
You can select from the wide range of system statistics. To me,
this is more convenient that listing those statistics from the V$
view because the statistics are grouped by their functions.
The second chart allows you to display from the same list of
statistics.
I urge you to get yourself familiar with it. Try to apply some
testing stress on the VM database: CPU stress, I/O stress, blocking
sessions, SQL statement bottlenecks, latches and so on. Then try
troubleshooting the bottleneck using EM Express.
Thanks guys for staying with me. See you in the next lecture.