Not sure if this really belongs here, but here goes...
My system has 2GB RAM and 1GB swap, which is the default amount created by Ubuntu. This should be a sensible configuration, but it has a big disadvantage: a runaway process can bring the system to a halt (I have left it for an hour in such a situation to see if it recovered, but no luck) by allocating memory until the system starts thrashing. With 1GB of swap, this can go on for a long time. If processes are not allowed to allocate more memory than 80% of physical RAM (I tested this quickly using ulimit -v) then the system becomes much more stable. (Note that sysctl -w vm.overcommit_memory=2 does nothing to help here.) However, setting such a ulimit by default is not an option, as it prevents some software, such as Wine, from working as it should (Wine needs to control the first 3.6GB of its address space to properly emulate Windows behaviour). Does anyone familiar with this stuff have cleverer solutions to deal with this, that could be applied by default?