I will explain Gc current block busy and Gc cr block busy wait event in Oracle in this post.
Gc current block busy in Oracle
This wait event occurs between the nodes of the Cluster database ( Real Application Cluster ). When a transaction requests a block, that request sent to the master instance. Normally, this request is performed by a cache fusion.
However, in some cases, this block transfer is delayed because the corresponding instance is held by the other instance or because the corresponding transaction records cannot be written to the redo logs immediately, in which case this wait event is triggered.
This can be solved by tune the wait event Log Writer process or Solving network problem between Cluster nodes.
Gc cr block busy wait in Oracle
This wait event occurs like the gc current block busy wait event above. The only difference is that while the above event is running in current mode, this wait event runs in CR mode. This can be solved by tune the wait event Log Writer process.
gc current block busy and
gc cr block busy wait events indicate that the local instance that is making the request did not immediately receive a current or consistent read block. The term busy in these events’ names indicates that the sending of the block was delayed on a remote instance. For example, a block cannot be shipped immediately if Oracle Database has not yet written the redo for the block’s changes to a log file.
In comparison to
block busy wait events, a
gc buffer busy event indicates that Oracle Database cannot immediately grant access to data that is stored in the local buffer cache. This is because a global operation on the buffer is pending and the operation has not yet completed. In other words, the buffer is busy and all other processes that are attempting to access the local buffer must wait to complete.
The existence of
gc buffer busy events also means that there is block contention that is resulting in multiple requests for access to the local block. Oracle Database must queue these requests. The length of time that Oracle Database needs to process the queue depends on the remaining service time for the block. The service time is affected by the processing time that any network latency adds, the processing time on the remote and local instances, and the length of the wait queue.
The average wait time and the total wait time should be considered when being alerted to performance issues where these particular waits have a high impact. Usually, either interconnect or load issues or SQL execution against a large shared working set can be found to be the root cause.
You can find the sql statements that are waiting on Gc current block busy and Gc cr block busy wait event using the following script.
select v.sql_text,v.sql_fulltext,sub.* from gv$sql v, (select sample_time,s.sql_id sql_id, session_state, blocking_session, owner||'.'||object_name||':'||nvl(subobject_name,'-') obj_name,s.program,s.module,s.machine from dba_hist_active_sess_history s, dba_objects o where sample_time between to_date('02/08/2021 07:30:02','DD/MM/YYYY HH24:MI:SS') and to_date('02/08/2021 15:10:02','DD/MM/YYYY HH24:MI:SS') and event like '%gc%' and o.data_object_id = s.current_obj# order by 1 desc) sub where sub.sql_id=v.sql_id;
Read the following post to learn more details about DB File Sequential and Scattered Read Wait event in Oracle.
3,051 views last month, 1 views today