I'm testing a 4GB Lenovo Yoga Pro 2 this week and I'm finding I'm running right up against the 4 gigs of RAM in my daily work. I usually have Visual Studio open, a browser, and a few other apps. I have IE, Chrome, and Firefox pinned in my Taskbar and usually work in Chrome. I (this just happened to be) had these tabs open:
- Outlook.com (work email), Gmail (home email), Twitter.com, TroyHunt.com, StackOverflow.com, ArsTechnica.com, Amazon.com
Here's my task manager showing the Chrome "Canary" processes:
And here's the internal Chrome task manager (which is great!) showing what's really happening:
Certainly the memory used by my growing collection of Chrome extensions adds up. Some tabs that are "apps" like Gmail and Outlook use a 100megs or more. Regular "pages" (things that aren't heavy JS users) like Troy's blog or ArsTechnical use maybe 10megs.
If I run a small PowerShell script to collect the chrome.exe's and sum their physical memory use:
$m = ps chrome | measure PM -Sum ; ("Chrome {0:N2}MB " -f ($m.sum / 1mb))I get about 1.6 gigs! On a 4 gig machine.
C:\> .\memory.ps1
Chrome 1,623.08MB
Virtual Memory is even worse, at 6.3gigs! I start to trim the extension-fat by going to Tools | Extensions and disabling extensions I don't need now. If I'm debugging JSON, for example, I'll turn JSONView back on as needed.
Modifying my script to measure both Virtual and Physical Memory and running again with ALL non-essential plugins turned off.
C:\> .\memory.ps1
Chrome PM 1,151.72MB
Chrome VM 4,056.56MB
Big changes. Clearly the plugin thing can get out of hand quickly and running too many on a low-memory machine is a killer. I got a half-gig of memory back disabling my extraneous extensions.
Let me try the same seven sites in IE11 with no add-ons (extensions) enabled either:
IE PM 604.11MB
IE VM 1,801.23MB
Nice improvement, less than half the VM and just over 600 megs PM. Now I'll try Firefox "Aurora." Again, same sites, logged in and running in the same state:
Firefox PM 426.58MB
Firefox VM 824.02MB
Nice. Some excellent memory optimization work happening at Mozilla it seems.
Of course, this is just 7 random sites that I happened to be visiting. Here's my poorly written PowerShell script memory.ps1
$m = ps chrome | measure PM -Sum ; ("Chrome PM {0:N2}MB " -f ($m.sum / 1mb))
$m = ps chrome | measure VM -Sum ; ("Chrome VM {0:N2}MB " -f ($m.sum / 1mb))
$m = ps firefox | measure PM -Sum ; ("Firefox PM {0:N2}MB " -f ($m.sum / 1mb))
$m = ps firefox | measure VM -Sum ; ("Firefox VM {0:N2}MB " -f ($m.sum / 1mb))
$m = ps iexplore| measure PM -Sum ; ("IE PM {0:N2}MB " -f ($m.sum / 1mb))
$m = ps iexplore| measure VM -Sum ; ("IE VM {0:N2}MB " -f ($m.sum / 1mb))
It may be that these browser builds aren't all optimize for memory usage. I don't know. They were/are the ones I have on my machine and the ones I use. Your system, your sites, your browser builds, and your video card will change these results. Measure for yourself.
For me, I need more RAM. 4gigs just isn't reasonable no matter what browser you're running.
© 2013 Scott Hanselman. All rights reserved.