4 ms·
OK, but the situation still looks shameful. What exactly prohibits a web site from consuming all my RAM? I have never once seen a browser make a misbehaving sit
by souprock 6y ago
OK, but the situation still looks shameful. What exactly prohibits a web site from consuming all my RAM? I have never once seen a browser make a misbehaving site wait (frozen with no CPU) for me to confirm that sucking up more RAM is acceptable to me.
What happens instead is that I hit a wall of slowness, forcing me to press the power button and lose all my other work. It's not very gradual, I think due to the nature of the problem, so the browser needs to avoid getting into the situation. It's like UI latency follows a hyperbolic curve, running right up to infinity all of a sudden as the RAM runs out.
- neolog 6y ago> browser make a misbehaving site wait would be a nice operating system feature
- boring_twenties 6y agoWhat ever happened to computers being at least somewhat usable when all RAM is in use? I seem to remember that being a pretty common condition back in the 90's. Things would get slow, sure, but not completely and utterly hosed. When this happened to me recently (unattended Firefox process used up all RAM) the machine was simply never able to recover, even after killing the offending process (thereby making 30GB or so of RAM available) and waiting a half an hour.
- young_unixer 6y agoFor some reason, Linux is specially bad at working under load, both memory (too many applications & browser tabs open) and I/O (copying large files into USB drive).
- fire7000 6y agoHow much performance are you expecting moving data over usb that should be moved over sata/sas
- lasagnaphil 6y agoIs it because Linux is optimized more for server purposes rather than desktop ones (For example, when it comes to process scheduling)? I’m curious.
- boring_twenties 6y agoNot really seeing how being unable to recover without Alt-SysRq is any better on the server
- pxtail 6y agoOhh this is absolutely infuriating for me (and for others as well [0], for quite a bit of time) on Linux desktop machine, when RAM is fully used OS just freezes and nothing besides reset with a button and potential loss of work can be done about that. [0]https://bugs.launchpad.net/ubuntu/+source/linux/+bug/159356 https://bugs.launchpad.net/ubuntu/+source/linux/+bug/159356
- souprock 6y agoIt was nice when the OS was 64-bit and multi-threaded, but the browser was not. The browser couldn't grab more than 1 CPU and 4 GiB.
- rock_artist 6y agoOn modern macOS/Chrome it'll be impossible. But on other platforms you can still run 32bit chrome (other browsers)
- boring_twenties 6y agoHaha, yeah. I mean you can still use cgroups or something to accomplish this, right?
- dannyw 6y agoBack then, needing to smartly manage RAM (i.e. reserve space for what you REALLY needed; manage your own requests otherwise) was done. Now, not so much. Dev machines rarely run out of RAM anyway.
- southerntofu 6y ago> I have never once seen a browser make a misbehaving site wait Isn't that what Firefox's "a tab may be slowing down your computer" (or equivalent) is doing? However it does not seem to trigger reliably. Good thing for me i disable JavaScript most times! > I hit a wall of slowness, forcing me to press the power button and lose all my other work So that's two parallel problems. First is browser is eating too much RAM. Second is OS starts writing to swap instead of triggering OOM killer, rendering the whole system unusable rather quickly. I personally systematically disable swap on laptops/desktops (but keep it on server). Ideally, client-side scripting in the browser wouldn't be a thing at all (we'd have established, reproducible, secure software distribution mechanisms like guix's introduction channels). In a better world, a browser would for every page disable Javascript/WASM by default, but have a convenient menu (alla Noscript) to choose between different security/performance profiles: webapp for unlimited resources/permissions, simple for basic JS for minor interactions (like LibreJS does), etc.. In our world, the websites we consume decide what resources they're gonna eat, and how much network resources they're gonna load, leading to unexpected CPU/RAM/network usage (inducing €€€€ bills for cell phone data).
- dahart 6y agoChrome has a task manager that you can use to kill a stalled tab. The OS has a task manager that you can use to kill a stalled browser. You are never forced to use the power button and lose work.
- souprock 6y agoThat would be nice. Reality: the task manager will not open because there is not enough RAM. Simply moving the mouse pointer can become impossible. Attempting to close a window goes like this: estimate the mouse movement needed, carefully move the mouse, then come back in 15 minutes to see if the pointer has moved and if it is in the correct location. If it has moved but not as desired, make another attempt. If it hasn't moved, come back in an hour... then try several hours, or maybe the next day. If somehow the mouse is in the correct location, click the button very slowly. Maybe hold it for minutes or hours?
- dahart 6y agoMight be worth turning off virtual memory? I believe that is an option in all the major OSes, and it can help you budget your memory usage as well as avoid a swap lock-up. Is the underlying problem that your machine has just has too little memory for today’s OS & browser versions? Or you’re visiting a specific web site with a memory abusive app? It sounds here like there are important details you haven’t mentioned yet, not that there is a general problem with browsers necessarily. Yes, browsers and today’s OSes and applications all seem bloated from a user perspective and seem to use enormous amounts of memory. I have run out of RAM before and had to wait for VM swap, and agree it’s very painful. But I haven’t had that happen with a browser in years or maybe ever, and nobody I know is having common browser freezes. Is it worth an SSD & RAM upgraded, might that solve the issue?
- souprock 6y agoIt's an 8 GiB machine with an SSD. I open lots of tabs, in lots of browser windows, on lots of virtual desktops, but so what if I do? It's still unacceptable to lock up. If I visit a specific web site with a memory abusive app, the browser is supposed to protect me. It's the same as any security hole. Malicious web sites aren't supposed to crash my computer. Yes, I'm still blaming the browser. It's the browser's job to provide protection here. It's a security matter. No matter what my browsing habits may be, letting the computer lock up is not at all OK. We shouldn't be one bad web site away from swap lock-up. There is no possible computer upgrade that will fix the issue. There will always be a more-terrible web site waiting to consume all resources.