logoalt Hacker News

loeglast Friday at 8:37 PM2 repliesview on HN

How does disabling overcommit waste RAM?


Replies

jcalvinowenslast Friday at 8:38 PM

Because userspace rarely actually faults in all the pages it allocates.

show 1 reply
PunchyHamsteryesterday at 3:06 AM

overcommit 0

- Apache2 runs. - Apache2 takes 50MB. - Apache2 spawns 32 threads. - Apache2 takes 50MB + (per-thread vars * 32)

overcommit 2

- Apache2 runs. - Apache2 takes 50MB. - Apache2 spawns 32 threads. - Apache2 takes 50MB + (5032) + (per-thread vars 32)

Boom, Now your simple apache server serving some static files can't fit on 512MB VM and needs in excess of 1.7GB of memory just to allocate