Skip to content

ZFS on 1GB with compression ratios that surprise

VPS Hosting by wendy 1 replies 118 views
#1

I know, I know, ZFS on 1GB sounds like a bad idea. Most people immediately say "ARC needs RAM" and walk away. They're not wrong about the defaults. But here's the thing: I have a 1GB HostHatch VPS running ZFS with lz4 on a dataset full of log files and config templates. Compression ratio is 4.21x. Actual disk usage: 180MB for what would be 760MB on ext4. ARC is capped at 64MB. The box is responsive. The secret nobody talks about: zero-filled sparse files and repeated config patterns compress to almost nothing. My application generates 12 identical template files daily. ZFS dedup would murder this box, but lz4 just shrugs. Steps I used:

  • Install zfsutils-linux (yes it pulls 200MB, one-time pain)
  • Create pool as file on existing ext4 root (nested, I know)
  • Set primarycache=metadata, compression=lz4
  • Move data, watch ratio climb
Has anyone else tried this masochism?

Have you tried restarting it?
2 #2

(nested pools (which is what this technically is (unless you got a second disk somehow (which at 1GB you definitely didn't)))) (drives the purists mad (as they should be (probably))) (but the numbers don't lie (4.21x is genuinely funny to me (in a good way (mostly))))

To be fair I replicated this on CloudCone (1GB tier (the cheapest one (obviously))) and got 3.8x on /var/log (nginx access logs (mostly identical user agents (bots (so many bots))))

push. done. coffee.

Post a reply

You need an account to reply. Log in or register to join the conversation.

Post reply Preview Save draft