Australian Technology

Keeping an eye on Chrome’s memory usage

Takeaway: Keeping track of Chrome’s memory usage is easier said than done when it is spread over multiple processes.

One of the identifying marks of Chrome is its multi-process architecture that loads each tab and plug-in in a separate operating system process.

While the process isolation gives the browser better stability and security, it is harder to keep track of Chrome’s total memory usage, especially if you like to sort running applications by used memory percentage.

Before we get to that point, you can use Chrome’s built-in tools to track memory usage, if absolute values are your preference.

First up, you can try Chrome’s Task Manager, which hides under the Tools menu.

But I prefer using Chrome’s “About memory” page, which is accessible via the about:memory or chrome://memory-redirect/ URLs. I like that Chrome includes the memory usage of other browsers for comparison.


(Click to enlarge)(Screenshot by Chris Duckett/TechRepublic)

For those who prefer used memory as a percentage, I used the following line in Linux to sum up Chromium’s memory use:

ps -eo pmem,comm | grep chromium | cut -d " " -f 2 | paste -sd+ | bc

To break it down, the -e flag on the ps command shows all processes, and -o pmem, comm option makes ps output only the used memory and command columns. That output is then restricted to only Chromium processes via grep.

Since I only want to sum up the memory used column, I use cut to reduce the output to a column of numbers representing memory used.

Then paste is used with the -s option to reduce the list to a single line, and -d+ is used to change the delimiter from a space to a plus sign.

At this point, we have a string in the form of a+b+c+d+e, so to actually do the summation, I pipe that into bc, the basic calculator.

The output of this command was a little shocking when I first ran it.


Chrome performs well when you feed it RAM (click to enlarge)(Screenshot by Chris Duckett/TechRepublic)

Over 40 per cent of my computer’s memory is being used by Chromium! It’s hard to notice the total memory used in top when all of those individual processes take up 3 per cent to 5 per cent each.

Maybe Chromium should follow Mozilla’s lead, and have its own project MemShrink.

Get IT Tips, news, and reviews delivered directly to your inbox by subscribing to TechRepublic’s free newsletters.

Chris Duckett

About Chris Duckett

Programmer and journalist Chris Duckett is the Editor for TechRepublic Australia.

Chris Duckett

Chris Duckett
Chris started his journalistic adventure in 2006 as the Editor of Builder AU after originally joining the company as a programmer. He left CBS Interactive in 2010 to follow his deep desire to study the snowdrifts and culinary delights of Canada and returned to CBS in 2011 as the Editor of TechRepublic Australia, determined to meld together his programming and journalistic tendencies once and for all.
1
Comments

Join the conversation!

Follow via:
RSS
Email Alert