After finishing up the major change of moving Voron to a Write Ahead Journal, it was time to actually start doing some performance testing.
To make things interesting, I decided that we shouldn’t just compare this in isolation, but we should actually compare it to its peers.
Those are early results, and we are going to have to do a lot more work to make sure that everything works faster.
We have run those tests on the following machine:
All the tests were run on a freshly formatted 512GB SSD drive. Note that we are currently showing only the fast runs, we also have a set of tests for much larger data sets (tens of GB) and another for performance over time, but we will deal with those separately. All of the current tests are for writing of 1 million items. Consisting of a 4 bytes integer and a 128 bytes value.
We have tested: SQLite, SQL CE, LMDB, Esent and Voron.
For LMDB, because it needed a fixed file size, we set the initial file size to be 64 GB. All the databases were run using the default configuration options, no secondary indexes were used. All the tests were done using a single thread.
Note that in all cases we used managed code to run the test. This may impact some of the results because some of those engines are native, and there might be some overhead there.
The first test was to see how it performs with sequential writes:
Esent really shines in this, probably because this is pretty much the sweat spot for it. Voron is the second best, but the reason that we do those sorts of tests is to see where we have problems, and I think that we have a problem here, we are supposed to be much better here. In fact, we have earlier tests that show much better performance, so we appear to have a regression. We’ll work on that next.
Next, let us look at sequential reads:
Here, LMDB eclipses everyone else by far, this is its sweet spot. I am pretty happy about Voron’s performance here, especially since it appears to be close to twice as fast as Esent is for this scenario.
Next, we have random writes:
Surprisingly, Voron is doing pretty badly here, even though it is doing much better than LMDB (this is its weak spot) or SQLite.
For random reads, however, the situation is nicer to us:
So, we have our baseline. And I want to see how we can do better. Expect the future posts to focus on what exactly is slowing our writes down.
In the meantime, we do have some really good news, we tested Voron with and without concurrent flushing to the data file, and there isn’t any meaningful difference between the performance of the two options in our current test run.