unbit/uwsgi — pull request #379 by prymitive (2013-09-13 22:51:31+00:00)
Title: allow setting cheaper rss memory limits

This patch allows user to set rss memory limits for cheaper:
```cheaper-rss-limit-soft ``` will prevent cheaper from spawning new workers if total rss memory of all workers is >= this value
```cheaper-rss-limit-hard ``` requires soft limit to be enabled[1], if total rss memory of all workers is >= this value cheaper will cheap one worker and ignore needed_workers value returned by cheaper algo

[1] - it makes no sense to only set hard limit, it would cheap a worker if hard limit is exceeded, but without soft value it could be respawned right away

Obviously to work properly one needs to provide:
```hard limit - soft limit > average worker memory usage```
Setting values to close to each other might result in way too aggressive cheaping.

Please review