12 ms·
Microsoft Has First Major Impact on Chrome
- greatjack613 7y agoIf its not caching to disk, doesn't that mean that ram usage will skyrocket? As it is chrome is a memory hog, imagine now with all of those videos in ram....
- nilsb 7y agoI tend to have dozens of tabs open at the same time. However, only a few of them usually have video elements and Chrome could probably discard the media cache for all of them - except for the currently active one. My assumption here is that the media cache is mainly used for uninterrupted playback in case my network is briefly unavailable (e.g. when on a mobile network).
- vidanay 7y agoRam is meant to be used. Ram should be 100% utilized
- amirmasoudabdol 7y agoYou seem to be ignoring a very important factor here, energy consumption. RAM usage has a direct effect on battery usage and battery usage is an important factor and selling point these days.
- jarfil 7y agoDoes it? I was under the impression that all the installed RAM got refreshed all the time whether it holds useful data or not.
- fourthark 7y agoSurely not as bad as disk.
- slovenlyrobot 7y agoRAM _capacity_ has a direct effect on energy, usage not nearly much if at all. Hardware has been around to selectively put banks into low power saving mode, but I've never heard of any commodity OS that supported anything like that. It'd require active organization of physical pages to take advantage of, if common controllers even supported it
- sephamorr 7y agoNote that most of RAM's power consumption comes from reading and writing (a function of memory clock speed). Allocating the RAM itself is likely to meaningfully increase power draw, but accessing it will.
- belltaco 7y agoAre there any benchmarks around showing this? And how much extra power draw it is.
- daeken 7y agoThe state of bits in RAM has zero effect on energy usage. Caching things in memory allows for lower power consumption, though, by preventing duplication of effort by the CPU. Edit: Originally said "zero effect on memory usage", which makes very little sense!
- liability 7y agoYes, but if your application assumes that it should use 100% of my RAM, it's being antisocial. Don't assume that I don't have more important software that could be utilizing my RAM in ways more important to me. That's what drives me up a wall whenever people use the "free RAM is wasted RAM" argument; the assumption that RAM unused by your software is unused by me.
- codedokode 7y agoAndroid found a kind of solution for this by agressively killing processes (while saving their state). This seems to be effective because developers are not motivated to help competing applications, they want to have all resources for themselves.
- liability 7y agoThat's perhaps great in android, but you can't/shouldn't write code for Linux/Windows/MacOS, where such a system is not in use, and then protest "I'm not the one that sucks." Maybe those OSes should implement such a system, but until they have the "wasted RAM" argument needs to end for anything other than specialty professional software that can reasonably assume itself to be the raison d'être of that computer (e.g. video editing software, CAD, build systems for large software projects, etc.)
- ferzul 7y agoWindows has such a system with UWP. I think UbTouch or whatever the Ubuntu phone successor distribution is called has one too. And I imagine most systems programmers could define an api if they wanted to. I think this is definitely a case where apps need to be antisocial and operating systems need to peg them in. The age of cooperative multitasking is over. Let the OS decide.
- liability 7y agoHarming users to coerce OS designers is a pretty shitty plan. Sorry if that's too blunt, but that's simply the way I feel.
- codedokode 7y agoI have 4 Gb of RAM and most of time it is utulized over 100%. Not a very pleasant experience with modern Electron apps and reactive HTML5 sites.
- Spooky23 7y agoTry running Office, Chrome and Teams on a constrained system, then say that again!
- detuur 7y agoSpoken like someone who has truly zero understanding of how RAM usage relates to performance. Repeat after me: high data locality reduces the amount of cache misses, which drastically reduces memory latency, and is only achievable through systematic memory usage conservativism.
- nambit 7y agoYou're assuming this person understands data locality, or memory latency or even memory in general.
- neilv 7y agoI've been running Firefox from tmpfs for at least a decade. (tmpfs has more useful properties than letting that RAM go to Linux disk caches instead, in this case.) Firefox doesn't need all that much page/object cache, and videos usually seem to be streamed with transient buffering.
- jarfil 7y agoIf the content is ephemeral then it doesn't make sense to keep it on disk, and as long as Chrome doesn't lock the memory range, the OS will swap it to disk anyway if it needs the RAM for something else.
- codedokode 7y agoWhen I watched high-resolution videos on Youtube with Chrome, its process could take about 400 Mb of memory or even more and swap out other processes. > and as long as Chrome doesn't lock the memory range, the OS will swap it to disk anyway Swapping in/out is random access and is very slow (< 1 Mb/sec) compared to linear reading/writing unless you have SSD.
- nl 7y agoWhen I watched high-resolution videos on Youtube with Chrome, its process could take about 400 Mb of memory or even more and swap out other processes. I've noticed you've said this twice in this thread like it's a bad thing. This is exactly the behaviour I'd expect and want. If I'm watching a video I'd want the system to do everything possible to make it as smooth as possible.
- jarfil 7y agoSwapping contiguous regions is sequential, and Windows will preemptively write non-locked regions to disk so it can instantly discard them when needed. You can force this behavior by dropping working sets, which has the effect of "converting" used RAM to cached pagefile. Of course if you're actively using a program, it will swap out other processes, that's the whole idea.
- codedokode 7y agoIt doesn't make sense to swap out other programs just to load video that will be immediately discarded after displaying. It makes more sense to have limited download and playback buffers and store most of video data on the disk.
- herpderperator 7y agoIf you're playing a video, which is the use case in the article, it wouldn't make sense keep anything in RAM. A minute buffer in either direction seems logical. I am expecting the implementation to be something like that.
- lerey 7y agoWell I hope this guy doesn't write a post for every little pull request a Microsoft employee sends to Chromium
- kminehart 7y agoi don't see how it's a bad thing.
- jasonvorhe 7y agoYou don't have to read it.
- bitwize 7y agoIt's Paul Thurrott. If somebody high up at Microsoft takes a particularly satisfying dump, Thurrott will have a blog post about it.
- techntoke 7y agoThis is why I love Arch Linux. You can already do this with Chrome, Firefox or other browsers: https://wiki.archlinux.org/index.php/Profile-sync-daemon https://wiki.archlinux.org/index.php/Profile-sync-daemon Impact is pretty good but not as significant as I had hoped.
- krackers 7y agoThis is for profiles and not the chrome cache though, if I'm reading correctly.
- carlosrg 7y agoYou can probably do something similar in Windows moving the profile directory to a RAM disk.
- beatgammit 7y agoThe great thing about Arch Linux is that someone has already come up with the steps to do it and put it in a convenient place for others to find. Arch Linux is more than just an OS, it's a community of power users.
- Waterluvian 7y agoHelp me confirm I understand the status quo. My laptop with 32GB of RAM running Chrome streaming twitch or YouTube is currently writing the stream to my SSD before rendering it? That sounds like very low hanging fruit in terms of battery gains. Any arguments for why this has been like this?
- azernik 7y agoProbably because Chrome was built not to assume enormous amounts of RAM.
- angulardementia 7y agoLol
- Waterluvian 7y agoMy point is that when the resource is available, it can't be intelligently used? Heck, shouldn't you just let the OS call the shots and simply say, "I've got ephemeral data for you to keep warm."
- skywhopper 7y agoSure, if the OS has an API for that. If it doesn't, then the Chrome developers have to figure out what to do.
- Waterluvian 7y agoIsn't the API just storing in RAM and letting a page file do its thing?
- seanmcdirmid 7y agoIn a 64-bit only world, that isn’t a bad strategy. I would guess a lot of this is just legacy from having to or having had to support 32 bit OSes.
- codedokode 7y agoThe idea not to save data to disk means that they have to be kept in RAM, and Chrome will take even more of it. It's fine if you have an expensive system with tens of gigabytes, but what if you have only 4 or 2 Gb? Also, why save energy when you are on AC power most of the time? I remember that watching a long video on Youtube in WinXP could take as much as 400 Mb of RAM. Are they going to increase memory consumption?
- wwwigham 7y agoIf you run out of RAM virtual memory means excess pages will just get written to/read from disk, usually. Which is... Not really different than what it does now, I think?
- codedokode 7y agoSwapping is mostly random access operations, writing small blocks here and there, HDD can do about 100 seeks/sec, and it gives speed less that 1 Mb/s while sequential read/write gives speeds of order of tens Mb/s.
- SturgeonsLaw 7y agoI would assume that in a low memory scenario it would be paging to disk and we'd be back where we were in the first place
- codedokode 7y agoIt is not the same situation. If you write/read video sequentially, you get speeds about tens of Mb/s, and with swapping you get random access with speeds < 1Mb/s on HDD. So having limited memory buffer for video is better for the whole system.
- Jonnax 7y agoA raspberry pi can have 4gb of ram. Cheap android phones come with 4gb ram these days as well. At some point software needs to stop catering for miniscule percentages of users.
- z3t4 7y agoSo MS's plan is to put a rebranded Chrome browser on Windows? Will that keep people from downloading Chrome? Then what incentive will G have to keep improving Chrome?
- IfOnlyYouKnew 7y agoThe incentive for Google was always to have the web platform at feature and performance parity with "walled gardens" like app stores and native applications. Because that gets content on the web where it can be indexed, and monetised as search results etc. Therefore, it doesn't much matter to Google if it's Chrome, or a rebranded Chrome, or Safari, or Internet Explorer that keeps getting better, as long as something does and people use it. They will continue to work on Chrome because they support more than the Windows platform. They will also not want to become dependent on Microsoft again, especially considering the rendering engine isn't that important for their mutual competition as the rest of the browser, such as extension and plug-in architectures are.
- lallysingh 7y agoBecause desktop Windows is nearly irrelevant?
- saagarjha 7y agoSurely you're being sarcastic?
- lallysingh 7y agoNot compared to mobile.
- kyriakos 7y ago"only" Relevant to 35% of the world https://gs.statcounter.com/os-market-share https://gs.statcounter.com/os-market-share
- deleted 7y ago[deleted]
- neonihil 7y agoI smell some kind of a DRM coming.
- The_rationalist 7y agoMicrosoft most major chromium impact is to move input handling off the main thread which has been empirically a massive success on Edge. This would allow chrome to have lower input lag than native GUIs if it's not already the case. They are also working on many cool things, openXR support for example. They are improving chrome devtools (and their integration within vscode) They are doing many performance related fixes. And they are massively modernizing windows apis used by Chrome. E.g better performance for sensors through new windows 10 API. And the smart use of a Kalman filter for sensors. They are also helping chromium to support windows ARM 64 bit A real time view of what they are doing: https://chromium-review.googlesource.com/q/author:*.microsoft.com+AND+status:merged https://chromium-review.googlesource.com/q/author:*.microsof...
- blackflame7000 7y agoIf only Microsoft would make it so easy to move input handling off the main thread when writing programs for Windows. MFC was the bane of my existence starting out.
- asveikau 7y agoBe careful what you wish for. I have witnessed people in contexts like these, thinking that threads are magic performance enhancing pixie dust, and unable to reason through the subsequent bugs.
- ComputerGuru 7y agoasync/await helps with that, but like with any other abstraction, if you use it without understanding how it works and what it actually does, it’s bound to come back and bite you at some point.
- pragmatic 7y agoHow exactly? The use case for perf improvement with async/await is for IO based issues, eg instead of burning a thread waiting for IO to complete, use IO completiion ports (on winders) blah blah. If your work is CPU bound you can't async/await it away magically. Maybe I'm misunderstanding you?
- rdiddly 7y agoMy first thought: They added Clippy to it. https://www.youtube.com/watch?v=b4taIpALfAo https://www.youtube.com/watch?v=b4taIpALfAo Junk comment, sorry.
- yalok 7y agoI wonder if there’s a feature request to completely pause all Chrome/Chromium processes, when the browser windows are all in the background and low-power mode is on. I like to have lots of browser tabs and windows opened all the time, and in my experience with Chrome on Mac, the processes from these tabs eat most of the battery, if there’s any JS running in them... For now, I just manually pause all processes with Chrome in their name, and then un-pause them once I need a browser...
- doe88 7y agoWhat I find fascinating with MS's decision to use Chrome was their willingness to take the hit and learn a new code base from scratch (and not even their own moreover). Usually inertia wins at big companies but not in this case. Regardless of the final outcome I really am impressed by the engineering effort needed behind this decision.
- BuckRogers 7y agoRegardless of meme-ish behavior over MS being incompetent on software, they're actually aces at it. If not the best entity in the world, they definitely know software. If anyone can pivot, manage a team to learn a codebase as large as Chromium at the drop of a hat, it's Microsoft. I only invest in index funds, but I'd place my bets on Microsoft over FANG, zero hesitation.
- green-eclipse 7y ago"Best entity in the world." Would love to see some data or citations behind these bold claims.
- basch 7y agoi have to believe they want to build a blink dll into the os, so all apps that need blink/webkit can call the os implementation vs bundling a copy of chromium. it would make sense to build node into the os as well.
- dbg31415 7y agoI hate Chrome. But Firefox drains my battery faster trying to run a VR simulation with an a realistic crypto mining rig and a USB hair dryer. My MBP's fans kick on full-blast when I start streaming video sin Firefox. And... worst Firefox crashes every time my computer goes to sleep now -- this has been happening for about the last month. When it comes back up I have to re-sign-in to about 20 sites... yes, password manager, but... with 2FA on most it's just tedious. Like for a browser that respects privacy may fall to like for a browser that doesn't kill my battery.
- robin_reala 7y agoThere’s ongoing work that’s just (this week) starting to land to improve macOS battery life via CoreAnimation. That should help in the medium term. As for crashing on sleep, that’s not normal behaviour. Maybe try refreshing Firefox via about:support? You’ll lose extensions etc but if nothing else it could help to narrow down the problem if it comes back.
- dbg31415 7y agoThanks for the heads up! I've got different extensions running in Chrome and Firefox, but according to Activity Monitor, Firefox's energy impact is 26.29, and Chrome's is 3.25. I've got Hacker News up in both, and that's the only tab that's open. When I open a new video on YouTube, it spikes to 160ish, then drops to 100, then eventually settles into the lows 60s. In Chrome, it shows similar... spiking when the video starts to stream around 160, but then quickly drops down to the high 30s. Keen on seeing what the changes bring! (= I just did a reinstall. Hope it helps the crashing issue. At the end of the day, I really don't trust Google. But... if it comes down to having an extra hour on my laptop it's a bit of a tough call. Thanks!
- loulouxiv 7y agoShouldn't they start by getting Chromium as standard compliant as current Edge ? As of now every browser supports SVG-in-OpenType except Chromium. When Microsoft will proceed with their shortsighted migration to Chromium engine there will be two browser refusing to comply to this widely accepted standard. Microsoft, would you please at least try to minimize the push in the "Web standards are whatever Google likes" direction your decision will provoke ? This is the very worrisome aspect of this move.