antirez/redis — pull request #1690 by yossigo (2014-04-15 18:51:52+00:00)
Title: Add oom-score-adj configuration option to control Linux OOM killer.

This is a Linux-specific feature, sorry, but it's still a useful one.

When Linux runs out of memory the kernel's OOM killer chooses which processes are going to be killed based on various parameters. By tuning the oom_score_adj parameter (in /proc), it's possible to hint the kernel what processes should be killed first.

The oom-score-adj configuration parameter allows Redis processes to tune their own oom_score_adj value depending on their current state/role and thus implement policies such as:
- Kill bgsave/bgrewriteaof childs before anything else
- Kill slaves before masters