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

CPU Flat lines and numerous Time Outs Expand / Collapse
Author
Message
Posted Tuesday, July 2, 2013 8:55 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Friday, September 26, 2014 4:09 AM
Points: 125, Visits: 1,050
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?
Post #1469579
Posted Tuesday, July 2, 2013 1:19 PM
Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Yesterday @ 11:45 AM
Points: 1,040, Visits: 3,105
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.
Post #1469727
Posted Tuesday, July 2, 2013 5:29 PM
SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Yesterday @ 5:29 PM
Points: 277, Visits: 867

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?
Post #1469797
Posted Tuesday, July 2, 2013 5:52 PM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Monday, September 22, 2014 10:53 PM
Points: 5,383, Visits: 7,456
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 | Forum Netiquette
For index/tuning help, follow these directions. |Tally Tables

Twitter: @AnyWayDBA
Post #1469798
Posted Tuesday, July 2, 2013 9:41 PM


SSC-Dedicated

SSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-Dedicated

Group: General Forum Members
Last Login: Yesterday @ 10:33 PM
Points: 35,259, Visits: 31,740
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."

(play on words) "Just because you CAN do something in T-SQL, doesn't mean you SHOULDN'T." --22 Aug 2013

Helpful Links:
How to post code problems
How to post performance problems
Post #1469835
Posted Wednesday, July 3, 2013 12:38 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Friday, September 26, 2014 4:09 AM
Points: 125, Visits: 1,050
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...
Post #1469858
Posted Wednesday, July 3, 2013 2:01 AM


Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Yesterday @ 5:55 PM
Points: 1,233, Visits: 1,717
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.


Post #1469889
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse