Reducing Disk I/O in a Minute-by-Minute Treasury WorkerReducing Disk I/O in a Minute-by-Minute Treasury Worker
The network for creativity
Join 1.25M professional creatives like you
Connect with clients, get discovered, and run your business 100% commission-free
Creatives on Contra have earned over $150M and we are just getting started
A job that runs every minute kept getting heavier.
Orbit has a treasury lab: a Base Sepolia testnet experiment that only moves valueless test USDC. A worker checks the wallet every minute. Earlier this month the project's Disk IO budget started draining.
The cause: each run saved the whole wallet state as one JSON value. That state gained a reconciliation on nearly every scan and never dropped one. So every minute the database rewrote a bigger document than the minute before, and every transfer row was rewritten too, even when nothing had changed.
The fix: → The wallet row keeps only the newest 20 reconciliations (the screen shows 10). Every one is still kept in an append-only table. → Unchanged transfer rows are no longer rewritten. → Treasury pages stop polling while their tab is in the background. → A daily cleanup keeps one week of cron run history instead of all of it (that job alone adds 1,440 rows a day).
The lesson I keep relearning: anything that runs on a timer needs a ceiling. If a payload only ever grows, the bill grows with it.
What's the sneakiest background cost you've found in your own projects?
I take on PRDs, AI-built MVPs and UX audits. DM me.
Post image
Back to feed
The network for creativity
Join 1.25M professional creatives like you
Connect with clients, get discovered, and run your business 100% commission-free
Creatives on Contra have earned over $150M and we are just getting started