OS Memory Management

Cluster debates operating system handling of RAM and virtual memory, including why OS uses nearly all available RAM for caching and page cache, virtual vs physical memory distinctions, and whether applications should manage memory instead of the kernel.

πŸ“‰ Falling 0.5x DevOps & Infrastructure
3,242
Comments
19
Years Active
5
Top Authors
#2495
Topic ID

Activity Over Time

2008
10
2009
67
2010
126
2011
100
2012
177
2013
165
2014
103
2015
116
2016
125
2017
130
2018
184
2019
256
2020
232
2021
287
2022
275
2023
340
2024
247
2025
269
2026
33

Keywords

RAM MS CPU SSD PSS CI SHR OS RAID VM ram memory virtual memory usage os processes usage cache disk process

Sample Comments

jheriko β€’ May 20, 2015 β€’ View on HN

i can't help but wonder if this has been tested vs. just letting the os virtualise memory for you... i'm assuming yes.

necovek β€’ Oct 1, 2025 β€’ View on HN

Considering he's got a 16GB of RAM, this is virtual memory, and most programs don't need to keep it all loaded at all times (if they do, you'll notice with constant paging exception handling).

megablast β€’ Oct 17, 2014 β€’ View on HN

Memory does not work the way you imagine it does. OS do not optimize for keeping memory empty.

thedaemon β€’ Dec 3, 2018 β€’ View on HN

If your OS is running totally in virtual memory instead of mostly RAM I see a problem.

pjmlp β€’ Aug 8, 2024 β€’ View on HN

Because it isn't taking RAM for its own use.

Maskawanian β€’ Aug 26, 2016 β€’ View on HN

Virtual memory should be handled by the operating system not re-implemented by each application.

mrec β€’ Sep 6, 2016 β€’ View on HN

I'm curious - what's the benefit of doing this sort of thing at the application level, rather than letting the OS's virtual memory system handle it as usual?

tgv β€’ Aug 23, 2022 β€’ View on HN

Are you sure that isn’t file cache and such? The OS uses as much of it as it can.

rurban β€’ Jul 9, 2015 β€’ View on HN

Why? Reserving virtual memory has nothing to do with actual memory usage.

someone_here β€’ Nov 5, 2010 β€’ View on HN

Why do applications think they can manage my memory better than my kernel?