The Linux OOM Killer: Tuning vm.overcommit_memory for Production Databases

Few sights are more terrifying than logging into an unresponsive production server only to discover that the Linux Out-of-Memory (OOM) killer arbitrarily chose your primary MySQL or PostgreSQL process as its sacrifice.

Linux defaults to an optimistic memory overcommit strategy (vm.overcommit_memory = 0). When applications fork and allocate virtual memory, the kernel says yes, gambling that physical memory won't be exhausted simultaneously. For dedicated database and application servers, tuning overcommit ratios and configuring explicit swap limits is essential insurance against unexpected midnight downtime.

Comments

Popular posts from this blog

The Myth of MySQL Query Cache on Write-Heavy Workloads

Redis Persistent Connection Pooling: Eliminating TCP Handshake Overhead (Vol. 9)

Tuning Linux TCP Sockets for High-Volume Web Traffic (2011 Systems Notes)