The Cookie Machine - Click here to drag window

DUMMY TEXT - Real text set in assets/js/theCookieMachine.js

If you can read me, I'm broken!

Views: 25,853     Votes:  35 
Tags: 16.04   google-chrome   ram   memory-usage  
Link: 🔍 See Original Answer on Ask Ubuntu ⧉ 🔗

URL: https://askubuntu.com/q/817995
Title: Google Chrome will take up my memory to the point where it causes my computer to freeze to a near halt. What can I do to prevent this?
ID: /2016/08/28/Google-Chrome-will-take-up-my-memory-to-the-point-where-it-causes-my-computer-to-freeze-to-a-near-halt.-What-can-I-do-to-prevent-this_
Created: August 28, 2016    Edited:  October 4, 2017
Upload: September 15, 2024    Layout:  post
TOC: false    Navigation:  false    Copy to clipboard:  false


The short answer: In Chrome, press Shift+Esc to see what tabs are using up too much RAM, and refresh or reload those tabs from time to time to reclaim memory.

The long answer: I think this is more of a Chrome problem than a Ubuntu problem.

I recently ran into this problem using Windows 7 with a Chrome tab opened on rt.com with the comments section at the bottom of a story opened. The comments section is driven by spot.im and will consume over a gigabyte of RAM over an hour of doing nothing but sitting there. Windows 7 would issue a low RAM error and then I’d have to reboot. The same problem exists within Ubuntu + Chrome but not nearly as bad as Windows + Chrome.

Then I discovered Shift+Esc within Chrome to bring up memory display stats, where I could watch how much RAM each tab was consuming. This works on Windows and Ubuntu.

When available memory (RAM + SWAP) runs low, a program called “OOM Killer” (Out of Memory) starts up and “intelligently” kills running applications and stops new applications from running. OOM Killer was improved in Linux Kernel 4.6, but I can’t say exactly how.

I did a test the other night using Chrome to burn up 95% of RAM and 65% of swap using OOM killer under Kernel 4.7.1 and the system remained stable. I couldn’t do new things like Alt+Print Screen but could still reboot no problem. Chrome did error out on reboot and couldn’t restore the 20 odd tabs from the previous session, but that isn’t a surprise.

⇧ Printer Brother DCP 1610W not working under Xubuntu 16.04 best way to dual boot Ubuntu with windows 10?  ⇩