Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
oracle_exadata_monitoring [2020/12/01 10:40] – created andonovj | oracle_exadata_monitoring [2020/12/04 16:20] (current) – andonovj | ||
---|---|---|---|
Line 1: | Line 1: | ||
=====Overview===== | =====Overview===== | ||
- | ====Scripts===== | + | =====Scripts===== |
Scripts that are specific to exadata monitoring: | Scripts that are specific to exadata monitoring: | ||
- | <sxh> | + | ====Cell Usage==== |
+ | <Code:bash> | ||
select a.name, b.value/ | select a.name, b.value/ | ||
from v$sysstat a, v$mystat b | from v$sysstat a, v$mystat b | ||
Line 12: | Line 13: | ||
'cell IO uncompressed bytes' | 'cell IO uncompressed bytes' | ||
or a.name like 'cell phy%' | or a.name like 'cell phy%' | ||
- | </sxh> | + | |
+ | SQL> select a.name, b.value from v$sysstat a, v$mystat b | ||
+ | 2 where a.statistic# | ||
+ | 3 (a.name like ' | ||
+ | 4 or a.name like 'cell phy%' | ||
+ | 5 or a.name like ' | ||
+ | 6 or a.name like ' | ||
+ | |||
+ | NAME | ||
+ | ---------------------------------------------------------------- ---------- | ||
+ | physical read total IO requests | ||
+ | physical read total multi block requests 20 | ||
+ | physical read requests optimized | ||
+ | physical read total bytes optimized | ||
+ | physical read total bytes | ||
+ | cell physical IO interconnect bytes | ||
+ | cell physical IO bytes saved during optimized file creation | ||
+ | cell physical IO bytes saved during optimized RMAN file restore 0 | ||
+ | cell physical IO bytes eligible for predicate offload | ||
+ | cell physical IO bytes saved by storage index | ||
+ | cell physical IO bytes sent directly to DB node to balance CPU 0 | ||
+ | |||
+ | NAME | ||
+ | ---------------------------------------------------------------- ---------- | ||
+ | cell physical IO interconnect bytes returned by smart scan | ||
+ | cell physical IO bytes saved by columnar cache | ||
+ | cell physical write bytes saved by smart file initialization | ||
+ | cell flash cache read hits | ||
+ | cell physical write IO bytes eligible for offload | ||
+ | cell physical write IO host network bytes written during offloa 0 | ||
+ | |||
+ | 17 rows selected. | ||
+ | </Code> | ||
+ | |||
+ | ====Flash Cache Content==== | ||
+ | To see if an object is in the flash cache, we have to know its: | ||
+ | |||
+ | * object number | ||
+ | * Tablespace number | ||
+ | * Database name | ||
+ | |||
+ | < | ||
+ | SQL> @/ | ||
+ | SQL> select owner, object_name, | ||
+ | 2 statistic_name, | ||
+ | 3 from v$segment_statistics | ||
+ | 4 where owner=' | ||
+ | 5 and statistic_name=' | ||
+ | |||
+ | OWNER OBJECT_NAME | ||
+ | ----- -------------------- | ||
+ | SH CUSTOMERS | ||
+ | </ | ||
+ | |||
+ | once we have that, we can check in the call using the CellCli: | ||
+ | |||
+ | < | ||
+ | CellCLI> list flashcachecontent where objectnumber=20473 and tablespacenumber=7 and dbuniquename=DBM detail | ||
+ | cachedKeepSize: | ||
+ | cachedSize: | ||
+ | cachedWriteSize: | ||
+ | columnarCacheSize: | ||
+ | columnarKeepSize: | ||
+ | dbID: 2080757153 | ||
+ | dbUniqueName: | ||
+ | hitCount: | ||
+ | missCount: | ||
+ | objectNumber: | ||
+ | tableSpaceNumber: | ||
+ | CellCLI> | ||
+ | </ | ||
+ | |||
+ | Furthermore, | ||
+ | |||
+ | < | ||
+ | [celladmin@qr01celadm01 ~]$ dcli -c qr01celadm01, | ||
+ | qr01celadm01: | ||
+ | qr01celadm01: | ||
+ | qr01celadm01: | ||
+ | qr01celadm01: | ||
+ | qr01celadm01: | ||
+ | qr01celadm01: | ||
+ | qr01celadm01: | ||
+ | qr01celadm01: | ||
+ | qr01celadm01: | ||
+ | qr01celadm01: | ||
+ | qr01celadm01: | ||
+ | qr01celadm02: | ||
+ | qr01celadm02: | ||
+ | qr01celadm02: | ||
+ | qr01celadm02: | ||
+ | qr01celadm02: | ||
+ | qr01celadm02: | ||
+ | qr01celadm02: | ||
+ | qr01celadm02: | ||
+ | qr01celadm02: | ||
+ | qr01celadm02: | ||
+ | qr01celadm02: | ||
+ | qr01celadm03: | ||
+ | qr01celadm03: | ||
+ | qr01celadm03: | ||
+ | qr01celadm03: | ||
+ | qr01celadm03: | ||
+ | qr01celadm03: | ||
+ | qr01celadm03: | ||
+ | qr01celadm03: | ||
+ | qr01celadm03: | ||
+ | qr01celadm03: | ||
+ | qr01celadm03: | ||
+ | </ | ||
+ | |||
+ | In total is 477, just like the SQL query. | ||
+ | |||
+ | ====Smart Scan==== | ||
+ | We can see if a query is using the Smart Scan capabilities of the exadata by observing the execution plan: | ||
+ | |||
+ | < | ||
+ | SQL> connect sh/sh | ||
+ | Connected. | ||
+ | SQL> set autotrace on explain | ||
+ | SQL> | ||
+ | SQL> set timing on | ||
+ | SQL> select count(*) from cust_info where occupation = ' | ||
+ | |||
+ | COUNT(*) | ||
+ | ---------- | ||
+ | | ||
+ | |||
+ | Elapsed: 00: | ||
+ | |||
+ | Execution Plan | ||
+ | ---------------------------------------------------------- | ||
+ | Plan hash value: 1273666552 | ||
+ | |||
+ | ---------------------------------------------------------------------------------------- | ||
+ | |||
+ | | Id | Operation | ||
+ | |||
+ | ---------------------------------------------------------------------------------------- | ||
+ | |||
+ | | 0 | SELECT STATEMENT | ||
+ | |||
+ | | 1 | SORT AGGREGATE | ||
+ | |||
+ | |* 2 | TABLE ACCESS STORAGE FULL| CUST_INFO | | ||
+ | |||
+ | ---------------------------------------------------------------------------------------- | ||
+ | |||
+ | |||
+ | Predicate Information (identified by operation id): | ||
+ | --------------------------------------------------- | ||
+ | |||
+ | 2 - storage(" | ||
+ | | ||
+ | |||
+ | SQL> set autotrace off | ||
+ | SQL> | ||
+ | </ | ||
+ | |||
+ | As you can see above, the query is using the: "TABLE ACCESS STORAGE FULL" which is a sign of using the Smart Scan capabilities. | ||
+ | Other indication is the wait time statistics: | ||
+ | |||
+ | < | ||
+ | SQL> @/ | ||
+ | SQL> SELECT DISTINCT event, total_waits, | ||
+ | 2 time_waited/ | ||
+ | 3 FROM V$SESSION_EVENT e, V$MYSTAT s | ||
+ | 4 WHERE event LIKE ' | ||
+ | |||
+ | EVENT TOTAL_WAITS | ||
+ | ---------------------------------------------------------------- ----------- ---------- ------------- | ||
+ | cell single block physical read 93 | ||
+ | cell smart table scan 190 | ||
+ | |||
+ | Elapsed: 00: | ||
+ | SQL> | ||
+ | </ | ||
+ | |||
+ | As you can see, the "Cell smart Table scan" takes the majority of the time. (2.59 seconds out of 2.80 seconds) | ||
+ | |||
+ | < | ||
+ | SQL> col event format a35 | ||
+ | SQL> select event, total_waits, | ||
+ | 2 time_waited/ | ||
+ | 3 from v$system_event where event like ' | ||
+ | |||
+ | EVENT | ||
+ | ----------------------------------- ----------- ---------- ------------- | ||
+ | cell smart table scan | ||
+ | cell statistics gather | ||
+ | cell smart file creation | ||
+ | cell single block physical read 13292 41.39 | ||
+ | cell multiblock physical read | ||
+ | cell list of blocks physical read | ||
+ | |||
+ | 6 rows selected. | ||
+ | |||
+ | Elapsed: 00: | ||
+ | SQL> | ||
+ | </Code> |