spaghettidba / WorkloadTools

A collection of tools to collect, analyze and replay SQL Server workloads, on premises and in the cloud
MIT License
232 stars 52 forks source link

SqlWorkload does not capture all the events #67

Closed spaghettidba closed 4 years ago

spaghettidba commented 4 years ago

Some events are missing, comparing the list of events in the analysis database with the list of events in an identical extended events session

spaghettidba commented 4 years ago

Useful troubleshooting method: use a WorkloadFileWriterConsumer to write to a sqlite file and at the same time an AnalysisConsumer and compare the events captured by the two

spaghettidba commented 4 years ago

Analysis and FileWriter consumers receive the exact same number of events, so it seems like they get dropped at the listener. Configuration of the XE session?

spaghettidba commented 4 years ago

Changing the XE session to EVENT_RETENTION_MODE = NO_EVENT_LOSS fixes it. This has a potential performance impact on the server being observed, so it has to be assessed carefully.

spaghettidba commented 4 years ago

Even if the events are all captured by the XE session (at least to the file target), both analysis and FileWriter receive a subset of the events.

spaghettidba commented 4 years ago

Fixed for Extended Events files with commit 73167fd4249079735173b150be8e8f6c15ab8b98. It still need to be fixed for traces.

spaghettidba commented 4 years ago

Fixed for traces too 80e75f8527673eba5e7f5ecc594c7a210ec9d8c3