12 ms·
Memory use seems like a really pointless thing for users to care about. There's a widespread intuition that using RAM is inherently bad and low memory usage is
by jdietrich 14y ago
Memory use seems like a really pointless thing for users to care about. There's a widespread intuition that using RAM is inherently bad and low memory usage is a worthwhile goal, but it doesn't really make sense. The key performance goal is minimising latency, which is best served by using as much RAM as possible without having to swap out.
RAM is now fantastically cheap. 16GB of DDR3 costs less than $120 in either DIMM or SODIMM format, so there's little reason not to load out your machine with far more memory than you'd practically need.
I'd like software to use more memory, not less - for the vast majority of the time, most of my RAM is unused and my disk is idle, so why not use an aggressive strategy of pre-emptive caching?
- reggplant 14y agoRemember not everyone can afford the latest beast of a machine that can accommodate 16GB RAM, some people still have laptops that can hold a maximum of 4GB by design limitation; it's more likely to be those people worrying about Chrome's RAM usage.
- FigBug 14y agoAnd RAM uses power, whether it's being used or not. Having more RAM means shorter battery life.
- jonknee 14y agoI suspect the power penalty of RAM is made up for by the fact that you don't have to hit the hard disk to get that data back (firing up the HDD will suck a lot of juice). It also appears the needs are pretty much tied to the chip, so a 4GB and 8GB module use about the same amount of power. http://superuser.com/questions/40113/does-installing-larger-ram-means-consuming-more-energy http://superuser.com/questions/40113/does-installing-larger-...
- Inufu 14y agoI have 16 GB in my ThinkPad (x230) and it still lasts 10 hours, so that's really negligible.
- srgseg 14y agoNot only does it save you memory, it also reduces CPU usage because Chrome would otherwise continue to run scripts in all of your open tabs. Depending on the complexity of the web pages, having 100 open tabs can easily cripple a brand new laptop with 8GB ram.
- rikkus 14y agoHaving 100 open tabs would be unmanageable from a UI perspective. I can't deal with more than about 8 open at once, per window. I just bookmark stuff to come back to later if I'm dealing with more. So ... it's not a technical problem.
- jdangu 14y agoDid you try Ctrl-tab?
- qu4z-2 14y agoMy UI lets me press b to do a substring search on the url/title, which makes managing 100+ tabs trivial. And I often need to have a lot of tickets/revisions/forum threads/stack overflow questions open in tabs at the same time for my work. Don't project your UI limitations onto other people please :)
- mgkimsal 14y agoand buying a decent new machine to put that 16gb in costs some more. And migrating all your stuff over to that new machine takes time. And then everyone will continue to write code without regards to memory usage, and we'll be complaining that Chrome 45 locks up 19g per tab, and people with your mindset will say it doesn't matter because 1TB ram chips are cheap enough at $400 to just upgrade. Just having loads of stuff using RAM takes more time to manage. I would not have imagined in 2013 with 16G of RAM and a > 2ghz multi core processor that I would still get system hangs and beach balls in my OS, but I do.
- mootothemax 14y agothere's little reason not to load out your machine with far more memory than you'd practically need. Unless you simply can't install more RAM without buying a whole new laptop. That's certainly the case for my laptop; its Intel i5 only can address 8GB max. Memory is cheap, but buying a new laptop sadly isn't, especially when it's a decent development machine, and a step above standard consumer configurations.
- kintamanimatt 14y agoCompletely disagree. We've seen too much complacency in recent years when it comes to memory usage. Developers think it's ok for their applications to bloat out and have a huge memory footprint. I'd rather applications were developed in such a way that they were more memory efficient. I've had a recent incident in which Chrome was consuming about 7GB of memory, just because I had about a hundred tabs open! It was really, really, insane. This reckless disregard for memory usage caused more problems in terms of performance, and it wasn't apparent what was happening until things started OOM'ing. (Swapping is really just as bad as an OOM - the computer's practically useless if it's trashing due to low memory.) Your ideal situation of having more memory used will, in many cases, lead to degraded performance.
- asafh 14y agoI agree with you, but 7GB for 100 tabs sounds likes something unusual happened. I usually have around 200-350 tabs open (Yes, I'm hoarding, I'm aware of it). I usually terminate their processes and respawn them when I need them (their state is not lost) but IIRC, when I don't I get around 3GB for 200 Tabs
- kintamanimatt 14y agoI've seen this many times, and it seems to depend on the complexity of the page being rendered. I did close and re-open things, much to the same result.
- theorique 14y agojust because I had about a hundred tabs open That is a lot of tabs, though.
- kintamanimatt 14y agoNot really, especially if you're doing a lot of research, or for whatever reason the page is particularly complex and it causes the process that tab is running under to consume a lot of memory.
- pavanky 14y agoIt is not about money, it is about sloppy programming. Sure you can use more memory, but not at the cost of disrupting everything else on the system. For example most of the netbooks / ultrabooks or whatever you call them (including macbook air) used to come with 4GB at most. Upgrading them is a pain, and having a memory hog is definitely an issue in those cases.
- Fargren 14y agoMemory is cheap in the the first world. I live in Argentina, which is not a particularly poor or undeveloped country, and my 8GB of RAM are almost impressive. I know of no one who has 16 GB, and a few of my friends have 8. Most people I know of have between 1GB and 4GB, with 2GB being by far the most common configuration.
- UnfalseDesign 14y agoI live in 'the first world' and I can't afford more RAM. $50 is far too much for me to spend at the moment. (A need for more RAM is trumped by my powerful urge to eat.) Not to mention working at a corporate job where the computers are older than my children and every ounce of saved RAM is a blessing.
- bsimpson 14y agoMost people in the States have whatever their computer came with. Even computers with user-serviceable RAM can usually only address twice as much RAM as the machine came with. So, if last generation's hardware comes with nMB RAM, and this generation's comes with 2nMB RAM, owners of last generation's hardware can usually only upgrade their RAM once. It's a bit silly, because RAM and storage seem to be the only things most people need more of on a daily basis. I suspect 5 year old CPUs would meet most people's needs just fine.
- ronalddriver 14y agoi agree. this is the logic of someone willing to adapt to the environment around him. While the best solution would be more efficient programming, consumers are best served to max out their RAM and work with what they're given.
- danneu 14y ago> this is the logic of someone willing to adapt to the environment around him. How is this true? OP is saying devs should dump their app into memory and that devs need to adapt to OP's limitless RAM.
- ElectricBongo 14y agoThat leads to a bad approach when building applications. Not everyone has or wants oodles of RAM.I don't use much RAM on my laptop just because it uses too much power.
- paganel 14y agoI have a recently purchased Mac Mini which came with 4GB of RAM and whenever I happen to access a certain Flash-heavy page (http://www.lequipe.fr/direct_foot.html http://www.lequipe.fr/direct_foot.html for the curious) Firefox just instantly eats up all the available memory, everything freezes and I have to manually restart the machine (I know the article is actually about Chrome, but I'm trying to also make a point that memory usage counts).
- bsg75 14y agoWhen your primary workstation is a laptop, which won't accept more than 8GB of RAM, and you have to use certain Java based desktop apps, everywhere you can save memory is useful. I agree it should not be an issue, but when the usual short-sighted budget issues are the primary problem, one has to use other tricks: "You mean the 3 year old machine you work on for 12 hours a day is no longer good enough? Sorry, that does not fit the depreciation model. Also, we spent all the budget on new MacBook Airs for Sales, because they really needed new web browsers."
- grok2 14y agoSoftware should be optimized for the most common use-case -- not the outliers. Most people usually buy computers in standard configurations (which typically means 4GB to 8GB of memory) or use company provided equipment and they aren't going to be happy with being told "just buy another 8GB of memory -- it's only $120" as a solution to the slowness of their browsing!
- danneu 14y agoAnd not everyone is browsing the internet from their disposable income suburbia with their extensible upgradable tower computer. But then again the HN bubble also thinks my mother knows "Twitter Bootstrap" by name.
- SomeCallMeTim 14y agoI have 8gb. There was a time when 1gb was more than enough. Now you're saying I should have 16gb -- and you're right! This is Not A Good Thing. This is people throwing every last feature -- even if it has a pile of 800kb of DLLs/SOs attached -- into every app, with no regard for memory. I find my system thrashing almost daily at this point. I need to upgrade. Two years ago, running predominantly the same software, 4Gb was just barely not enough, and I upgraded to 8Gb. And two years before that, cut the memory requirements in half again. And again, and again, until you get back to the 1Mb of RAM I had in 1990. There has been a trend to do exactly what you say you want for 30+ years. And you know, some of that extra memory has been used to great effect -- we can do a ton more now than we could in 1990. But a lot of it is wasted, just Because It's Easy. And that wasted RAM means pointless upgrades every two years; 99% of the bloat at this point is for something I don't need or want. The ONLY valid reasons to need 16Gb+ are if you're actually using that much data in one place -- a server that needs to scale, for instance, or editing video, or maybe a game that uses crazy amounts of data and/or video. That the same apps are bloating 2x every two years -- and as a result get slower, since hard drive and memory speeds certainly aren't doubling every two years -- is really unacceptable laziness on the parts of companies and developers in general. It's pretty much the opposite of a Good Thing.
- robotresearcher 14y ago| a pile of 800kb of DLLs/SOs attached Shared Objects are not too bad, since they are shared between all processes that use (the same version of) them. In fact, the apparently worst case of linking them "into every app" is only slightly worse than having them appear in one app each. Assuming they are not all in the working set of every app at once, the overhead is small. Great OS technology! I think the main technical problem with code/feature bloat is the increased likelihood of bugs with every additional line of code.
- bd_at_rivenhill 14y agoActually, I encounter the problem of mismatched .so versions constantly when running new programs or libraries that are built from source. It would be nice if developers would figure out how to use libtool (and whatever the Windows equivalent is) so that this doesn't become a regular exercise in frustration.
- rapind 14y agoYou work for Adobe right?
- verytrivial 14y ago> RAM is now fantastically cheap. Sure, but IMO it is the height of hubris to assume that your application's space-time-trade off to gain a few ms here or there is vastly more important that every OTHER application I am trying to run. Play nice.
- shardling 14y agohttps://blog.mozilla.org/nnethercote/2012/02/08/the-benefits-of-reducing-memory-consumption-2/ https://blog.mozilla.org/nnethercote/2012/02/08/the-benefits...
- acc00 14y agoI think you might be missing the point here. You are right that using RAM is preferable to using disk; however, nobody is talking about disks here. Using a lot of RAM is bad because it makes you slow: pretty much everything, from paging to hash table lookups, works faster the lesser data there is to process. Minimizing RAM usage is a very worthwhile goal if you want to be faster.
- nine_k 14y agoUsing as much RAM is possible is right for a task which is a primary task. If all you're doing is browsing, give your browser all the RAM you have. Sometimes people run other heavy programs alongside a browser: games, IDEs, etc. These tools also assume that RAM is cheap and use lots of it. At that situation an extension like OneTab becomes very handy.
- scholia 14y agoDisagree. For most of us, memory is already full, so bloatware increases swapping, which makes your PC less responsive. It's somewhat ironic than opening Gmail in Google Chrome seems to consume roughly the same resources as Microsoft Outlook....
- SkyMarshal 14y agoFirst world perspective. Any globally-oriented FOSS app like Chromium or Firefox should work to reduce hardware requirements as much as possible to provide best possible performance on devices like Raspberry Pie and MIT's $100 laptop [1]. And even in the first world there are a lot of miserly corporations that penny pinch on things like RAM. If software that wants to target either of those markets can be made more hardware efficient, it should be. [1] http://one.laptop.org/ http://one.laptop.org/
- tomkarlo 14y agoIt's hard to both target the leading edge of the market and also serve minimal-spec hardware targets. Seems like it would make more sense to have a different branch for those targets, being done by someone with a strong business interest in making it work.
- bnegreve 14y agoI disagree: a larger memory footprint means that a smaller fraction of the data is cached. Since caches are up to 100 times faster, it does impact the reactivity of your program, in fact quite a lot.
- deleted 14y ago[deleted]
- bherms 14y agoI have a macbook air. Can't upgrade the memory. Using less memory is a definite positive for me. Because you're situation is different doesn't mean reducing memory usage is a bad thing for all.
- runeks 14y agoThis is true, but it isn't relevant for embedded devices (my ARM Chromebook has only 2 GB RAM), and DDR2 RAM isn't as cheap as DDR3 RAM (my motherboard is from 2007/2008).
- qu4z-2 14y agoThe thing is, unused RAM gets used as disk cache, which helps performance. Also, good luck figuring out how much is "as much RAM as possible without having to swap out".
- DharmaPolice 14y agoThe price of RAM is not the only (or main) barrier to getting more memory. My previous work desktop had 2GB of RAM. Getting it upgraded (from 1GB) took three months (after the upgrade had been approved by the budget holder). I was fortunate to get a new work PC recently which has 4GB of RAM. Getting it upgraded (even if I bought the memory myself) would likely take another three months of requests and I suspect would be limited to a maximum of 8GB anyway.
- theoutlander 14y agoI agree with you that everything should be in memory, but I wouldn't call saving memory pointless. The cost of RAM isn't the issue here... we all know RAM is cheap! However, the problem in my case is that my laptop caps at 16GB. I'm also using a RAM drive and no page file (for obvious reasons) and all temp/cache files are also in memory. I'm working on an app that does some heavy lifting on the browser. At times I have tons of reference material open, examples for third-partty controls, sites with flash or controls leaking memory, etc. Memory usage in Chrome was ~8GB. I could certainly benefit from reduced memory usage while still being able to go back to all those tabs. My overall system usage was 15 GB and with any more stuff I risk losing everything (since I'm not using a page-file). This might be a very specific use-case, but I do see a lot of value in the extension. (Now, only if I could further hack my machine to use 32 GB :>)