Oracle RAC global wait event GC current block busy and GC Cr multi block request description

Source: Internet
Author: User
Tags time 0

 1. RAC global wait Event Description



In the RAC environment, the most common wait events related to global cache adjustment are global cache Cr request, global cache busy, and equeue.

 

When a process needs to access one or more blocks, Oracle first checks whether the block exists in its cache, the shared access permission is granted to these blocks through global cache before access. If we find that these blocks are already in the cache of another instance through global cache, these blocks will be directly transmitted between nodes through cache fusion, and the global cache crrequest wait event will also appear.

 

For more information about cache fusion, see:

Oracle raccache Fusion Mechanism

Http://blog.csdn.net/tianlesoftware/article/details/6534239

 

 

In 10 Gb, The Global cachecr request is short for GC crrequest.

 

The time it takes to transport a block from the remote cache to the local cache depends on whether the block is in the shared or exclusive mode. If the block is shared (scur), the remote cache will transmit the cloned information, otherwise, a PI is generated and then transmitted. Apparently, the global cache Cr request wait event is directly related to the DB file sequential/scatteredread wait event.

 

Oracle racpast image (PI) Description

Http://blog.csdn.net/tianlesoftware/article/details/6529870

 

Generally, the process in RAC will wait for 1 s to try to read the data block information from the local or remote cache. Of course, this depends on the mode in which the block is located. If the value exceeds 1 s, the connection between nodes is slow. In this case, private connections are used between nodes, while public connections are used for client connections. Sometimes, connections between nodes, cache fusion will not pass through the public network. In this case, a large number of global cachecr requests will wait for the event to appear, you can use the oradebugipc command to verify whether the connection between the following nodes uses a private network.

 

In, the above GC [current/Cr] [multiblock] request is actually the event of placeholder, and the upper left corner of the figure is also described.

 


 

GC [current/Cr] [multiblock] request actually represents one of the four events (gccurrent request, GC Cr request, GC current multiblock request, GC Cr multiblock request ).

 

Here Cr and current are different concepts. If they are read, they are Cr request. If they are changed, they are current request.

Cr (consistent read) blocks create description

Http://blog.csdn.net/tianlesoftware/article/details/6529401

 

Oracle 10 Gb distinguishes multi block request from single block request in many places, which makes it easy to analyze the data characteristics of the business. This event is triggered when a session requests a block in the RAC environment.

 

If two or three network hops are used to obtain a block, GC [current/Cr] [2/3]-way is generated. If it is 3-way, the master and holder should not be the same instance. If it is 2-way, the master and holder should be the same instance. This should be the best case. After the request, the requested block is obtained, that is, there is no busy, and it is not said to wait in the request process. This type of event should imply that the block network transmission will generate traffic, while the network traffic of grant 2-way should be relatively small.

 

GC [current/Cr] block busy indicates that although it is returned, there is no immediatesend, that is, the control process is returned, but the actual block is not passed to requesterinstance immediately, GC [current/Cr] block busy corresponds to GC [current/Cr] [2/3]-way.

 

