[20140829] high CPU usage caused by spinlock

Source: Internet
Author: User
Tags high cpu usage

Background:

An alarm is reported when the CPU usage is higher than the standard

Troubleshooting:

1. No queries with extremely high CPU performance were found during tracking

2. Check the CPU usage of the kernel to see if it is caused by SQL Server.

3. Check whether the load is extremely high. Use batch request here.

4. No solution is available, and SQL runs normally. No problem is found at the thread, worker, and task levels.

5.open procexp.exe and hope to find the full trace. Click it to find that all high-CPU threads are called by keacquirespinlockatdpclevel and start to suspect whether the thread is a spinlock problem.

6. query spinlock stats, sys. dm_ OS _spinlock_stats: Check spins. The largest spins is lock_hash. Because there is no reference value, we found a service a that is more busy and found to be an order of magnitude higher than.

Solution:

No. It is estimated that only nolock can be used to reduce access to the lock data structure.

An official Article: diagnosing and resolving spinlock contention on SQL Server

I did not read it carefully. There are specific diagnostic methods in it.

 

[20140829] high CPU usage caused by spinlock

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.