We've just had a rogue CPU spike on one of our main SQL boxes, and we're struggling to work out what caused it. We use Red Gate SQL Monitor to track various performance metrics, and we saw a couple of interesting performance monitor things around around the time of this spike, but they all appear to have been caused by the CPU usage spike - so the originating cause of the spike is a complete mystery.
All other metrics - I/O performance, network, memory usage - were completely normal during this spike, and restarting the MSSQLSERVER process on the box appears to have cleared it.
We've seen spikes like this before, but historically they have always coincided with a sudden increase in website traffic or somebody running a particularly intensive SQL maintenance job or similar; this one is a complete outlier and we've never seen anything like it. The box in question is running:
Microsoft SQL Server 2008 R2 (SP2) - 10.50.4297.0 (X64) Nov 22 2013 17:24:14 Copyright (c) Microsoft Corporation Standard Edition (64-bit) on Windows NT 6.1 <X64> (Build 7601: Service Pack 1) (Hypervisor)
and it's hosted on an
i2.2xlarge instance on Amazon EC2. We're looking into a number of things that could have caused it, but one potential explanation would be CPU throttling or contention on the underlying hosting infrastructure. Has anyone encountered similar issues with either SQL Server, or specifically with SQL hosted on EC2 instances?
EDIT: We'd provisionally dismissed memory consumption as a potential cause of this, because we're monitoring both SQL Server's total memory usage, and the amount of 'free' memory being reported by MSSQL itself within SQL Monitor. Memory usage metrics for the 24-hour period surrounding the spike are here; there's no sign of anything changing or growing in the period immediately preceding the spike. Does this data shed any further light on the matter?