GC [current/Cr] Grant 2-way when a block is requested, a message is received, which should be granted to the requester instance to access this block. If the block is not in the local cache, the subsequent action is to read the block from the disk. (To put it another way, Oracle controls data access at the row and object levels, but the objects actually operated are blocks, and the objects passed are also blocks, for a block, there will be a master instance, that is, the manager of the block, and there will be no more participants, for example, some instances in order to read consistency, the image of the block at a certain time may be stored in your local cache, and some instace in order to modify the block, the block's past image may be stored in its local cache ).

 

GC current grantbusy when an instance requests a block, it is told to be busy. I don't know under what circumstances will the grant busy event be generated.

 

GC [current/Cr] [block/Grant] congested's understanding of these events is that both the current and Cr types of block or grant get the event, but there is congestion in the process. That is, wait for more than 1 ns (nanoseconds) in the internal queue ).

 

GC [current/Cr] [failure/retry] This is an error and no block is requested.

 

GC buffer busy is a block accessed by multiple processes at the same time, resulting in lock competition. With RAC, each node must be isolated. Whether it is through Service Isolation, regional isolation, or other isolation means, the ultimate goal is to take on the services undertaken by each node, accessing different data objects can minimize resource contention between nodes to maximize the performance of the RAC cluster system.

 

When a session initiates a consistent read request from the beginning and obtains the request information, it is in sleep state. For users, the global cache Cr request waiting event is displayed, the wait time is the time to record this process.

 

Generally, there are several reasons for a large number of global cache Cr requests.

(1) Slow internal connection between nodes or narrow transmission band between nodes. You can obtain the high-speed connection by reconnecting.

(2) there is competition for hotspot data blocks.

(3) The CPU load is too high or the LMS background process is insufficient. Under normal circumstances, only two LMS background processes obtain resources from the CPU. Increasing the number or priority of the LMS process can help you obtain more resources from the CPU. The parameter _ lm_lms is used to set the number of LMS processes.

(4) A large number of uncommitted transactions or slow transmission of system disk devices.

 

Information about global cache:

SQL> select name, value from V $ sysstat where name like '% global cache % ';

NAME value

------------------------------------------------------

Global cache gets 1791587

Globally cache get time 85911

Global cache converts 179612

Global cache convert time 1262

Global cache Cr blocks received 17189

Global cache Cr block receive time 31547

Global cache Current Blocks received 4627

Global cache current block receive time 763

Global cache Cr blocks served 16805

Global cache Cr block build time 72

Global cache Cr block flush time 25043

Global cache Cr block send time 54

Global cache Current Blocks served 3529

Global cache current block pin time 21

Global cache current block flush time 0

Global cache current Block send time 15

Global cache freelist waits 285

Global cache defers 2

Global cache convert timeouts 0

Global cache blocks lost 0

Global cache claim blocks lost 0

Global cache blocks upt 0

Global cache prepare failures 8

Global cache skip prepare failures 3408

24 rows selected.

 

Note:

This part of content comes from http://book.51cto.com/art/201202/320497.htm

 

 

2. GC current/crblock busy wait event

 

2.1 GC current block busy wait event

When a requestneeds a block in current mode, it sends arequest to the master instance. the requestor evenutally gets the blockvia cache fusion transfer. however sometimes the block transfer than due to either the block was being used by a session on another beyond the block transfer was delayed because the holding instance cocould not writethe corresponding redo records to the online logfile.

-- When the requested block is in current mode, a request is sent to the master instance, and the final requestor obtains the block through cache fusion. However, sometimes the block will have a delay in the transfer process. For example, the block is being used by another block, or the instance holding the block cannot promptly write the redo records into the online logfile.

 

One can use thesession level dynamic performance views v $ session and V $ session_event to findthe programs or sesions causing the most waits on this events

 

SQL> selecta. sid,. time_waited, B. program, B. module from V $ session_event A, V $ sessionb where. SID = B. sid and. event = 'gc current block busy' order by. time_waited;

 2.2 GC Cr block busy wait event



When a requestneeds a block in CR mode, it sends arequest to the master instance. the requestor evenutally gets the block viacache fusion transfer. however sometimes the block transfer is delayed due beyond the block was being used by a session on another instance or the blocktransfer was delayed because the holding instance cocould not write thecorresponding redo records to the online logfile.

 

One can use thesession level dynamic performance views v $ session and V $ session_event to find theprograms or sesions causing the most waits on this events

 

SQL> selecta. sid,. time_waited, B. program, B. module from V $ session_event A, V $ session B where. SID = B. sid and. event = 'gc Cr block busy' order bya. time_waited;

 2.3 description



GC current blockbusy wait is a global cache current block contention wait event in RAC. The wait event duration consists of three parts:

 

Time to process current block request inthe cache = (PIN time + flush time + send time)

 

GC current block flush time

The currentblock flush time is part of the service (or processing) Time for a currentblock. the pending redo needs to be flushed to the log file by lgwr before lmssends it. the operation is asynchronous in that LMS queues the request, postslgwr, and continues processing. the LMS wocould check its log flush queue forcompletions and then send the block, or go to sleep and be posted by lgwr. theredo log write time and redo log sync time can influence theoverall service time significantly.

 

Flush time is the time required by Oracle to ensure the recovery mechanism of the instance recovery instance. Therefore, each current block must be modify/update after the local instance on the local node is modified) you must write the redo related to the current block to the logfile (the lgwr must be written before returning it) before the LMS process can be transmitted to other nodes for use.


 

