question

MahaneyRob-7897 avatar image
0 Votes"
MahaneyRob-7897 asked ErlandSommarskog commented

High CPU due to XE DISPATCHER and LOGWRITER

We recently had the CPU of one of our Production Servers spike to 60 - 80% for about 45 minutes. The only thing we could see for processes using a lot of CPU were XE DISPATCHER, LOG WRITER and CHECKPOINT
116350-checkpoint.jpg



Does anyone know what would cause this?

sql-server-general
checkpoint.jpg (53.6 KiB)
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

ErlandSommarskog avatar image
0 Votes"
ErlandSommarskog answered ErlandSommarskog commented

I have a feeling that we have too little information to answer.

You say that the CPU spiked 60-80%, but you did not actually say that it was SQL Server that was using that CPU?

You post some output from a tool, but it is nothing that I recognize.

If there was an application submitting a lot queries, but each in its own connection, that may not appear in that tool.

· 8
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Yes, SQL Server was the culprit for the High CPU usage. This is a screen shot from SpotLight. Looking at the process running at the time the ones that are consistently showing up with a high rate of CPU ms/s were LOG WRITER, XE DISPATCHER and CHECKPOINT.

0 Votes 0 ·

There still seems to be something missing from the load. That is not 60-80% there. However, the XE_DISPATCHER is about 14 % which is lot for what I guess this process is doing. What extented event sessions do you have running?

0 Votes 0 ·

This are the extended events running
Name
Long-Running Queries
SpotlightMonitoring_XXXXXXXXX_3843_CUSTDB_p03_sqlserver
system_health
telemetry_xevents


0 Votes 0 ·
Show more comments
Cathyji-msft avatar image
0 Votes"
Cathyji-msft answered MahaneyRob-7897 commented

Hi @MahaneyRob-7897,

The high CPU usage is used for SQL server? We can get the CPU usage information from task manager as below screenshot.

116540-screenshot-2021-07-21-111621.jpg

If SQL server using CPU highly, please read below blog to troubleshot this issue.

TroubleShoot SQL High CPU Utilization


If the response is helpful, please clic*k "Accept Answer"* and upvote it, as this could help other community members looking for similar queries.



· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Yes, it was SQL Server. This is a dedicated box for SQL Server.

0 Votes 0 ·
TomPhillips-1744 avatar image
0 Votes"
TomPhillips-1744 answered ErlandSommarskog commented

It is completely normal and expected for SQL Server to use all resources available to it for short periods of time. As a default SQL Server is allowed to use 100% of CPU. This is not an indication of a problem.

· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Correct. But I think this thread revealed that a seemlingly innocent-looking X-event session may affect the system load. I say "may", because we don't actually know if the workload suffered in the sense that it was not able to completed in the required time.

0 Votes 0 ·