Finding a low-memory browser
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. Ouch.
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.
UPDATE: A commenter below says my results are flawed as I'm not taking into consideration how shared memory works. I am not sure (yet) I agree. Here is Chrome's about:memory feature. Who can offer thoughts?
About Scott
Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.
About Newsletter
Nice test btw.
I was just complaining about the same thing today on twitter. I am going to see how FF treats me for a while.
For example, on my computer the Google Voice extension uses 15.4MB private memory, but 14.3MB of that is shared! Your results are flawed.
To properly measure memory usage of Chrome, go to about:memory or click that "stats for nerds" link in the task manager. Firefox probably can not be measured in the same way either but I'm not familiar with it.
Totally with Hanselman on the idea that everyone needs more memory now. As everyone keeps running more and more "apps" in the browser, they're going to need more memory. In the case of phones/tablets especially though, they're going to be way better at memory usage as they're really only ever (fully!) running one app at a time. Maybe the web needs to start taking queues from the native app space and doing similar things.
Otherwise would you recommend Scott?
Maybe I'm just an IE fanboy, but it seems people don't hold all browsers up to the same standard.
So far I haven't had to change the resolution to deal with any scaling issues, but some things get pretty tiny (but still clear). The trackpad is error-free for me, although I mostly use touch.
One problem with the trackpad gestures is that a rightward swipe too close to he left edge is registered as a left edge swipe, causing the last app to come full screen. Pretty unsettling and annoying after it happens several times. You can turn this off by going to Metro settings > PC and devices > Corners and edges > Turn option 2 "When I swipe in from the left edge, switch between my recent apps instead of showing a list of them" to off. Then you see the list instead and can abort of select the app you want, not just the last one. I like this better with touch as well.
That's my Lenovo Yoga 2 Pro mini-review. Hope you get one (in orange!) and like it @Josh.
VS 2013 runs great on it. I haven't had the need to drop to 1080p. From what I hear, battery life suffers compared to some other ultrabooks, but plenty good enough for my needs (6+?).
Best Buy had the i7 with 8gb ram and 256gb drive for a good price, and they've got a nice return policy if that concerns you.
Great post, I didn't realise how much of my RAM was being consumed.
So even if you "only" have 4 gigs of RAM available, as long as you're not doing anything else RAM intensive, the OS will allow Chrome to use the majority of it. I could be mistaken, however.
#yolo #swag #screw-4-gig-ultrabooks
but one question about the yoga2, i remember you hat a thinkpad yoga (at least for a lenovo hangout)
what would you say comparing these two laptops? why did you choose the yoga 2?
Struggling with the same problems with chrome!
Totally agree with you regarding the shared memory!
I've been struggling with Chrome for a while: Chrome will lock up, and freeze until i forcefully close it... usually happens after sleeping the PC.
So i jumped over to Firefox to see if it was better - The problems immediately arose: The 5 most used websites ran terribly :( .. Firefox is my first choice because of Firebug. But the performance is just to damn bad, that it was unbearable.
IE11 runs pretty sweet, but the amount of addons and their quality just makes it the least favorite browser to use. The new developer tools are awesome - when they don't crash the browser...
so i'm back to Chrome :-/ ... and have purchased 16 Gig of RAM
You need to take a look at the ReadyBoost (USB) feature.
Just about 99.9% of the non-desktop devices (laptops, netbooks, etc.) that any developer would ever be stuck with will benefit from ReadyBoost.
The only thing that drives most Windows user nuts is the 4GB default setting while configuring ReadyBoost.
Here's an option to use your FULL USB drive space:
http://www.youtube.com/watch?v=g3XogBX-gX4
Finally, make sure that if your device is USB 3, use a USB 3 flash drive.
rob
Shared memory is a bit of a double edged sword for counting these numbers. In your example Google Voice may have 14mb of memory that is marked as shared, but it may not actually be shareable. For example if you load files from disk (as resources) into memory they will get marked as shared. So if Google Voice is loading (for example) all of it's audio resources etc into memory then they will appear in the "shared" section but nothing else will ever make use of them.
You can see this in action by looking at the screenshot. The summary shows how much memory is actually being shared, and the tab details show how much memory can potentially be shared.
I have two older computers (4G Acer and a dual boot Dell Dimension E510 running Lubuntu) that use Synergy which turns my two computers into a "single" powerful computer.
BTW, Synergy works better between Windows & Windows or Windows & Apple where you can even drag and drop items from one computer to the other. Another thing I have found useful is BitTorrent Sync for files that need to be kept in sync between the two computers.
If they can just improve the developer tools (the new ones are much, much better, but still not great), and add a proper extension framework I don't see why anyone would use Chrome.
Just wondering which plugins you were running, I know Chrome Flash has overhead, in addition to any others you may have loaded up.
If you are running Canary, which is a bleeding edge developer version and may not be running as tight as consumer Chrome, I'd be interested in seeing the memory comparison.
I'm running both on my machine, but I only use Canary for debugging/profiling/working with a single web site at a time. I do all of my other browsing in Chrome proper.
Now I know why I don't use Chrome or Firefox anymore on my 4 Gig system. :)
My personal favorite method is to use Mark's VMMap (Sysinternals) to empty an apps working set first, run through a scenario and then go back and look at how many pages were brought in as a result. The great thing with VMMap is the level of detail.
[Of course memory use is just one metric and often a tradeoff with other 'resources' like CPU, GPU or security protection like in the case of Chrome's multi-process architecture. Ymmv :)]
Even some of my chrome web apps that I had were loading up as processes when booting up my computer and taking up a bit of memory. I have removed those web apps and disabled all extensions I am not using to get some of my memory back from Chrome.
spy_agencies_ban_lenovo_pcs_on_security
Members of the British and Australian defence and intelligence communities say that malicious modifications to Lenovo’s circuitry – beyond more typical vulnerabilities or “zero-days” in its software – were discovered that could allow people to remotely access devices without the users’ knowledge. The alleged presence of these hardware “back doors” remains highly classified.
Around 2003, Microsoft wins the browser wars, disbands the IE team to work on the next biggy, that'll kill the internet (source: the fabulous Douglass Crockford). 2013-ish: Google takes Lars Bak and some team members off Chrome/V8 to work on Dart.
The result of Google's action: my laptop fans spin chirp: not again! when I just open Chrome (talking Canary here)
.. that's all before I really start thinking that 16Gb should be entry level.
I also bought (for home) the I7 version of the Yoga 2 Pro - awesome machine, fast, light, and no more worries with IE11 with the extra RAM and the SSD.
Apps and the OS purposely use more memory for better performance. If memory is available it's better to use it then not use it.
Are actually seeing a performance issue there may be memory leak somewhere but if there is no performance problem and memory gets managed as is should in a modern OS is there even a problem?
If you haven't tried IE since version 8 you owe it to yourself to give IE11 a try. True, better dev tools would be nice but not often you can have your favourite cake and eat it too ... well sometimes you can eat it but feel really bloated afterwards.
Thanks for the article Scott, might be the straw to convince others in my company to stick with IE11 'cause it works.
Seriously, disk deduplication is great for hyper-v and constrained SSDs (256GB will easily act as 500GB), but without cold hard RAM, I cannot developer diddley squat without misplacing my faeces.
- IPS full hd touch laptop in 13.3"/14" in ultrabook format
- 16GB RAM
(a) The simple summing of memory for chrome processes is wrong (ignores shared memory)
(b) High RAM utilization is NOT necessarily a bad thing.
You seem to have about 25% of memory free for random stuff. The rest really should be utilized, instead of relying on fetching data from the web / disk. A real problem would be system was thrashing (page-faulting and swapping in pages from disk all the time).
How is your performance like?
I know from first hand that IE 11 still has terribly junky performance on both regular sites and webapps. I use it at work for some sites, and I administer several computers for the family. Even on fresh installs IE is really an unresponsive beast - and from an unscientific impression - with Gmail and ad heavy news sites, it takes about the same amount of memory as chrome.
4GB is not a lot for modern developer rigs. Web applications take up around the same as a desktop application would , if not more (for caching since js and web is slow). VS2013 is not horrible, but is still a huge IDE.
http://www.howtogeek.com/128130/htg-explains-why-its-good-that-your-computers-ram-is-full/
function Measure-Browsers()
{
$chrome = get-process chrome -ErrorAction SilentlyContinue
if ($chrome -ne $null)
{
$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))
}
$fox = get-process firefox -ErrorAction SilentlyContinue
if ($fox -ne $null)
{
$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))
}
$ie = get-process iexplore -ErrorAction SilentlyContinue
if ($ie -ne $null)
{
$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))
}
}
http://geekswithblogs.net/anirugu/archive/2013/11/09/html5test.com-score-in-november-2013.aspx
I think its time for them to focus more on reducing resources and fixing bugs than adding new things. It might even be good to remove features that aren't popular, perhaps making them into some kind of extension.
For me I always preferred firefox mainly because of the much richer addons, chrome users should give it and other browsers another try things have changed a lot since Chrome was king.
wtf?
if that isn't enough for a browser the browser is BLOATWARE (to the extreme!)
a nice feature I wish browsers had is some kind of setting to put a limit on ram it is allowed to use
(sure it might break some pages with way-too-hungry javascript or flash but if they need that much those pages need fixing anyway! - and letting them break by default might encourage people to fix their pages!)
In these recessionary times 4G RAM on a desktop pc is still regarded as pretty decent by most people!
Comments are closed.