5 ms·
It probably doesn't. Measuring memory usage is hard on a modern OS. I'd guess there's a lot of shared memory between tabs
by tambourine_man 10y ago
It probably doesn't.
Measuring memory usage is hard on a modern OS.
I'd guess there's a lot of shared memory between tabs
- overcast 10y agoIf it doesn't, then why does it grind to a halt eventually on both Mac and Windows? Firefox suffers from the same nonsense as well. In fact, Safari seems to be the ONLY thing I can keep open for more than a day without a process restart.
- cookiecaper 10y agoYou're doing something wrong. I use Chrome on Windows as my main now and I usually have more than 100 tabs open. I just switched a few months ago from Firefox on Linux, also usually with 100 tabs or more open. Both are very stable. Chrome is worse with handling tons of tabs, but I certainly don't have daily crashes. People who have extremely unstable/inconsistent experiences with these platforms usually have a rogue extension or some other problem lurking beneath the surface. Also consider occasionally VACUUMing your browser's DBs, and on Firefox, taking advantage of the profile reset option.
- overcast 10y agoFor every person that has my symptoms, there is someone to counter it. I'm not going to get into an argument about how I'm using my browser incorrectly. Every computer / browser combo I've ever used exhibits the same thing, and I'm pretty religious with keeping things trim and clean.
- mikeash 10y agoWhy is it that whenever somebody has a problem that less than 100% of people experience, the response is always "you must be doing it wrong" rather than "I must be lucky"?
- cookiecaper 10y agoBecause the quantity isn't just less than 100%, it's a small minority. Chrome and Firefox are among the most widely-used pieces of software in the world. I'm not saying they don't have weird bugs, but they don't crash daily for most users. While the OP may not be doing anything "wrong", he is almost definitely doing something unusual, or has deeper issues like malware or malfunctioning hardware. If the ratio were inverted and most users were experiencing daily crashes from normal use, I would consider myself lucky. That's just not been my experience with Chrome/Firefox.
- mikeash 10y agoBugs which only affect a small minority of users don't exist, nor do unusual but perfectly legitimate usage patterns?
- cookiecaper 10y agoYou probably want to re-read my post, as I said neither of these things.
- mikeash 10y agoYou're right. I was confused because in your other comment you just said they were doing something wrong, and I didn't realize you'd reversed course on that.
- overcast 10y agoI would suspect a majority of the world does not keep dozens of tabs open, on an computer that never shuts down. You have to remember which forum you're on here. Any software issue, usually rears its head relatively quickly from one of our machines around here.
- valarauca1 10y agoMeasuring memory usage is hard on a modern OS. Not in the slightest. OS's have to allocate virtual memory to each process or that process with SIG-FAULT when it touches invalid memory. Tracking per-process memory usage is one of the most trivial things OS/Pref tools do.
- mikeash 10y agoMeasuring it is easy. Defining it is what's hard. If three processes each have the same 10MB executable mapped into memory, plus 10MB of heap data, how much memory is each process using? There's no easy answer to that question.
- valarauca1 10y agoDefining it is what's hard. how much memory is each process using? 20MB. Oh but they are sharing the pages the executable is mapped into. So how can you can you say they are each using that much RAM? Because that 10MB of RAM won't be freed until the last process exits. Each process is using 20MB of physical pages. If only 1 was running it would use 20MB. The semantics that each process is sharing 5 HUGEPAGES of heap isn't really important as even if 1 was running alone it uses that much memory. If you are sharing that much data with executables that you have this problem there is some low hanging fruit for memory optimizations you can do. Oh but you aren't *actually* using 60MB of Heap, only 40MB Indeed. And in cases where these 3 children have the same parent you look at the ParentMem + 40MB (child binary+individual heaps) to report a better picture. Shared/unshared semantics are not hard. Have you ever read /proc/$PID/maps ? Because it clearly labels what is/isn't shared physically. When you are optimizing for memory usage you rarely look at shared readonly pages as the kernel put them there for you. Defining it is what's hard. Injecting an interpretation before taking a measurement is not sound science or engineering. Measurements inform Interpretation. Not vice versa.
- mikeash 10y agoSure, shared/unshared semantics are not hard. How do you map that to a generic concept of "usage"? There's no right way to do it. It doesn't really make sense to ask "how much memory is this process using?" Instead, you want to ask questions like "how much memory are all of these processes using?" or "how much memory would be freed if I terminate these processes?" or "how much extra memory will be used if I start another process?" What's hard is understanding which question you want to ask in any given situation.
- 9248 10y ago> Measuring memory usage is hard ... Exactly, I usually find that chrome is eating a little more than what it's displayed in task manager in windows ;) I have no idea how it can achieve that to be honest. Restarting it seems to bring back the 5-15% missing ram in my case.