System hangs when using too much RAM even with swap off

When I run a piece of python code that uses too much RAM, my computer would start to swap so badly that I had to do a hard reboot. To fix this I turned off swap assuming that the OOM killer would step in. However, I still get exactly the same symptoms! That is I can hear the hard drive thrashing once all the RAM is used, the computer freezes and I have to do a hard reboot.

What could be going on and how can I fix it?

My system is running Ubuntu 14.04.2 LTS, 3.13.0-43-generic #72-Ubuntu SMP Mon Dec 8 19:35:06 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux with 8GB of RAM.

My /etc/fstab shows

# / was on /dev/sda1 during installation
UUID=80919e96-e83b-4c88-b30e-8673e1faa3b4 /               ext4    errors=remount-ro 0       1
# swap was on /dev/sda5 during installation
#UUID=68064725-c1bb-4293-b8d1-45b2a42fb7b4 none            swap    sw              0       0

Source: ubuntu

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.