High CPU with many DB connections Prod almost down

  • 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"

  • 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[/url]

  • 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


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • 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"

  • 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, MVP
    SQL RNNR
    Posting Performance Based Questions - Gail Shaw[/url]
    Learn Extended Events

  • 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"

  • 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, MVP
    SQL RNNR
    Posting Performance Based Questions - Gail Shaw[/url]
    Learn Extended Events

  • 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"

Viewing 8 posts - 1 through 7 (of 7 total)

You must be logged in to reply to this topic. Login to reply