Articles

A twisted tale of memory optimization

5 minutes
I was looking into reducing the allocation in a particular part of our code, and I ran into what was basically the following code (boiled down to the essentials): As you can see, this does a lot of allocations. The actual method in question was a pretty good size, and all those operations happened in […]

A performance profile mystery: The cost of Stopwatch

6 minutes
Measuring the length of time that a particular piece of code takes is a surprising challenging task. There are two aspects to this, the first is how do you ensure that the cost of getting the start and end times won’t interfere with the work you are doing. The second is how to actually get […]

QCon San Francisco Workshop: Building a database from the ground up

1 minutes
I’m going to QCon San Francisco and will be teaching a full day workshop where we’ll start from a C compiler and  an empty file and end up with a functional storage engine, indexing and more. Included in the minimum requirements are implementing transactions, MVCC, persistent data structures, and indexes. The workshop is going to […]

Struct memory layout optimizations, practical considerations

15 minutes
In my previous post I discussed how we could store the exact same information in several ways, leading to space savings of 66%! That leads to interesting questions with regard to actually making use of this technique in the real world. The reason I posted about this topic is that we just gained a very […]

Struct memory layout and memory optimizations

51 minutes
Consider a warehouse that needs to keep track of items. For the purpose of discussion, we have quite a few fields that we need to keep track of. Here is how this looks like in code: And the actual Warehouse class looks like this: The idea is that this is simply a wrapper to the […]

Production postmortem: The dog ate my request

4 minutes
A customer called us, quite upset, because their RavenDB cluster was failing every few minutes. That was weird, because they were running on our cloud offering, so we had full access to the metrics, and we saw absolutely no problem on our end. During the call, it turned out that every now and then, but […]

Podcast: Hansleminutes – All the Performance with RavenDB’s Oren Eini

1 minutes
I had a great time talking with Scott Hanselman about how we achieve great performance for RavenDB with .NET. You can listen to the podcast here, as usual, I would love your feedback. In this episode, we talk to Oren Eini from RavenDB. RavenDB is a NoSQL document database that offers high performance, scalability, and […]