Hacker News new | ask | show | jobs
by erulabs 382 days ago
Sort of wild that a small improvement to relay log processing could almost certainly offset one’s entire lifetime of carbon. I mean, I’m genuinely happier with a tiny latency reduction but it’s still wild the scale at which MySQL operates.

Maybe these optimizations can let me avoid moving to Vitess for another year!

2 comments

Keep in mind optimization effects can be counter-intuitive, as you need to consider unexpected second-order effects. Say what if my queries being slow forced me into optimizing them via cache that I wouldn't use otherwise, resulting in 10x improvement, but if MySQL is a bit faster I would've reached my initial performance goals without that cache, thus increasing the total carbon footprint?

And if this sounds contrived, this is basically what happened with our hardware vs. software optimization situation. We could do wonders on a 1MHz chip with 2MB of RAM in the 1980s, but now we need literally many thousands of times that capacity just to boot our OS to an empty screen.

Every time hardware improved, software bloated up. Thus eventually we had so much disposable compute just for... again, literally... playing games and crypto scams, that we invented AI running on it. And now that AI is once again blowing up our energy needs.

All that, because hardware kept optimizing, software kept compensating by becoming worse, and thus new use cases revealed themselves that would be impossible before, but rather destructive to climate.

I would say that this is basically an example of the Jevons Paradox: https://en.m.wikipedia.org/wiki/Jevons_paradox

Having a cheaper, more available resource increases overall utilization of that resource.

I often think this is the crux to the Great Filter. To overcome our natural, purely economic behavior, such as this paradox, and act intelligently considering long-term effects and sustainability.

Because it's easy to just drift along with the tide. Even bacteria follow those "economic" laws with regards to replication, food/energy, competition and so on. It takes no effort. And the only thing that keeps bacteria in check is that there is someone above them, limiting them.

We want to be on top, but we don't act with the according responsibility. We can learn this lesson through misery and pain. But this is also how bacteria learn. It'd be sad if we can't do better.

Notice all multicellular organisms exist through their cells implementing such restraint. Cells restrain themselves on function (gene expression) and on replication. When they stop doing that, they revert to pre-organism behavior, and we call it cancer.

We call ourselves a society, but we're only experiencing brief flashes of what this means. Insects like ants and bees are literally better at it, than we are. Lots of work to be done...

Great comment.

I have similar thoughts relating to hive mind vs independent societies or progression under autocratic vs democratic societies.

The collective that can organize fully towards a goal is going to beat a collective that can't, or takes steps backwards every 4 years.

Autocracy is one way to organize towards a goal, but since it's very narrow in its field of view, eventually it falls apart from the inside, because it can't balance the interests of the whole with the interests of its constituents individually.

A stable system has fractal stability as you go deeper. You can't make a car go faster than its parts can withstand before they fall apart. Even if you press the pedal really strongly.

Democracy is indeed a compromise - we cripple synchronization at a macro level, so that we get to enjoy some individual freedoms. But it also results in hidden structures of control, like corporations growing so large within a "free market" that they start buying power, and this feeds a cycle of autocracy that is even more toxic than the ideological kind, as it's entirely driven by the profit motive.

So essentially, we first need to escape the false dichotomy of autocracy vs democracy and think what transcendent paradigm includes positive elements of both, and some novel ones, but it includes less drawbacks from each. And I think we can mine nature and software architectures for inspiration, as they're rich with working models we haven't even tried yet at a social level.

But I don't think we're moving towards that. We just wobble between anarchy and fascism and somewhere in the middle is what we call "normal" (but ain't).

>Maybe these optimizations can let me avoid moving to Vitess for another year!

Any reason why considering Vitess isn't exactly new and has been stable enough? Other than no need to introduce additional complexity unless absolutely necessary.