4 ms·
My advice in the situation when someone wants to "free RAM": "You bought it, better use it." It always felt strange that people buy lots of RAM but want it to
by julienpalard 3y ago
My advice in the situation when someone wants to "free RAM": "You bought it, better use it."
It always felt strange that people buy lots of RAM but want it to be kept unused...
- freedomben 3y agoWell, usually you want to free it so you can use it for something else without hitting swap. At least that's my use case
- lstodd 3y agoThe whole point is that pagecache does not cause any swap hits. Oh my god, it's 2023 and we're still discussing this idea from 1970s. Is that so hard to grasp? No, stuff gets evicted from the cache long before you hit the swap, which is by the way measured by page swap-out/in rate and not by how much swap space is used, which is by itself a totally useless metric.
- Dylan16807 3y ago> stuff gets evicted from the cache long before you hit the swap No...? I'm looking at a machine right now that has 3.7GB not swapped out and 1.2GB swapped out. Meanwhile the page cache has 26GB in it. Swapping can happen regardless of how big your page cache is. And how much you want swap to be used depends on use case. Sometimes you want to tune it up or down. In general the system will be good about dropping cache first, but it's not a guarantee. > measured by page swap-out/in rate and not by how much swap space is used Eh? I mean, the data got there somewhere. The rate was nonzero at some point despite a huge page cache. And usually when you want to specifically talk about the swap-out/in rate being too high, the term is "thrashing".
- fsckboy 3y agocached disk pages are not going to be swapped out, they're just freed (because these pages are already "out" in the same place swapland is) if your cached disk pages keep getting hit and are "recent", they're going to stay in, and your old untouched working pages are going to be swapped out, to make room either for new working pages because you've just loaded new programs or data, or to make room for more disk pages to be cached because your page cache accesses are "busier" than some of your working pages. you will swap out pages to make room for disk cache, but your cached disk pages will never be swapped out, they are just tossed (of course, after any dirty pages are written)
- freedomben 3y ago> The whole point is that pagecache does not cause any swap hits. > Oh my god, it's 2023 and we're still discussing this idea from 1970s. > Is that so hard to grasp? No, stuff gets evicted from the cache long before you hit the swap, which is by the way measured by page swap-out/in rate and not by how much swap space is used, which is by itself a totally useless metric. Not everyone has been alive and into this stuff since the 1970s. That you and I know about this is irrelevant for the new people discovering it for the first time. There is always going to be a constant trickle in from new sources, for as long as it takes for the tech to go away. See relevant xkcd: https://xkcd.com/1053/ https://xkcd.com/1053/ But it's also worth pointing out that RAM/swap/page cache isn't always as simple as page cache out, RAM in. For example, this question[1] seems to indicate that things aren't as simple as you suggest. [1]: https://unix.stackexchange.com/questions/756990/why-does-my-system-heavily-use-swap-when-there-are-86-gb-of-ram-still-usable https://unix.stackexchange.com/questions/756990/why-does-my-...
- lstodd 3y agoThe page cache mechanism is very much alive. That's what we were discussing, is it not? I only lamented the fact that over 50 years the basics of how it works should have become common knowledge but did not. As for the link you provided, I do think I can get a system in a state like that, and that isn't even untrivial. To push firefox into swap, esp if you have just 8 gigs of it is.. simple. But it is not in any way a normal state of a system. Idk how the author got it in that state.
- outworlder 3y agoThe issue is that they think they are reaching their system's capacity.
- jabroni_salad 3y agoBack when I played WoW I would occasionally run into issues with windows trying to put the game into memory compression, as opposed to basically any other process. It turned the game into a powerpoint. You could either get freaky with process explorer, or just keep some overhead so the system wouldn't try to do that. When I asked my guildies, they told me the 'default' for gaming is 16GB now, I was on 8 at the time. Pretty much every gamer will at some point tab out to process manager to see wtf the computer is trying to do and exactly zero of them will think to themselves "I'm so glad there is no wasted memory!"
- spookie 3y agoFor the 3rd paragraph, specifically: That's a fault with Windows not being clear enough with what is actually being in use, and what may be used and already there for a myriad of reasons. (edit: specified my intent on the reply)
- jstarfish 3y agoIt's there for when you need to do something requiring that much memory. Your approach is like buying a giant house, becoming a hoarder, and trying to throw a party.
- deleted 3y ago[deleted]
- OrderlyTiamat 3y ago> Your approach is like buying a giant house, becoming a hoarder, and trying to throw a party. exactly, excepting that the items they're hoarding are occasionally very useful for making their day to day activities go faster. And the hoarder has the superpower that in the blink of an eye they can discard everything that's hoarded to make room for the party. Wait it isn't quite like a normal hoarder at all come to think of it!
- throwaway092323 3y agoJust because it's there, doesn't mean I want the same programs to use more.
- sznio 3y agoI just got a 64GB machine. It rarely sees much use, but I did go over 32GB a few times. Could've done away with less but I still have PTSD from all my applications crashing after I started Teams on my 16GB machine. On another note: Upgrading from i5-2500k to R7-5800X doesn't make Teams faster in any way.