MacOS – How to hunt down which tab or webpage (on Google Chrome) used a lot of memory

google-chromemacosmemoryvirtual-memory

I already know Google Chrome was using a lot of memory for a badly behaving webpage. The issue was I don't know which webpage was doing that.

Sometimes after a day or two, possibly some webpage on Google Chrome might be using a lot of memory.

  • Some webpage might not be intentionally broken or harmful but it could be the analytics or the ad system having a lot of memory leaks in their code
  • Eventually, the Macbook swaps memory to disk and if unchecked, complaints of hard disk space running low arrive.

Using trail-and-error, if I close all tab and wait 2 – 3 minutes or quit entirely, then the hard drive all of a sudden gains back 2GB.

Is there a way to hunt down which webpage is eating up so much memory, other than by trail-and-error?

Best Answer

Chrome has a task manager that will be handy in case you have too many tabs to simply close them manually and note when memory reclaims.

  1. On your computer, open Chrome.
  2. At the top right, click the vertical "dot dot dot" icon.
  3. Select More Tools and then Task Manager.
  4. Click “Memory” to sort tasks by memory usage. - Tip: Look for any items labeled "Background page."
  5. Select the task you want to close.
  6. Click End Process. - Note: Any unsaved work in your task will be lost.

I would also run vm_stat 1 and watch the OS memory allocations and freeing so you can watch the effects as you close tabs and see tasks free in the app.