Tezos Irmin2 vs Dune Ironmin

Fabrice Le Fessant
Dune Network
Published in
3 min readOct 9, 2019

Irmin2 finally landed in Tezos mainnet-staging branch last week. Irmin2 is the long-expected new version of the context storage layer in the Tezos node. It was expected to put an end to the huge storage cost of Irmin, and to make our own implementation, Ironmin, useless. Given that Nomadic Labs refused the integration of Ironmin in Tezos at the beginning of 2019, it was our understanding that Irmin2, developed by Tarides, was up to the challenge. Before sending Ironmin to the trash, we decided to still compare the two competitors, and we were right, Ironmin is not dead!

Irmin2 solves the Disk Space Problem

As we always do, we tested Irmin, Irmin2 and Ironmin on a trace of Tezos of more than 600,000 blocks, on the same computer, a Xeon with 32 GB of RAM and an SSD drive.

Irmin2 is just 30% more expensive in disk space than Ironmin, while Irmin was 10x more expensive

The first outcome is clear: Irmin2 outperforms Irmin in storage space, solving the long standing issue faced by Tezos nodes for one year. Ironmin is just a bit better, using 25% less of storage. The results are impressive, since Irmin2 uses a generic approach, based on Git pack files, when Ironmin uses a specific approach, though implemented in a few weeks.

Irmin2 is still 8x slower than Ironmin

Irmin2 is slower than Irmin, and much slower than Ironmin

However, we were quite disappointed by the performance: while Irmin was already 5x slower than Ironmin, Irmin2 is even slower, at 8x the time to fill the database.

Irmin2 crashed our Benchmark Setup

As you may have noticed, our benchmarks are not complete: we haven’t been able to run our full benchmark with Irmin2, as it crashed the simulation around block 300,000 after eating all the memory of our benchmark computer. At the same block, Irmin uses only 2 GB of RAM, while Ironmin uses 12GB (and ends the simulation at 16GB). We are going to improve Ironmin on this topic.

Conclusions

We think that the current cost in performance of Irmin2 is disappointing, and the memory consumption may become a big problem on long running nodes. For now, we will stay away from Irmin2, and include Ironmin in the next version of Dune. Dune users will be able to choose between Irmin and Ironmin using the DUNE_CONTEXT_STORAGE environment variable.

Fortunately, Irmin2 is now the official storage in the mainnet-stagingbranch of Tezos. With the current Babylon fork of Tezos, Tezos users will have no other choice than updating their node to that branch, to avoid the bugs of the Babylon amendment, likely to be voted in the next days. This will give us a good opportunity to observe the impact of Irmin2 on a large set of Tezos nodes, and check whether the memory problems we encountered also appear in running nodes, or if they were just artefacts of our benchmark setup.

--

--

Fabrice Le Fessant
Dune Network

Former researcher at INRIA, Fabrice founded OCamlPro, now CEO at Origin Labs and active dev of the Dune Network blockchain platform.