I was able to fit an entire functional mainnet archive into < 900 GB using Erigon + ZFS + compression (with some tradeoffs)

Yes, ➡️➡️➡️AN ENTIRE MAINNET ARCHIVE NODE⬅️⬅️⬅️

A short 🧵👇
Context: I've been running Erigon for a long time in my laptop using a portable 2TB Samsung T5 SSD.

Everything works fine, except last week I noticed current mainnet archive is taking +1.8TB, so it is time to migrate, you've done a good job Samsung ser, respect. Image
I already got a new 4TB drive, but wanted to experiment with something new that could give some extra life to the 2TB one.

I've seen some people talking about ZFS on Erigon discord, but it looks like they target Linux installations on cloud or home NUCs.
I use a mac, there is a package called OpenZFS on OSX and apparently no one has tried it yet, so why not? :)

openzfsonosx.org
The docs are not very friendly, it seems like a standard linux software website from the 00's, but there is a nice homebrew package and it works.
It seems macos Monterrey is not yet supported, but it apparently works #YOLO

After installing it, you'll probably want to dig into the standard openzfs/linux tutorials, nothing macos-specific, you create a zpool, enable compression, blablabla.
The magic is done by enabling filesystem level compression. According to some old messages on Erigon discord, lz4 works fine.

I moved my previous chaindata to the new FS after enabling compression, it takes 887GB with a 2.1x compression ratio.

The uncompressed size is 1.82TB. ImageImage
Of course this doesn't come without tradeoffs. Sync is much more slower. Some olds numbers I found in Erigon discord says it can easily take double the time to sync from scratch.

I took an already synced node and moved it to the compressed FS.
Even so, it frequently goes a few blocks behind the tip, it is able to catch it eventually though (see timestamp 09:15:43).

Also CPU usage is constantly higher, I can hear the fans working, be sure to turn on the air conditioner in your room to max. Image
Next, I think this is a mac-specific issue: if you forget to explicitly unmount the FS using CLI, it messes everything and you can't mount it again unless you reboot your computer (I couldn't make it work other way).
I'm pretty satisfied overall, despite the unmount clunkyness, ZFS seems resilient even on accidental unplugs.

I think I'll keep it as my backup testing node for now and use the remaining space to fit all my testnet archives into it (WAGMI?) so I can free my secondary drive.
if you are a ZFS expert, feel free to suggest better configs, the reviews I found on Erigon discord are quite old, not sure if the numbers still apply.

Fin? :)
Addendum: (1) it seems it doesn't like if your mac sleeps, FS just hangs after that, need to reboot

(2) I don't recommend running Otterscan over a node configured this way, search relies on tracing multiple blocks simultaneously, performance really sucks on this scenario
Update: moved all my testnet archives into it and there is still plenty of space :) Image

• • •

Missing some Tweet in this thread? You can try to force a refresh
 

Keep Current with Willian Mitsuda - wmitsuda.eth (☕️,☕️)² ☕️🔊🔥☕️

Willian Mitsuda - wmitsuda.eth (☕️,☕️)² ☕️🔊🔥☕️ Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

PDF

Twitter may remove this content at anytime! Save it as PDF for later use!

Try unrolling a thread yourself!

how to unroll video
  1. Follow @ThreadReaderApp to mention us!

  2. From a Twitter thread mention us with a keyword "unroll"
@threadreaderapp unroll

Practice here first or read more on our help page!

More from @wmitsuda

Mar 18
Asking publicly: @ensdomains , why does my grant got DECLINED to participate in @gitcoin ENS ecosystem round?

After interacting with gitcoin support for a few days, they said they were waiting for the response from the (ENS) team to look at the project (which I agree)

(cont.)
and today they got a response: "going to decline for now" with no more explanations.

I don't want to point fingers at anyone in particular because there may be the case of simply some misunderstanding, and I don't know who analyzed the request.

(cont.)
but I have to complain, Otterscan has been supporting ENS since its first versions because I thought it was an essential feature for a block explorer.

you can use ENS names on whatever type of search variants we support, and addresses got reverse-resolved wherever they appear,
Read 8 tweets

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3/month or $30/year) and get exclusive features!

Become Premium

Don't want to be a Premium member but still want to support us?

Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal

Or Donate anonymously using crypto!

Ethereum

0xfe58350B80634f60Fa6Dc149a72b4DFbc17D341E copy

Bitcoin

3ATGMxNzCUFzxpMCHL5sWSt4DVtS8UqXpi copy

Thank you for your support!

Follow Us on Twitter!

:(