Sei sulla pagina 1di 2

Document 1332738.

1 Page 1 of 2

How to correct performance issues with enq: US - contention related to undo segments
(Doc ID 1332738.1)
Modified: May 29, 2014 Type: TROUBLESHOOTING

In this Document

Purpose
Troubleshooting Steps
References

APPLIES TO:

Oracle Database - Enterprise Edition - Version 9.2.0.1 and later


Information in this document applies to any platform.

PURPOSE

Assist in correcting performance issues related to "enq: US Contention" on undo segments.

You have many offline undo segments and the workload starts to online many undo segments over a short
period of time. This can lead to high 'latch: row cache objects' contention may be seen on
DC_ROLLBACK_SEGMENTS together with high 'enq: US - contention' waits when using system managed undo
with an auto tuned undo retention period.

Sessions attempting to online undo segments should show ktusmous_online_undoseg() in their call stack.

Another aspect of the problem can be due to long running queries which can raise tuned_undoretention to very
high values and exhausts the undo tablespace resulting in ORA-1628.

A real world example: a query is being executed and some rows are fetched from the cursor and then the user
stops working on that query (e.g. does not press the "next" button on the application screen) and works on
something else (e.g. in a different window). After some time the user continues working on the query ... auto-
tune starts tracking the query from this point and the maxquerylen is quite large now, hence also the
tuned_undoretention (that depends directly on the maxquerylen).

Note: The Siebel application can allow for this problem to happen.

TROUBLESHOOTING STEPS

The wait event "enq: US Contention" is associated with contention on the latch in the row cache
(dc_rollback_seg). Enqueue US - Contention can become a bottle-neck for performance if workload dictates that
a lot of offlined undo segments must be onlined over a short period of time. The latch on the row cache can be
unable to keep up with the workload.

This can happen for a number of reasons and some scenarios are legitimate workload demands.

Solution: ensure that peaks in onlined undo segments do not happen (see workaround #2). That is not always
feasible.

https://support.oracle.com/epmos/faces/DocContentDisplay?_adf.ctrl-state=yu8pgc808_114... 5/9/2015
Document 1332738.1 Page 2 of 2

Workarounds:

1. Bounce the instance.


2. Setting _ROLLBACK_SEGMENT_COUNT to a high number to keep undo segments online:
ALTER SYSTEM SET "_rollback_segment_count"=<n>;

Note: In databases with high query activity, particularly parallel query and a high setting for
_ROLLBACK_SEGMENT_COUNT, you can expect to see wait contention on the row cache for
DC_ROLLBACK_SEGS. It is highly recommended in these environments where setting
_ROLLBACK_SEGMENT_COUNT to a high value (10s of thousands and higher) apply the patch for
Bug:14226599. This will increase the hash buckets on the DC_ROLLBACK_SEGS row cache to help
alleviate latch contention.

3. Set _UNDO_AUTOTUNE to FALSE:


ALTER SYSTEM SET "_undo_autotune" = false;

Note: Simply using _SMU_DEBUG_MODE=33554432 may not be enough to stop the problem, but
valid fix for Bug:5387030.

4. A fix to Bug:7291739 is to set a new hidden parameter, _HIGHTHRESHOLD_UNDORETENTION to set a


high threshold for undo retention completely distinct from maxquerylen:
ALTER SYSTEM SET "_highthreshold_undoretention"=<n>;

Note: For 11.1.0.6 & 11.1.0.7: use _first_spare_parameter instead

If problems persist, please file a Service Request with Oracle Support.

REFERENCES

NOTE:742035.1 - Contention Under Auto-Tuned Undo Retention


BUG:12652689 - HIGH ENQ: US - CONTENTION AFTER UPGRADE TO 11.1.0.7.5
NOTE:7291739.8 - Bug 7291739 - Contention with auto-tuned undo retention or high
TUNED_UNDORETENTION
BUG:7279902 - US ENQUEUE CONTENTION OCCURS DUE TO WAITING FOR "GC CURRENT REQUEST"
BUG:7291739 - CONTENTION UNDER AUTO-TUNED UNDO RETENTION
BUG:9557199 - MASSIVE WAITS FOR 'ENQ: US - CONTENTION' AND ROW CACHE LOCK IN STRESS TEST
NOTE:5387030.8 - Bug 5387030 - Automatic tuning of undo_retention causes unusual extra space allocation

Didn't find what you are looking for?

https://support.oracle.com/epmos/faces/DocContentDisplay?_adf.ctrl-state=yu8pgc808_114... 5/9/2015

Potrebbero piacerti anche