You can already optimize tab memory management with firefox option : about:config and set browser.tabs.unloadOnLowMemory to true
Unused tabs wil be unloaded (they are still there, but you’ll have to reload them to use them)
I’m having a similar issue. It doesn’t seem to be totally related to the browser but it most frequently happens when I have many browser tabs open or I am also running a game (usually World of Warcraft) when I go to open the browser. I have 8GB of RAM and also don’t have a swap set up on my main drive. Can I safely set up a swap on some of the free space on the drive to prevent further crashing?
Thanks! I’ll try to monitor first before I make any changes. I have also run memtest with no errors (although I need to run it for more passes to be sure). So, alternatively it could be a drive issue but it’s a fairly recent SSD (just over a year old). Anyway, I’ll update if I find anything else.
I only have 4GB of memory, and I always set up swap, but frequently if I have several tabs, or a really large Google Doc open, it seems as if my system has crashed. However, I think it is really just thrashing, and sometimes if I come back in a couple of hours, I can get control back and close some tabs.
The problem is that while the system is thrashing, I cannot get enough resources to (say) open a konsole and run top, to give decent diagnostics or even systemctl reboot to just give up. I either have to wait (sometimes up to several hours), or hit the power. The laptop I use most frequently has a broken SysReq button, so I have not enough data points to say how REISUB will work while thrashing.
I had another crash this morning and confirmed that I was running our of RAM. I had accidentally stopped free but between stutters was able to get in running again. The system was down to 64MB remaining and wouldn’t refresh beyond that. @mparillo has a good point-- I’ve never waited to see if it would resolve. If it needs longer than 30 seconds to become responsive, I’ve assumed that it’s a full crash and just hard boot. Most crashes have also happened following coming out of sleep so I’m hoping a swap will help with this as well. I have created a 8GB swap and hopefully that is the end of my troubles!
Thanks for all of your feedback and suggestions, everyone. Much appreciated.
The system will certainly come to a crawl once RAM gets full. I tend to keep a Konsole tab open with watch -n5 free running so I can do a regular check.
YouTube is definitely, in my experience, about the worst culprit. Watching a few videos quickly swamps the RAM. But I do have quite a number of tabs - with up to a few dozen loaded. Currently 1272 open across various groups.
NOTE: this is Waterfox (a Firefox fork) which may behave differently.
Thanks for that very useful tip. I’ll try that & see how it goes. Hopefully will save having to restart the browser to reclaim the RAM.
Thanks to all for the replies. To keep it short, I’ll just say that I have used the advice in this thread to determine that it is indeed a lack of RAM that is causing the crashes. When I built the system (from circa 2011 ebay parts) I thought that surely 8Gb would be enough because I don’t game on this system, and I don’t do any real work on it besides writing/word processing.
I will put more ram in the system. Thanks to all for the help
Sometimes it doesn’t even work to hold down the power button, when doing a hard reset. So I just yank the cord out of the back of the computer. Other than losing your work (which it seems you would anyway) how is this a bad thing? I don’t think I’ve ever had any problems doing a hard reset. It seems to recover just fine. Again you lose any unsaved data, but I have backups in place (Tresorit) and many of us are using internet services. In my case it’s Grammarly, which autosaves after every new word you type.
I guess I’m just curious as to why doing a hard reset is a bad thing. Never had any problems.
It depends on your file system and your application…
FAT: everything gets written to buffers and any buffer not written to the disk is lost or worse: half a file gets written and the rest of the file cannot be read any more without forensic tools.
NTFS: That’s a journaling file system with a USN Journal and depending on the version it will be more (or less) robust because transactions get written into the journal first and if the journal is not complete it will be rolled back until the last atomic transaction that did complete successfully.
EXT4: Also a journaling file system
BTRFS: aka BeTter File System: has journaling and redundancy built in but it needs to be activated
And then the application itself: LibreOffice saves a file first to a temp file and then deletes the original and renames the temp file to the original. As a delete and rename take a fraction of a millisecond, you either still have the unsaved file OR the new file, but applications like nano just overwrite the existing file unless you specify the --backup parameter, so you could end up with a partial file with the rest just lost.
Good that you have back-ups because you will run into trouble in the long run. Maybe not last year, not this year, but eventually you will… And guess what? small files are less susceptible to corruption, but large ones? Guaranteed failure for video files, database files GIMP files with tons of layers, …
P.S. So you know about REISUB now, so just start using it. Don’t continue on your path to (corruption) hell…
Hmm… it sounds like I’ll usually end up reformatting the computer before it ever becomes a problem. However I’d like to keep this Manjaro install for as long as Manjaro stays good. If they start falling off like Mint or some of the others, I may switch to a distro that’s doing well at the time. Pretty common problem with software, but back on topic:
Is editing grub completely necessary for your method? I’ve generally had bad experiences with grub and I’ve learned to just leave it alone and we get along fine. I leave it alone and don’t mess with it, and it doesn’t start acting funny and giving me problems. It’s a nice arrangement we have. I’m something of a linux newbie so I must admit that I don’t understand everything in your how to guide.