Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

High CPU with many DB connections Prod almost down Expand / Collapse
Author
Message
Posted Thursday, February 6, 2014 7:32 AM


Mr or Mrs. 500

Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500

Group: General Forum Members
Last Login: Tuesday, March 11, 2014 3:34 AM
Points: 549, Visits: 1,554
Hi All,

We are facing 95- 96 % CPU hike on our pord server. SQL Server 2008 R2 SP1 with 8 CPU and 36 GB mem.

We have hybris applications and sometime we notice there will be heavy DB connetions and CPU spike to above 90% . during that time we observe deadloack and SOS_SCHEDULAR wait.

We took out expensive queries and that was tunes and used a new sql plan. But after 3 hours same query became once again the expensive one.

I was refering and assuming if this is bug with CPU spin lock.

Any input this is critical and makes the serevr down. Please advice.


"More Green More Oxygen !! Plant a tree today"
Post #1538650
Posted Thursday, February 6, 2014 8:20 AM


Mr or Mrs. 500

Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500

Group: General Forum Members
Last Login: 2 days ago @ 11:38 AM
Points: 588, Visits: 895
Minaz (2/6/2014)
We took out expensive queries and that was tunes and used a new sql plan. But after 3 hours same query became once again the expensive one.

How was performance after you tuned the query? Did the CPU drop? Also, what do you mean "used a new sql plan"? Did you provide it a Plan Guide?
It sounds like the expensive queries need to have another round of performance enhancements. If you are having issues with improving performance on the expensive queries post them here and someone should be able to help you with them.

I was refering and assuming if this is bug with CPU spin lock.
I wouldn't think there was an issue with the spin locks. I would first try to improve the queries you mentioned first and rule that out.




Microsoft Certified Master - SQL Server 2008
Follow me on twitter: @keith_tate

Forum Etiquette: How to post data/code on a forum to get the best help
Post #1538685
Posted Thursday, February 6, 2014 10:28 AM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Today @ 8:39 AM
Points: 12,906, Visits: 31,985
if it went a way after altering the proc, and then came back after a few hours, i'd start suspecting that stale statistics were affecting performance of the existing plans;

if you look at the tables used by the proc, are any of them MillionBillionRow tables and have a large amount of insert/updates/deletes to them?
can you update statstics for the tables used by teh proc and see if there is an immediate improvement?


Lowell

--There is no spoon, and there's no default ORDER BY in sql server either.
Actually, Common Sense is so rare, it should be considered a Superpower. --my son
Post #1538757
Posted Thursday, February 6, 2014 5:38 PM


Mr or Mrs. 500

Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500

Group: General Forum Members
Last Login: Tuesday, March 11, 2014 3:34 AM
Points: 549, Visits: 1,554
Yes I will be updating table stat today , this is a million rows heap table. we had done a rubild indexing but did noit helped last week

As per the application vendor , its their design not to have cluster PK on the table instead all the tables are non cluster PK.

This query will run from the app spawing more than 300 connections to the DB and makes lots of SOS_schedular_yeild and making CPU almost 95%. We have to restart the app to get it normal.

Please let me have the plan of action?


"More Green More Oxygen !! Plant a tree today"
Post #1538955
Posted Thursday, February 6, 2014 6:35 PM


SSC-Insane

SSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-Insane

Group: General Forum Members
Last Login: Today @ 9:43 AM
Points: 21,632, Visits: 15,292
Ok, it's not a terrible thing that they don't have clustered PKs.

Do they have any clustered indexes in the database at all?

You mentioned that the app has to be restarted to get things to return to normal. Have you investigated the app server for memory leaks as well as performance issues?




Jason AKA CirqueDeSQLeil
I have given a name to my pain...
MCM SQL Server


SQL RNNR

Posting Performance Based Questions - Gail Shaw
Posting Data Etiquette - Jeff Moden
Hidden RBAR - Jeff Moden
VLFs and the Tran Log - Kimberly Tripp
Post #1538965
Posted Monday, February 10, 2014 7:26 AM


Mr or Mrs. 500

Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500

Group: General Forum Members
Last Login: Tuesday, March 11, 2014 3:34 AM
Points: 549, Visits: 1,554
No do not have cluster indexes the tables are over 90% fragmented. I am also continuously seeing deadloack
before the outage with High CPU and many user connections.

What is your input why there are so many connections raising high cpu and deadloack



"More Green More Oxygen !! Plant a tree today"
Post #1539758
Posted Monday, February 10, 2014 9:50 AM


SSC-Insane

SSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-Insane

Group: General Forum Members
Last Login: Today @ 9:43 AM
Points: 21,632, Visits: 15,292
On the affected server, what is the power setting within windows?

What is the power saving mode set to in the BIOS?


If power saving is enabled in the BIOS you could see these symptoms you are describing.

If Windows is not set to "High Performance" (within the power configuration in control panel) you could see these symptoms.

Then the next item would be to identify the queries running at the time cpu starts to spike and tune those.




Jason AKA CirqueDeSQLeil
I have given a name to my pain...
MCM SQL Server


SQL RNNR

Posting Performance Based Questions - Gail Shaw
Posting Data Etiquette - Jeff Moden
Hidden RBAR - Jeff Moden
VLFs and the Tran Log - Kimberly Tripp
Post #1539839
Posted Monday, February 10, 2014 8:04 PM


Mr or Mrs. 500

Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500

Group: General Forum Members
Last Login: Tuesday, March 11, 2014 3:34 AM
Points: 549, Visits: 1,554
this is something new to learn. I am curious to know what all these settings. I will check and update you.


Meantime , I have asked them to add cluster index on the topmost affected queries.


"More Green More Oxygen !! Plant a tree today"
Post #1540026
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse