10.07.2015 Views

Expert Oracle Exadata - Parent Directory

Expert Oracle Exadata - Parent Directory

Expert Oracle Exadata - Parent Directory

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

CHAPTER 7 RESOURCE MANAGEMENTStep 6: Execute a Query from the RJOHNSON SessionNext, we’ll execute a long-running, CPU-intensive query, from the interactive RJOHNSON session. This isthe same query we used for the load test in Step 3.RJOHNSON:SCRATCH> select a.col2, sum(a.col1)from rjohnson.skew a,rjohnson.skew bgroup by a.col2;Step 7: Examine the Session Trace FileSince our resource plan is not active yet, we don’t see any Resource Manager wait events in the trace fileat this point.[enkdb02:rjohnson:SCRATCH]> tail -5000f SCRATCH_ora_2691_RJOHNSON.trc | grep 'resmgr:cpu quantum'Step 8: Activate Resource ManagerNow, while the load test is still running, let’s enable DBRM by setting the active resource plan to ourDAYTIME plan. When the resource plan is activated, our resource mapping rules should engage and switchthe running sessions to their respective consumer groups.SYS:SCRATCH> alter system set resource_manager_plan='DAYTIME';Step 9: Check Consumer Group AssignmentsNow, let’s run that query again and see what our consumer group assignments look like.SYS:SCRATCH> SELECT s.username, s.resource_consumer_group, count(*)FROM v$session s, v$process pWHERE ( (s.username IS NOT NULL)AND (NVL (s.osuser, 'x') 'SYSTEM')AND (s.TYPE 'BACKGROUND') )AND (p.addr(+) = s.paddr)AND s.username not in ('SYS','DBSNMP')GROUP BY s.username, s.resource_consumer_groupORDER BY s.username;194

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!