Tracking down memory leaks isn’t anyone’s idea of a good time. There are a lot of great articles out there, but they can be hard to find, and some of them are getting a little long in the tooth. Things have changed since 2004! It turns out that you can find memory leaks in your Azure apps without too much effort, and without buying any tools. Here’s how.
In previous posts I’ve talked about profiling your Azure Storage transactions with Fiddler, and one particular problem to look for. In this post I’ll talk about a more common problem; getting the same piece of data repeatedly. This is always a performance problem, as your app wastes extra time waiting for responses from the storage mechanism. It’s also a scalability problem, because you’re making that storage mechanism work harder than it needs to. Although the problem is not unique to Azure Storage, there is a new twist: you’re paying for each storage transaction. Hitting storage too much hits you directly in the wallet, so it’s more important than ever that you optimize your data access logic.
To demonstrate the problem I have set up my Glassboard API instance to do no caching whatsoever. I then ran a unit test which simulates a user getting his Newsfeed, then posting a status. I highlighted each set of repeated calls in a different color.
Just look at all those colorful, repeated requests! There are 8 requests there, slowing down our app and sucking up money.
Depending on your application there are many possible ways to get rid of repeated requests. You may be able to design them out of the system, share data between layers, or implement local or distributed caches. We used a combination of all of these to fix our problem in Glassboard. With our caching re-enabled, the same test results in this HTTP trace.
Good morning. We’re Sepia Labs. Nice to meet you too.
You don’t know us because we’re new. Well, sort of new. Sepia Labs is a software company comprised of a few folks who have some history in the software business, notably Brent Simmons, the creator of NetNewsWire, and Nick Bradbury, creator of FeedDemon and TopStyle. Together with Nick Harris, Jenny Blumberg, Brian Reischl and myself (Walker Fenton) – we have started this new venture called Sepia Labs.
We are spinning off from NewsGator Technologies, Inc, we are the team that was largely responsible for NewsGator’s consumer facing business.
Our mission at Sepia Labs is simple. First and foremost, we want to make great software. We want our software to provide instant utility, to be good looking, fast, and fun to use. Our first product, Glassboard, reflects this mission, and we hope you’ll agree.
Glassboard is an app focused on sharing. Yes, a bit like Facebook or Twitter, but we take privacy seriously. “Know who you’re sharing with” is the tagline. And we mean it.
Glassboard is launching in July. If you would like to keep posted, head over to Glassboard.com and give us your email. We won’t spam you or share your email with anyone else. We’ll just let you know when the app is ready.
Thanks for visiting.