3 ms·
If you have the RAM, wouldn't you rather the software use it? Is there some benefit to having memory sitting around empty and idle? As long as the software doe
by smacktoward 8y ago
If you have the RAM, wouldn't you rather the software use it? Is there some benefit to having memory sitting around empty and idle?
As long as the software doesn't require all that memory, but can work OK with less and then scale up to use more if you've got it, I guess I don't see what the problem is.
- ip26 8y agoDoes it gracefully & rapidly clean house if another app needs some? Does the extra usage benefit you in any way at all, to make up for the disk cache it gets used as otherwise?
- est31 8y ago> Is there some benefit to having memory sitting around empty and idle? Yes, modern operating systems use free RAM as cache for the HDD. If you have an I/O intensive process, having a large amount of RAM is really helpful.
- marcosdumay 8y agoHow often do your computer exclusively runs Chrome? How easily can the OS take the memory back from Chrome to run something else (that one is easy, it can not, except on the last case scenario where it kills process).
- 781 8y ago> How easily can the OS take the memory back from Chrome to run something else (that one is easy, it can not, except on the last case scenario where it kills process). It actually can. It's called swapping. An amazing technology from the 90s.
- Jach 8y agoThat's not what GP meant, the analogous situation is loading GBs of data into a database, resulting in a GBs sized file on disk. If you truncate the data, it's gone, but the database won't actually shrink the file on disk unless you vacuum too. Chrome might not be using all the memory it has claimed, but it's not necessarily releasing all that it can back to the system either.
- 781 8y ago> but it's not necessarily releasing all that it can back to the system either. That's exactly the point of swapping. Memory which was not used in a (relatively) long time is taken away forcefully from the process if there is memory pressure on the system. So it doesn't matter if Chrome releases it or not, it will be taken away if it just sits there.
- pritambaral 8y ago> is taken away forcefully To disk. Waiting for the memory a badly behaved app overzealously ate up without using to finish flushing to disk before being able to use it is worse than simply having the memory readily available. This is why I always disable swap, opting to let bad processes die, sometimes even pulling the trigger myself.
- bradknowles 8y agoIf you ever hit actual swapping, then your system performance is already way past the point of no return. In modern systems, paging is okay. But not swapping.
- 781 8y agoIn even more modern systems, with NVMe NAND storage, even swapping is ok.
- jsymolon 8y ago> from the 90s. From the 60s. Atlas computer had virtual memory. I originally thought it was the System360. https://www.computerhistory.org/timeline/1962/ https://www.computerhistory.org/timeline/1962/
- rhinoceraptor 8y agoThat's what the virtual memory system does, provided you're not running with swap disabled. A page fault isn't hard for the kernel to handle, it's just a severe performance hit.
- 72deluxe 8y agoSo should I write software that just leaks and not worry about it?
- ionised 8y agoThat's the Electron way isn't it? Cut corners and offload the trade-offs onto your end users.
- the8472 8y agoIf you have any kind of workload with IO patterns that are not embarassingly parallel you want your files to be in the page caches, i.e. RAM, to minimize the access latencies and thus the walltime of your workload. For that to work applications shouldn't be gobbling up all the ram, instead they should leave it to the OS to cache data. Sure, NVMe drives help, but loading things from RAM is snappier still. Also, those huge memory footprints themselves can also cause issues. E.g. they can increase GC pauses in GCed languages or decrease cache hit rates when allocations are scattered all over the place.
- imtringued 8y agoI played minecraft last year again and it did exactly what you said. I was constantly running out of my paltry 8GB of RAM on a linux system that wasn't running anything except minecraft. If I got unlucky it went up from 98.5% RAM utilization to 100% and then the whole system locked up. It probably was the worst gaming experience in my whole life.