WAITEVENT: "read by other session" Reference Note (Doc ID 732891.1)



Click to add to FavoritesTo BottomTo Bottom

"read by other session" Reference Note

This is a reference note for the wait event  "read by other session" which includes the following subsections: See  Note:61998.1 for an introduction to Wait Events.

Definition:

  • Versions: 10.1 - 12.1
    Documentation: 
    12.1 11.2 11.1 10.2 10.1 

  • This wait event occurs when we are trying to access a buffer in the buffer cache but we find that the buffer is currently being read from disk by another user so we need to wait for that to complete before we can access it. In previous versions, this wait was classified under the "buffer busy waits" wait-event. However, in Oracle 10.1 and higher, the wait time is now broken out into the "read by other session" wait event.

Individual Waits:

  Parameters:
  Wait Time:
The session will keep timing-out/waiting until it acquires the buffer.
  Finding Blockers:
The blocking session for an individual wait can usually be found using the "BLOCKING_SESSION" column of V$SESSION for the waiting (blocked) session.
eg:
SELECT SID mySID, blocking_session, 
       p1 "FILE#", p2 "BLOCK#", p3 "class#", row_wait_obj# OBJECT_ID
  FROM v$session
 WHERE event = 'read by other session'
   AND STATE='WAITING'
;

Usually the file#/block# waited on will be changing over time.

The "ROW_WAIT_OBJ#" (OBJECT_ID) may not always be populated. You can check the segment involved by running the following query using the FILE (P1) and BLOCK (P2) from the wait:

SELECT relative_fno, owner, segment_name, segment_type 
  FROM dba_extents
 WHERE file_id = &FILE
   AND &BLOCK BETWEEN block_id AND block_id + blocks - 1
;

If sessions stay stuck waiting for a specific block then investigate the blocking session - eg: it may be stuck in a read operation at OS level.

Systemwide Waits:

To find more information:
  • Use ADDM and ASH reports for advice and information about sessions and SQL involved.
  • Check the "Buffer Wait Statistics" section of AWR reports for details of block classes causing waits.
  • The "Buffer Waits" columns of Tablespace and File information in AWR reports helps show where the waits are occurring, but be aware that these figures also include "buffer busy waits".
  • Check if these same tablespace/file/s show excessive IO or poor IO performance.

Reducing Waits / Wait times:

Reducing waits typically involves application tuning and/or IO tuning.

Contention does not mean that there is necessarily a problem, but it is more likely that selects against the objects involved are reading more blocks than they have to. These unnecessary reads can then contend. To find such selects, look for the queries that are waiting frequently for 'read by other session'. Active Session History (ASH) reports during the period where contention is seen are a useful source of this sort of information. Alternatively look for those queries that read a lot of buffers when querying these tables; it is possible that these queries are poorly optimized and perhaps a different access path may read fewer buffers and cause less contention.

eg: if lots of sessions scan the same unselective index this can show as "read by other session" waits for "data blocks":

  • the first session processes the blocks that are in the buffer cache quickly but then a block has to be read from disk
  • the other sessions (scanning the same index) quickly 'catch up' and want the block which is currently being read from disk - they wait for the buffer as someone is already reading the block in.
Since the 'read by other session' wait event is an indicator that the buffers being waited for are popular (and are being "read by another session"), if queries are properly optimized, then an undersized buffer cache may mean that there is insufficient space to retain all the buffers required by queries. Make sure that the buffer cache is adequately sized to keep the buffers required by the current SQL statements from being aged out.

Troubleshooting

See the following documents for additional help troubleshooting issues relating to "read by other session" related waits.
Document:1477229.1 Resolving Issues Where 'read by other session' Waits When I/O is Slow
Document:1476081.1 Resolving Issues Where 'read by other session' Waits Occur When I/O is NOT Slow and Cause is Unknown
Document:223117.1 Troubleshooting I/O Related Waits

Known Issues / Bugs:

You can restrict the list below to issues likely to affect one of the following versions by clicking the relevant button: 
                   


NBBugFixedDescription
 1649461511.2.0.4.4, 11.2.0.4.BP10, 12.1.0.2, 12.2.0.0ADG may suffer significant buffer waits
 1440570711.2.0.3.BP20, 11.2.0.4, 12.1.0.1ADG recovery poor performance due to waits on "read by other session" etc..
 1409517211.2.0.4, 12.1.0.1Missing post for "read by other session" waits under some conditions
 647400910.2.0.5, 11.1.0.7On ASSM tablespaces Scans using Parallel Query can be slower than in 9.2
  • '*' indicates that an alert exists for that issue.
  • '+' indicates a particularly notable issue / bug.
  • See Note:1944526.1 for details of other symbols used

Related:

Document:1628089.1 AWR Report Interpretation Checklist for Diagnosing Database Performance Issues
Document:1359094.1 How to Use AWR Reports to Diagnose Database Performance Issues
Document:1274511.1 General SQL_TRACE / 10046 trace Gathering Examples
Click to add to FavoritesTo BottomTo Bottom

