Professional Documents
Culture Documents
part 1
./oratop -f -d -i 10 / as sysdba
Then you can put sql_id to see the execution plan as well.
For A.
For B
Section 1 - database
Global Database information
Version : Oracle major version
role : database_role
db name : db_unique_name
time [s]: time as of the most recent stats
(hh24:mi:ss)
up [T]: database uptime
ins [N]: total number of instance(s)
sn [c,N]: total user sessions (active/inactive)
us [c,N]: number of distinct users
mt [s,N]: global database memory total (sga+pga)
fra [N]: flashback recovery area %used, (red >
90%)
er [N]: diag active problem count (faults)
% db [s,N]: database time as %(dbtime/cpu) (red if
> 99%)
Section 2 - instance
Top 5 Instance(s) Activity
o Ordered by Database time desc
ID [c,N]: inst_id (instance id)
%CPU [m,N]: host cpu busy %(busy/busy+idle). (red if
> 90%)
LOAD [m,N]: current os load. (red if > 2*#cpu &
high cpu)
%DCU [m,N]: db cpu otusef as %host cpu. (red if >
99% & high AAS)
AAS [s,N]: Average Active Sessions. (red if >
#cpu)
ASC [c,N]: active Sessions on CPU
ASI [c,N]: active Sessions waiting on user I/O
ASW [c,N]: active Sessions Waiting, non-ASI (red if
> ASC+ASI)
ASP [m,N]: active parallel sessions (F/G)
AST [c,N]: Active user Sessions Total (ASC+ASI+ASW)
UST [c,N]: user Sessions Total (ACT/INA)
MBPS [m,N]: i/o megabytes per second (throughput)
IOPS [m,N]: i/o requests per second
IORL [m,T]: avg synchronous single-block read latency.
(red > 20ms)
LOGR [s,N]: logical reads per sec
PHYR [s,N]: physical reads per sec)
PHYW [s,N]: physical writes per sec
%FR [s,N]: shared pool free %
PGA [s,N]: total pga allocated
TEMP [s,N]: temp space used
UTPS [s,N]: user transactions per sec
UCPS [c,m,N]: user calls per sec
SSRT [c,m,T]: sql service response time (T/call)
DCTR [m,N]: database cpu time ratio
DWTR [m,N]: database wait time ratio. (red if > 50
& high ASW)
%DBT [s,N]: instance %Database Time (e.g. non-rac
shows 100%)
Section 3 - db wait events
Top 5 Timed Events
o Cluster-wide, non-idle
o Ordered by wait time desc
EVENT : wait event name. (red if active)
(RT) : Real-Time mode
WAITS : total waits
TIME(s) : total wait time in seconds)
AVG_MS : average wait time in milliseconds
PCT : percent of wait time (all events)
WAIT_CLASS : name of the wait class
Section 4 - process
o Non-Idle processes
o Ordered by event wait time desc
ID [N]: inst_id. (red if blocking)
SID [N]: session identifier. (red if blocking)
SPID [N]: server process os id
USERNAME : Oracle user name
PROGRAM : process program name
SRV : SERVER (dedicated, shared, etc.)
SERVICE : db service_name
PGA [N]: pga_used_mem. (red if continuously
growing)
SQL_ID/BLOCKER : sql_id or the final blocker's (inst:sid,
in red)
OPN : operation name, e.g. select
E/T [T]: session elapsed time (active/inactive)
STA : ACTive|INActive|KILled|CAChed|SNIped
STE : process state, e.g. on CPU or user I/O or
WAIting
WAIT_CLASS : wait_class for the named event
EVENT/*LATCH : session wait event name. Auto toggle with
*latch name.
(red if process is hung/spin)
W/T [T]: event wait time. (red if > 1s)
For B:-
We had 20 CPU,so our all 10 jobs are running (Status :-R means
Running).Also note 44.4 % CPU is used because out of 20 CPU we
are using 10 CPU.Hence there is 50% idle CPU.
4.VMSTAT report
For A:-
For B:-
5.The table size after 10
jobs completed.
SQL> select bytes/1024/1024/1024 from dba_segments where
segment_name=’T’;
BYTES/1024/1024/1024
——————-
7.375
B.Load Profile
For A:-
For B:-
DB Time:-No of active sessions average during snapshot
period.This is derived by DB time/Elapsed time in
previous section.If the number his high,then probably
many active session are there in database on particular
point which may indicate bottleneck or opportunity to
deep analysis.
For B:
sql execute elapsed time is 60%.That means DB spent 60% time of DB_TIME is executing
SQL query
which is OK for now .
DB CPU is used 20% of DB_TIME.
Now We can see PL/SQL execution elapsed time is 11% means many PL/SQL procedure is
being executed.
You can see which PL/SQL executed in SQL ordered by Elapsed Time.
Parse time elapsed and hard parse elapsed time is less which is good sign.If there
are bigger,we
need to check why query is taking more time to parse.
For B:-
Buffer Nowait %:-Less than 99 percent may indicate a
problem . This value is the ratio of hits on a request
for a specific buffer where the buffer was immediately
available in memory. If the ratio is low, then there
are (hot) blocks being contented for that should be
found in the Buffer Wait section.
For B:-
This is one of the most important section.You must be
concerned if any wait event take abnormally high %DB
time apart for DB CPU.If DB CPU is high like 80%,then
your application is CPU bound.
The log file parallel write shows LGWR is waiting for blocks to be written to all
online redo log members in one group. LGWR will wait until all blocks have been
written to all members. So here we had 80% of background total time spent on log
file parallel write. The parameter of interest here is Avg wait (ms). In our case
it is 1ms which is a perfectly respectable figure. Obviously larger average wait
times point to slower I/O subsystem or poor I/O configurations.As a rule of thumb,
an average time for ‘log file parallel write’ over 20 milliseconds suggests a
problem with IO subsystem.
Another thing is log file parallel write is background wait event of log file
sync.You need to check if large commit
is happening in “user commits” section of “Instance Activity Stats”
G.Host CPU
For A:-
For B:-
Host CPU
Here you can notice %user is 84%.This really gives you
sign that your CPU are highly used.Load average 2.77
(after execution completed) means you are having
average 3 sessions running at one time and other 7
sessions are waiting for CPU.But most of the time load
average was around 10 (refer oratop and vmstat) as
there was 10 sessions running all the time during
snapshot period.
Instance CPU
%Total cpu indicates that Database is using 82.6 % cpu
of total CPU of the database server. This indicates
there are not many other database’s process running
currently.If you see less value here it may indicates
the database server total cpu may be used by other
application or database instances.
H.IO Profile
For A:-
For B:-
Here Total requests:=Database requests + Redo
requests=1046+322=1381(around) which is actually IOPS.
I.Memory Statistics
For A:-
For B:-
For B:-