Skip to content

Blog

Little SQL Server Tricks: How to Fix Misaligned Log IOs

While installing SQL Server on a new SSD, I run into a problem with the installer. Everything worked, except the add-on features I selected failed. Strange. But then SQL Server did not start, and I found this entry in the Event Viewer:

There have been 256 misaligned log IOs which required falling back 
to synchronous IO. The current IO is on file C:\Program Files\Microsoft SQL 
Server\MSSQL16.MSSQLSERVER\MSSQL\DATA\master.mdf.

Parting Thoughts on Performance Testing

After spending the last four months diving into performance testing and hunting down memory leaks, this series comes to an end. Let’s take a moment to reflect on the key insights and explore some ideas you can try on your own.

Reduce Infrastructure Costs Guided by Performance Testing

When we talk about performance tests, we usually do it with the goal of making our applications faster. However, we can also focus on the reduction of resources we need to deliver the same performance. If we do not want to blindly meddle with our infrastructure, we need to run our performance tests to guide the optimisation. Let us explore our options.

The Strange Memory Leak in .Net 8

Last year we moved our applications from .Net 6 to .Net 8. It was much less work that it was to move from .Net 4.8 to .Net 6. The migration itself was straightforward, and we could put our updated application into production without any issues. That was until a week later when we got this strange error:

Application '/LM/W3SVC/11/ROOT' with physical root '...'

hit unexpected managed exception, exception code = '0xe0434352'.

First 30KB characters of captured stdout and stderr logs:

Out of memory.

Validate Code Improvements With BenchmarkDotNet

After we found a slow method on the hot path of our application, it is time to improve the code and make sure that the change is indeed faster. Here we must dive into the next challenges and do the hard work of figuring out where exactly we lose time or waste too many resources. Let us find a helpful approach and explore BenchmarkDotNet, a tool that helps us to create benchmarks of our improvements.