Microsoft is working on a new feature for its Edge browser that will let you limit the amount of RAM it uses. Leopeva64, who is one of the best at finding new Edge features, has spotted a new settings section in test builds of the browser that includes a slider so you can limit how much RAM Edge gets access to.
Tom Warren at The Verge
Isn’t it the operating system’s job to manage memory? It seems very archaic to manually set memory limits on an application, or am I totally out of touch?
It seems especially useful if you can set this to 0
Fabulous. How many years will it take for Leopeva64 to discover the feature of letting the user uninstall it?
Archaic? Not really this is the case with any software that does its own caching… like every piece of software out there that does any kind of caching will have a setting like this be it exposed or not.
Yes, it is… Edge, Firefox, Chrome, etc. became operating systems years ago.
…but, speaking less tongue-in-cheek, the browser really does have a better ability to know what of its memory can be evicted. It’s not the OS’s job to track things like how long it’s been since a user last focused a tab, how idle a tab is and which resources are associated with tabs/downloads/etc., and so on.
The OS’s responsibility for intra-OS stuff more or less stops at allowing applications to mark memory allocations as discardable/cache so they don’t need to tie up swap space when there’s memory pressure. (Something especially important on Windows where every allocation must be backed by a reservation in either physical RAM or the paging file… that’s why browsers tend to crash more in Windows. It doesn’t use memory overcommit.)
Ugh. Intra-application stuff, not Intra-OS stuff. We really need that edit window back.
ssokolow (HOUWiboF!),
(Not sure what the best practice is for quoting your odd name, but I’ve taken the liberty of abbreviating it this time.)
I agree with the entirety of the rest of your post, but this statement about overcommit not crashing seems controversial to me. NOT overcommitting means the OS can guarantee its promises. Overcommitting means the OS cannot guarantee requests are fulfilled. In the old days before we had loads of ram the linux out of memory killer would regularly kill the browser.
When you have well written applications and an OS that backs guarantees, then everything ought to be good, especially if the application can garbage collect it’s own memory. However I acknowledge that, for better or worse, most unix applications evolved under completely different overcommitting norms. Applications regularly request more than they need and the OS approves requests for more ram / swap than is physically available. I understand that assuming memory is available greatly simplifies some software development, however aspects of this model are highly unappealing and frankly the OOMK killing applications on low memory systems always drove me nuts. I consider this “crashing” even though it’s happening by design. Of course adding swap space mitigates the actual crashes, but in the HDD days the system would just become uselessly slow anyway – like a large compile that never finishes. NAND SSDs made swap speeds less painful, but now we have to contend with consuming limited flash SSD lifespan. And with the advent of QLC, lifespan keeps getting worse. It especially irks me to use swap on permanently soldered SSDs (ie those on mobile devices/macs).
Everything’s a tradeoff. I’ve solved the issue for myself by over provisioning ram so I never have to worry about it any more.
Rather than using swap, I prefer to double the RAM. For example instead of 8GiB ram + 8GiB swap, get 16GiB ram. Or instead of 16GiB ram + 16GiB swap, get 32GiB ram.
I concur with the “get more RAM”. While it’s not always cheap (DDR5 ECC, *cough* *cough*), it’s such a general improvement to the machine’s responsiveness that you shouldn’t waste time trying to tweak you autoexec.bat anymore. Stuff your RAM slots with more sticks and voilà.
I also think throwing RAM at the problem is the right solution. However, not all hardware makes that possible. It is not just older hardware ( though I have some of that ) but also the “too little RAM by design” laptop world that we seem to find ourselves in. Two of the three MacBook Air models in the current line-up only have 8 GB of non-upgradable memory. My everyday computer use is going to put a lot of pressure on 8 GB ( even on older hardware, I find RAM to be a bigger problem than CPU ). Being able to cap the browser sounds really useful.
tanishaj,
Yeah no kidding. Only 8GB wouldn’t be so bad as starter option that can be upgraded later, but that it’s not up-gradable makes it more disappointing.
When there is no API by which the browser can volunteer it’s cache memory back to the OS, then I suppose the next best thing is just to preemptively free memory according to some arbitrary configuration setting…but the tradeoff is less effective caching. If the OS doesn’t need more memory, the caching would have been free. Ideally the OS and userspace applications would automatically optimize memory usage on demand.
If you knowingly buy an hardware that is capped to 8 GB, especially a pricey one (because brand) then it’s up to you. There are hundreds of alternatives, I even selected a laptop that can go up to 96 GB. And is the same price. Vote with your wallet.
Like Hollywood, everything has its remake.
Sounds like those days in Mac OS when we were the responsibles of assigning RAM to programs.
This sounds like a remake for sure.
I think perhaps this is a bit the opposite. In the Apple System x.x days, you needed to allocate enough RAM for your application ( leaving less RAM for other apps ). In the case of modern browsers, the risk is that they will be too greedy and take too much RAM. This new setting does not give the application the RAM requested, it takes what it needs when it needs it. What this does is CAP the amount of RAM that can be used to prevent a greedy browser from starving the rest of the system.
As a bit of a retro hardware enthusiast, this setting sounds incredibly useful. I have a 2008 iMac with only 6 GB of RAM that I still use regularly including running browsers like Firefox and Microsoft Edge. Those are the two applications generally most likely to consume all my RAM and cause problems. I regularly have to kill the browsers and restart them to reduce the memory consumption for the rest of the system. Being able to ensure that the browser cannot use perhaps more than 4 – 5 GB of RAM would be a nice way to ensure that the browser does not cause problems. 4 – 5 GB is still lots ( on the 2012 system I am on now – dozens of open tabs – Microsoft Edge is using about 3 GB ). On systems with less than 8 GB though, I have had them thrash when say compiling something large while also using a lot of RAM in the browser. Capping the browser seems like a good idea.