Live data from Hacker News

FreeBSD ate my RAM

crocidb.com

71–80 of 89 posts

Re: FreeBSD ate my RAM

#71

Earlier quoted context omitted.

Instantly reclaimable disk caches should count as available, and they do. This isn’t hard. The OS should just expose a counter for available memory instead of having applications understand every type of memory reservation. edit: Linux does this, but it has its own share of issues with memory counters. The “cached” memory includes tmpfs and ramfs for seemingly no reason.

Linux MemAvailable from /proc/meminfo is just an estimation calculated as an arbitrary percentage (50%) of free and potentially reclaimable memory. You can't determine how much of the memory can actually be reclaimed under memory pressure until you try to reclaim it.

> You can't determine how much of the memory can actually be reclaimed under memory pressure until you try to reclaim it.

Yes, and I’m arguing that we should be able to, by having the kernel keep track.

Re: FreeBSD ate my RAM

#72
post #21
post #2

Interesting post, it made me wonder. At one time FreeBSD swap usage/logic was far better than what Linux did. Is that still the case ?

Yes, It's just not every tool is aware of ZFS ARC. Which is what this post is about. Author just describes in an odd way.

It's a bit odd that you have to query a filesystem-specific value to get simple memory usage stats.

Re: FreeBSD ate my RAM

#73
post #63
post #54

As for the “unauthorized” sign: Book publishers used to print India/SEA-only editions of books only sold in those countries, significantly cheaper than in the US or Europe. Then a Thai guy realized that this would be a good business opportunity: buy cheaper books and then import them to the US. Wiley brought him to court, went to the SCOTUS, Wiley lost the case. So they ended up printing cheaper edition books. https:…

Wow, how did we go from "it's impossible to enforce region locking online because you can transmit information instantly across the world" to "locality more easily enforced in the digital world"?

Most people haven't started using vpns yet.

Re: FreeBSD ate my RAM

#74
post #54

As for the “unauthorized” sign: Book publishers used to print India/SEA-only editions of books only sold in those countries, significantly cheaper than in the US or Europe. Then a Thai guy realized that this would be a good business opportunity: buy cheaper books and then import them to the US. Wiley brought him to court, went to the SCOTUS, Wiley lost the case. So they ended up printing cheaper edition books. https:…

Wow, I've only ever heard of regional pricing being described as an overwhelmingly positive concept. When phrased as "price discrimination", it invokes a completely different set of (negative) emotions in me. It's weirdly uncomfortable knowing that phrasing has such a big impact on one's emotions. It really shows how vulnerable we are to manipulation.

That's why the current crop of authoritarian "think of the children" propaganda is so unreasonably effective

Re: FreeBSD ate my RAM

#75
post #63
post #54

As for the “unauthorized” sign: Book publishers used to print India/SEA-only editions of books only sold in those countries, significantly cheaper than in the US or Europe. Then a Thai guy realized that this would be a good business opportunity: buy cheaper books and then import them to the US. Wiley brought him to court, went to the SCOTUS, Wiley lost the case. So they ended up printing cheaper edition books. https:…

Wow, how did we go from "it's impossible to enforce region locking online because you can transmit information instantly across the world" to "locality more easily enforced in the digital world"?

Silicon valley happened

Re: FreeBSD ate my RAM

#76
post #73
post #63

Earlier quoted context omitted.

Wow, how did we go from "it's impossible to enforce region locking online because you can transmit information instantly across the world" to "locality more easily enforced in the digital world"?

Most people haven't started using vpns yet.

You can't fool me with a VPN when your credit card is a US one.

Re: FreeBSD ate my RAM

#77

Earlier quoted context omitted.

I don’t see how it contradicts my goal. I want memory counters that abstract away kernel behavior that the application has no business accounting for.

The applications, frankly, have no business accounting any memory at all outside of what they use themselves via sbrk/mmap.

I think a memory pressure indicator is useful. For example, if you’re writing a garbage collector, you can choose to hold off from returning pages back to the kernel when the system is under low pressure, and do this more often under high pressure.

Re: FreeBSD ate my RAM

#78
post #4

the end struck me - a picture of an os book. I wonder if students these days retain their books after college, or do they get returned as a rental?

In college ATM and while I usually keep old textbooks, I have sold a couple on ebay to free up shelf space.

Re: FreeBSD ate my RAM

#79

Earlier quoted context omitted.

The applications, frankly, have no business accounting any memory at all outside of what they use themselves via sbrk/mmap.

I think a memory pressure indicator is useful. For example, if you’re writing a garbage collector, you can choose to hold off from returning pages back to the kernel when the system is under low pressure, and do this more often under high pressure.

That's very, very marginally useful. If your application recently ran GC when the system was under low pressure and freed a bunch of pages (and still holds to them), and then some other application suddenly acquires a lot of memory, your application won't free those pages until next GC happens. Which most likely won't until you've used up all those freed pages, and at that point a lot of swapping will already have had happen.

Explicitly set per-application upper bounds à la GOMEMLIMIT and Java's -Xmx, together with cgroup's enforcement, seem to be much more useful in practice.

Or there was a proposal for some sort of SIGLOWEM signal that would be sent to all processes in the system (with default disposition of "do nothing") that'd allow applications to release some of its non-vital memory holdings: also a much more timelier notification.

Re: FreeBSD ate my RAM

#80
post #21

Earlier quoted context omitted.

Yes, It's just not every tool is aware of ZFS ARC. Which is what this post is about. Author just describes in an odd way.

It's a bit odd that you have to query a filesystem-specific value to get simple memory usage stats.

Which is exactly (part of) why people call ZFS a "rampant layering violation"!
Post reply on HN