Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
man8alexd
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
10 ms
·
151.
▲
by
man8alexd
1y ago
active pages are not reclaimable.
152.
▲
by
man8alexd
1y ago
Once your active working set starts spilling into swap, the performance degradation goes exponential. The difference in latency between RAM and SSD is orders of magnitude. Assuming 10^3 difference, 0.1% memory excess causes 2x degradation,
153.
▲
by
man8alexd
1y ago
Pages from the active LRU are not evicted. Pages from the inactive LRU with the "accessed" bit set are also not evicted.
154.
▲
by
man8alexd
1y ago
Programs and shared libraries (pages with VM_EXEC attribute) are kept in the memory if they are actively used (have the "accessed" bit set by the CPU) and are least likely to be evicted.
155.
▲
by
man8alexd
1y ago
Neither executables nor shared libraries are going to be evicted if they are in active use and have the "accessed" bit set in their page tables. This code has been present in the kernel mm/vmscan.c at least since 2012.
156.
▲
by
man8alexd
1y ago
VM_EXEC pages are explicitly deprioritized from the reclaim by the kernel. Unlike any other pages, they are put into the active LRU on the first use and remain in the active LRU if they are active.
157.
▲
by
man8alexd
1y ago
You are both confusing swap and memory overcommit policy. You can disable swap by compiling the kernel with `CONFIG_SWAP=no`, but it won't change the memory overcommit policy, and programs would still be able to allocate more memory th
158.
▲
by
man8alexd
1y ago
The proper rule of thumb is to make the swap large enough to keep all inactive anonymous pages after the workload has stabilized, but not too large to cause swap thrashing and a delayed OOM kill if a fast memory leak happens. Another rule o
159.
▲
by
man8alexd
1y ago
Nowadays, the OOM killer always chooses the largest process in the system/cgroup by default.
160.
▲
by
man8alexd
1y ago
In my environment, `systemd-oomd` does nothing with the default settings.
161.
▲
by
man8alexd
1y ago
I assumed the same, but just discovered that FreeBSD has vm.overcommit too. But I'm not sure about its working.
162.
▲
by
man8alexd
1y ago
People disable memory overcommit, expecting to fix OOMs, and then they get surprised when their programs start failing mallocs while there are still tons of discardable page cache in the system. https://unix.stackexchange.com