spaghettidba / WorkloadTools

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

Resample long captures to avoid burning too much CPU and memory #56

Closed spaghettidba closed 5 years ago

spaghettidba commented 5 years ago

Long captures, especially when sampled very frequently (e.g. 1 minute) tend to be comprised of huge amounts of datapoints, that are hard to visualize in WorkloadViewer.

Resampling using a wider sample rate can help overcome this issue.

spaghettidba commented 5 years ago

For the moment is chooses the preaggregation ratio as follows: if (numIntervals > 500) // around 8 hours preaggregation = 15; if (numIntervals > 1000) // around 16 hours preaggregation = 30; if (numIntervals > 2000) // around 32 hours preaggregation = 60;