Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


CPU Flat lines and numerous Time Outs


CPU Flat lines and numerous Time Outs

Author
Message
Casper101
Casper101
SSC-Enthusiastic
SSC-Enthusiastic (131 reputation)SSC-Enthusiastic (131 reputation)SSC-Enthusiastic (131 reputation)SSC-Enthusiastic (131 reputation)SSC-Enthusiastic (131 reputation)SSC-Enthusiastic (131 reputation)SSC-Enthusiastic (131 reputation)SSC-Enthusiastic (131 reputation)

Group: General Forum Members
Points: 131 Visits: 1200
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?
mickyT
mickyT
Ten Centuries
Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)

Group: General Forum Members
Points: 1253 Visits: 3309
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.
arnipetursson
arnipetursson
Old Hand
Old Hand (339 reputation)Old Hand (339 reputation)Old Hand (339 reputation)Old Hand (339 reputation)Old Hand (339 reputation)Old Hand (339 reputation)Old Hand (339 reputation)Old Hand (339 reputation)

Group: General Forum Members
Points: 339 Visits: 1019
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?
Evil Kraig F
Evil Kraig F
SSCertifiable
SSCertifiable (5.7K reputation)SSCertifiable (5.7K reputation)SSCertifiable (5.7K reputation)SSCertifiable (5.7K reputation)SSCertifiable (5.7K reputation)SSCertifiable (5.7K reputation)SSCertifiable (5.7K reputation)SSCertifiable (5.7K reputation)

Group: General Forum Members
Points: 5699 Visits: 7660
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
Jeff Moden
Jeff Moden
SSC-Forever
SSC-Forever (45K reputation)SSC-Forever (45K reputation)SSC-Forever (45K reputation)SSC-Forever (45K reputation)SSC-Forever (45K reputation)SSC-Forever (45K reputation)SSC-Forever (45K reputation)SSC-Forever (45K reputation)

Group: General Forum Members
Points: 45113 Visits: 39916
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.
Although they tell us that they want it real bad, our primary goal is to ensure that we dont actually give it to them that way.
Although change is inevitable, change for the better is not.
Just because you can do something in PowerShell, doesnt mean you should. Wink

Helpful Links:
How to post code problems
How to post performance problems
Forum FAQs
Casper101
Casper101
SSC-Enthusiastic
SSC-Enthusiastic (131 reputation)SSC-Enthusiastic (131 reputation)SSC-Enthusiastic (131 reputation)SSC-Enthusiastic (131 reputation)SSC-Enthusiastic (131 reputation)SSC-Enthusiastic (131 reputation)SSC-Enthusiastic (131 reputation)SSC-Enthusiastic (131 reputation)

Group: General Forum Members
Points: 131 Visits: 1200
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...
Andrew G
Andrew G
SSCrazy
SSCrazy (2K reputation)SSCrazy (2K reputation)SSCrazy (2K reputation)SSCrazy (2K reputation)SSCrazy (2K reputation)SSCrazy (2K reputation)SSCrazy (2K reputation)SSCrazy (2K reputation)

Group: General Forum Members
Points: 2012 Visits: 2229
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.
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search