CPU Flat lines and numerous Time Outs

  • Sorry for the long post... but here goes:

    We have recently migrated from a physical 2 node cluster environment to VM Ware.

    Ever since that day we have an increased number of time outs being reported from the client application (almost 300 per day!) and almost weekly the CPU is flat lining and keeps flat lining for hours…

    When it flat lines it shows SQL Server using all 100% of the CPU resources.

    We have made no major changes in SQL procs or queries since the migration and we never had these problems before the migration (when it was on the physical cluster).

    Here is the spec of the VM host environment:

    Production

    3x BL460cG6 Blades with 2x Hex core 2.9GHz CPUs (12 CPU per hots) and 96GB RAM

    2x BL460cG6 Blades with 2x Quad Core 2.5GHz CPUs (8 CPU per host) and 96GB RAM

    2x BL490cG6 Blades with 2x Hex Core 2.9Ghz CPUs (12 CPU per Host) and 96GB RAM - Still to be added (Old SQL Cluster)

    DR

    3x BL460cG6 Blades with 2x Hex core 2.9GHz CPUs (12 CPU per hots) and 96GB RAM

    2x BL460cG6 Blades with 2x Quad Core 2.5GHz CPUs (8 CPU per host) and 96GB RAM

    2x BL490cG6 Blades with 2x Quad Core 2.5GHz CPUs (8 CPU per host) and 96GB RAM

    Network Uplinks from VM to Core

    3x 10GB

    4x 1GB

    Fibre Uplinks to SAN

    6x 8GB

    The sysadmin is not really a VM admin and so cannot assist me much…

    Any ideas why our server is flat lining and why we are getting so many time outs all of a sudden?

    One very strange thing I did see was this:

    The current MaxDop setting is 8. When the CPU flat lines, I change the MaxDop setting to something different like 4. There is no change and the CPU still flat lines. When I change it back to MaxDop of 8, the CPU recovers and runs on average 70% - I have done this 3 different times - just to check it was not a fluke….same result each time

    How can this be?

    How do I troubleshoot this?

  • Hi

    Not sure if this is anywhere close to what you are experiencing, but recently I saw a situation where a cluster was moved to new (faster and better) hardware. Unfortunately this caused one of the frequent queries to one of the databases to change it's plan. It ignored an index (spatial) and start parallel processing. This caused the same effects that you are getting. The upshot was they needed to adjust the MAXDOP and cost thresholds until this query start using the preferred plan.

    Hope this helps.

  • What are the wait types on the SQL server while the server flat lines (I assume this is 100% CPU)?

    Are you seeing a lot of parallel queries during these times? Did you have a lot of parallel queries on your old servers?

  • First, I'd start with the basics... have you done a maintenance run for index rebuilds and statistics updates? Your messing with maxdop allows queries to recompile. Something may be off in those. Besides, it's just a good habit.

    Next, VM is... touchy. You need to get into the VM monitoring/assignment software and make sure your resources aren't being reassigned or disabled during slow times and then not reallocating during higher peak times.

    My personal recommendation is do a maintenance run on the database, then check your system for the long running queries by looking in sysprocesses for them. Spot check the execution plans for those particular procs. If nothing is obvious in them, get your hands on the VM software and head for a forum you can ask explicit questions about that VM on. It could be anything from your VM not having RAW storage and thus the CPU has to decompress/translate to simply having throttles activated in the VM software.

    Troubleshooting VM from a forum is painful at best, particularly without a lot of experience with it (which I don't have) and access to that particular VM software (which I also don't have).


    - Craig Farrell

    Never stop learning, even if it hurts. Ego bruises are practically mandatory as you learn unless you've never risked enough to make a mistake.

    For better assistance in answering your questions[/url] | Forum Netiquette
    For index/tuning help, follow these directions.[/url] |Tally Tables[/url]

    Twitter: @AnyWayDBA

  • We had a similar problem in the "early days" of VM. I'm not a VM kinda guy. Someone else always set this up in the environment. That means that I'm not going to get the lingo right so forgive that, please.

    It turned out to be some sort of a setting in VM that allowed VM to swap resources in and out to support other things like othe SQL Servers. Once they changed the setting to not allow that to happen (think "dedicated VM box"), those flat-line/timeout problems vanished. I would appear that the system was spending more time trying to reallocate system resources than it was actually doing work. One of the biggest problems (apparently) was that it also reallocated memory and cause the work to "spool to disk" instead of staying in memory. I don't know if it was actually hitting the "swap file" in the classic sense because I didn't (at the time) have the time to do a deep dive on the problem with the folks that fixed it, but those are the sketchy details that I can remember.

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • Hi,

    Thank you for the replies.

    Some answers to your questions:

    The wait types I see are CXPackets.

    I see a lot of parallel queries during this time - the same parallel queries we had before the migration.

    I do weekly index rebuild, reorganize and update of stats and these jobs are always successful.

    When I check sysprocesses, do I focus on queries with high CPU usage or mainly long execution time? Or both I guess...

  • I think you shoud first check the vm host, not the client.

    Open vSphere and make sure the memory is not overprovisioned.

    If you look at the default performance graphs for the client from vSphere, you can see if memory is being swapped in/out and whether there is any "memory ballooning" going on.

    The other one to look out for is CPU ready time. http://www.sqlskills.com/blogs/jonathan/cpu-ready-time-in-vmware-and-how-to-interpret-its-real-meaning/

    The client machines full number of assigned cores needs to be available before the host will process the clients request, even if you have MAXDOP = 1, you have 4 cores, all 4 need to be ready (thats my laymans understanding of it. It's sometimes recommended to decrease the assigned number of cores for your virtual box and you'll increase performance)

    I use a performance monitoring product called Confio Ignite which gives full performance charts for the vm host and matches it with the client stats, it's much easier to find out if it's a VM or SQL problem. One of the key performance indicators is VM CPU ready time and the other is Signal Waits %, they really give you a good idea as to whether its the host or client.

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

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