"read by other session" Reference Note

This is a reference note for the wait event  "read by other session" which includes the following subsections: See  Note:61998.1 for an introduction to Wait Events.

Definition:

  • Versions: 10.1 - 12.1
    Documentation: 
    12.1 11.2 11.1 10.2 10.1 

  • This wait event occurs when we are trying to access a buffer in the buffer cache but we find that the buffer is currently being read from disk by another user so we need to wait for that to complete before we can access it. In previous versions, this wait was classified under the "buffer busy waits" wait-event. However, in Oracle 10.1 and higher, the wait time is now broken out into the "read by other session" wait event.

Individual Waits:

  Parameters:
  Wait Time:
The session will keep timing-out/waiting until it acquires the buffer.
  Finding Blockers:
The blocking session for an individual wait can usually be found using the "BLOCKING_SESSION" column of V$SESSION for the waiting (blocked) session.
eg:
SELECT SID mySID, blocking_session, 
       p1 "FILE#", p2 "BLOCK#", p3 "class#", row_wait_obj# OBJECT_ID
  FROM v$session
 WHERE event = 'read by other session'
   AND STATE='WAITING'
;

Usually the file#/block# waited on will be changing over time.

The "ROW_WAIT_OBJ#" (OBJECT_ID) may not always be populated. You can check the segment involved by running the following query using the FILE (P1) and BLOCK (P2) from the wait:

SELECT relative_fno, owner, segment_name, segment_type 
  FROM dba_extents
 WHERE file_id = &FILE
   AND &BLOCK BETWEEN block_id AND block_id + blocks - 1
;

If sessions stay stuck waiting for a specific block then investigate the blocking session - eg: it may be stuck in a read operation at OS level.

Systemwide Waits:

To find more information:
  • Use ADDM and ASH reports for advice and information about sessions and SQL involved.
  • Check the "Buffer Wait Statistics" section of AWR reports for details of block classes causing waits.
  • The "Buffer Waits" columns of Tablespace and File information in AWR reports helps show where the waits are occurring, but be aware that these figures also include "buffer busy waits".
  • Check if these same tablespace/file/s show excessive IO or poor IO performance.

Reducing Waits / Wait times:

Reducing waits typically involves application tuning and/or IO tuning.

Contention does not mean that there is necessarily a problem, but it is more likely that selects against the objects involved are reading more blocks than they have to. These unnecessary reads can then contend. To find such selects, look for the queries that are waiting frequently for 'read by other session'. Active Session History (ASH) reports during the period where contention is seen are a useful source of this sort of information. Alternatively look for those queries that read a lot of buffers when querying these tables; it is possible that these queries are poorly optimized and perhaps a different access path may read fewer buffers and cause less contention.

eg: if lots of sessions scan the same unselective index this can show as "read by other session" waits for "data blocks":

  • the first session processes the blocks that are in the buffer cache quickly but then a block has to be read from disk
  • the other sessions (scanning the same index) quickly 'catch up' and want the block which is currently being read from disk - they wait for the buffer as someone is already reading the block in.
Since the 'read by other session' wait event is an indicator that the buffers being waited for are popular (and are being "read by another session"), if queries are properly optimized, then an undersized buffer cache may mean that there is insufficient space to retain all the buffers required by queries. Make sure that the buffer cache is adequately sized to keep the buffers required by the current SQL statements from being aged out.

Troubleshooting

See the following documents for additional help troubleshooting issues relating to "read by other session" related waits.
Document:1477229.1 Resolving Issues Where 'read by other session' Waits When I/O is Slow
Document:1476081.1 Resolving Issues Where 'read by other session' Waits Occur When I/O is NOT Slow and Cause is Unknown
Document:223117.1 Troubleshooting I/O Related Waits

Known Issues / Bugs:

You can restrict the list below to issues likely to affect one of the following versions by clicking the relevant button: 
                   


NBBugFixedDescription
 1649461511.2.0.4.4, 11.2.0.4.BP10, 12.1.0.2, 12.2.0.0ADG may suffer significant buffer waits
 1440570711.2.0.3.BP20, 11.2.0.4, 12.1.0.1ADG recovery poor performance due to waits on "read by other session" etc..
 1409517211.2.0.4, 12.1.0.1Missing post for "read by other session" waits under some conditions
 647400910.2.0.5, 11.1.0.7On ASSM tablespaces Scans using Parallel Query can be slower than in 9.2
  • '*' indicates that an alert exists for that issue.
  • '+' indicates a particularly notable issue / bug.
  • See Note:1944526.1 for details of other symbols used

Related:

Document:1628089.1 AWR Report Interpretation Checklist for Diagnosing Database Performance Issues
Document:1359094.1 How to Use AWR Reports to Diagnose Database Performance Issues
Document:1274511.1 General SQL_TRACE / 10046 trace Gathering Examples
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值