GC buffer busy acquire/release is a derivative product of GC current block busy. When multiple processes in the same instance concurrently access the same data block, the first process will enter the GC current block busy wait, subsequent processes on the buffer waiter list will be stuck in GC buffer busy acquire/release waiting (a user on the same instance has started a remote operation on thesame resource and the request has not completed yet or the block was requestedby another node and the block has not been released by the local instance whenthe new local access was made ), there is a queuing effect, that is, GC current block busy is slow, so the GC buffer busy acquire/release in the queue will be slower:

 

Pin time = (timeto read the block into cache) + (time to modify/process the buffer)

Busy time = (average pin time) * (number of interested users waiting ahead of me)

 

Not limited to current block (reference awr avg global cache current block flush time (MS), Cr block (avg global cache Cr block flush time (MS) also has flush time.

 

You can set _ cr_server_log_flush to false (lmsare/is waiting for lgwr to flush the pending redo during Cr fabrication. without going too much in to details, you can turn off the behaviourby setting _ cr_server_log_flush to false .) to disable the crserver flush redo log. However, this parameter is invalid for the flush time of the current block and is not recommended.

 

This part is taken from the ml Forum:

Oracle GC current block busy wait Event Description

Http://t.askmaclean.com/viewthread.php? Tid = 438 & Highlight =

 

3. GC Cr multi blockrequest wait event

 

GC Cr multiblock request is actually a globalcache Cr multi block request. After 10 Gb, global cache is short for GC. In the RAC application system, this is a common waiting event.

 

In general, multi block is caused by full table scan or full index scan. GC Cr multiblock request will cause CPU scheduling and management of memory, which will consume CPU time.

 

Application separation should be performed on the RAC layer for GC Cr multiblock request, that is, different nodes process different applications, and nodes are configured as standby nodes for each other, when a node goes down, it can result in related applications to provide high availability.

 

 

 

 

Bytes -------------------------------------------------------------------------------------------------------

All rights reserved. reprinted articles are allowed, but source addresses must be indicated by links. Otherwise, the documents will be held legally responsible!

Skype: tianlesoftware

QQ: tianlesoftware@gmail.com

Email: tianlesoftware@gmail.com

Blog: http://www.tianlesoftware.com

WEAVER: http://weibo.com/tianlesoftware

Twitter: http://twitter.com/tianlesoftware

Facebook: http://www.facebook.com/tianlesoftware

LinkedIn: http://cn.linkedin.com/in/tianlesoftware

 

 

------- Add a group to describe the relationship between Oracle tablespace and data files in the remarks section. Otherwise, reject the application ----

Dba1 group: 62697716 (full); dba2 group: 62697977 (full) dba3 group: 62697850 (full)

Super DBA group: 63306533 (full); dba4 group: 83829929 dba5 group: 142216823

Dba6 group: 158654907 dba7 group: 172855474 DBA group: 104207940

Alibaba Cloud Hot Products

Elastic Compute Service (ECS) Dedicated Host (DDH) ApsaraDB RDS for MySQL (RDS) ApsaraDB for PolarDB(PolarDB) AnalyticDB for PostgreSQL (ADB for PG)
AnalyticDB for MySQL(ADB for MySQL) Data Transmission Service (DTS) Server Load Balancer (SLB) Global Accelerator (GA) Cloud Enterprise Network (CEN)
Object Storage Service (OSS) Content Delivery Network (CDN) Short Message Service (SMS) Container Service for Kubernetes (ACK) Data Lake Analytics (DLA)

ApsaraDB for Redis (Redis)

ApsaraDB for MongoDB (MongoDB) NAT Gateway VPN Gateway Cloud Firewall
Anti-DDoS Web Application Firewall (WAF) Log Service DataWorks MaxCompute
Elastic MapReduce (EMR) Elasticsearch

Alibaba Cloud Free Trail

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.