Hacker News new | ask | show | jobs
by benreesman 554 days ago
No one likes leaking resources, but it happens to the very best teams.

It seems like a tool that can propose a good guess about where you landed is strictly useful and good?

1 comments

> but it happens to the very best teams.

I am very convinced it does not. I think where the apex between our viewpoints lies is what we recognize (or not) as "best" teams.

Sometimes you show up to your job and find that you have 10000 square pegs that need to go through a circular hole. You can over time fix this problem but sometimes you need a stopgap. You may or may not ascribe to the google SRE creed but the goal is to get stuff working today with what you have however ugly it may be. Some hacky tool to restart programs to fix memory a memory leak is sometimes necessary due to time constraints or being a stopgap. Migrations at large companies can take multiple years whereas I can install this tool with helm in approximately half a day.
> Some hacky tool to restart programs to fix memory a memory leak is sometimes necessary due to time constraints or being a stopgap.

This makes sense for K8s resources that ARE still serving production traffic. But this overall thread is about a tool to remove applications ARE NOT serving production traffic.

> Migrations at large companies can take multiple years

Depends who is in charge and who management considers worth listening to (some of us don't struggle so hard in this area).

> I can install this tool with helm in approximately half a day.

A script I wrote to find unused resources took less than 10 minutes to write.

If you know how to do serious software without spilling any memory then you should write it up and collect the most significant Turing Award ever.

Hackers would be immediately bifurcated into those who followed that practice and those who are helpless.

> If you know how to do serious software without spilling any memory

This thread is about K8s Pods (and other K8s resources) that have been sitting idle, not memory leaks in software.

As far as "spilling" memory, the problem has already been solved by Rust which does not do garbage collection because it has static memory mapping. Does this mean egregious amounts of memory won't be used by some Rust programs? No. But unlike languages with garbage collection, where Rust is using that memory it is actually doing something with that memory.

I can assure you that memory leaks specifically and resource leaks generally are possible in any language more expressive than a stack machine with an arena.

Rust makes an interesting and demonstrably pragmatic set of tradeoffs here as opposed to e.g. C/C++: treating std::move as a default (aka linear typing) prevents a lot of leaks. But it still has pointers (Arc, etc.) and it still has tables: it’s still easy to leak in a long-lived process doing interesting things. For a lot of use cases it’s the better default and it’s popular as a result.

But neither Rust nor k8s have solved computer science.

:-)
Heh, yeah. No, no they have not.