Low RAM builds, how do you browse the web?
Removed before it was archived.
Edited 25 Aug 2018. We only hold this version.
About this post
- Posted
- Archived
- Deleted on
- Edited
- Score
- 44 · 100% up
- Kind
- Text
- ID
- 9aaeks
Removed before it was archived.
Edited 25 Aug 2018. We only hold this version.
97 comments
Enable swap
Use a simple window manager like i3wm, awesome, xmonad,
OP take one of the first two options unless you're up for learning Haskell.
Yep already on i3 with no DE.
Ah yeah, I use i3 with no DE.
I haven't enabled swap because it's 16gb soldered-on SSD, and afaik you shouldn't swap on them.
Unless it's really shit, your SSD should be able to swap non-stop for years before wearing out.
From what is said here, you can use a USB drive to swap instead of the SSD.
i3 is bloated, use tinywm
According to benchmarks I've seen, i3 only uses 5.5M, so I don't think it's worth switching for less than a couple megabytes of RAM savings.
If tinywm has i3-like key-bindings I may consider switching some day though, but not for this reason.
Have you got any swap setup?
I've read that SSD swap is a terrible idea though, the constant read-write destroys the disk?
That is FUD from 8 years ago. Modern SSDs can take being overwritten multiple times a day for years without skipping a beat. Here's an article for older generation SSDs doing exactly that.
I have a 2gb ram setup that had no swap for ~1 year. After a year I wanted to install something that couldn't install without a swap drive, needed too much memory for the process.
Made one, never turned back. It's been running better, I can't comment on the specific rates of disk usage but I wouldn't expect it to be detrimental.
You buy your SSDs to take advantage of their performance. SSDs are perfectly suitable for hosting swap files, VM images etc. With swap on a high-end SSD you won't even notice it's swapping. This does reduce the life-span of SSD though, but for modern SSDs it's negligible.
With that being said, if you run out of RAM frequently, the best solution is always to add more RAM.
Honestly, you're using it for how long? A couple of years? Your worst case scenarios here are you lose a chrome book or just the emmc and replace it. If you can replace the emmc, that's less than a $40 risk, and one I would take in your situation to stop my laptop from crashing and lagging. It's not like you're risking a multi hundred dollar laptop.
You could also dedicate an SD/small flash drive to it, which wouldn't add much size to the laptop and reduce any risk to an external drive. Does your book have a flush sd slot?
deleted ^^^^^^^^^^^^^^^0.4851 [^^What ^^is ^^this?](https://pastebin.com/FcrFs94k/51543)
I ran with a 4gb chromebook and used earlyoom https://github.com/rfjakob/earlyoom. It'll kill programs at 90% utilization so there's no chance of hangs. 2gb is really tight though.
I also ran https://github.com/deanoemcke/thegreatsuspender to limit number of active tabs. There's probably something similar for firefox.
Ah I've been looking for something like these, thank you!
Lot of great tips in this thread.
Links2 or w3m really
I've tried these, and (tabbed) surf.. they don't really cut it.
I don't think I can give up Firefox + Vim-Vixen, and a couple other light extensions.
Thanks for the suggestion.
Deleted before we saved it.
Use an email program instead of a Gmail tab.
Can you please elaborate
Install a program on your PC which can receive and send emails, rather than using a web browser tab for the GMail web interface.
The best graphical low resource browser I've used is vimb, together with tabbed (because vimb doesn't have tabs). Don't expect a miracle, I'm just saying it's lighter.
Gmail has a plain html mode that might work better, though an email client like mutt, being text based, would work even better. Use it together with elinks to view html emails, and feh if you to look at a picture.
Finally, you can be aggressive about killing bloated processes, with oomd or earlyoom. I'd much rather have things just die than hang.
Good luck!
Qutebrowser
Same problem with Qutebrowser, which was my main browser until recently. I prefer Firefox + Vim-Vixen over it.
To Qutebrowser's credit, I could usually count on 'd' to close tabs when hanging. Less so with Firefox. But problem exists on both as a result of insufficient memory/virtualization.
Qutebrowsers really slow and not very resource efficent considering its written in Python
The key thing is compared to what? My usage stats and experience say otherwise. Qute running two tabs along with 2-3 terminal programs gives me 1.4gigs of RAM usage. Page rendering in Qute also quite fast.
Compared to Firefox, Palemoon, chromium, brave or Chrome, Qute is lightest browser I've used.
First, 64 bit takes much more RAM (about double) then 32 bit, so with those specs switching to 32 bit might be an option.
Second, why do you force-shutdown when you're out of ram? Can't you switch to a virtual console (ctrl+alt+f3) and close programs from there?
Usually I can't go into other TTY's, or when I do, I can't get past login because of hanging processes.
But when I do, I can't push any commands without waiting several minutes. For that reason, force-shutdown is easier..
Maybe you should try reducing the graphical elements of the page:
The best analogy, is that your Chromebook is basically a moped. You can re-build the carb (i3), maybe adjust the gearing (swap), and get a pretty decent performance bump. But as soon as you go to pick up your girlfriend (Firefox) all those gains are neutralized; the performance increase is simply overwhelmed by the additional load.
Unfortunately, websites aren't getting any slower or simpler, and even if you tweak/upgrade hardware, the internet will quickly catch up.
You're going to have to ask your girlfriend to lose some weight. Browse through your browsing history, or better yet revisit your crash logs. Identify the worst offenders, and find easier ways to access the information/content that those sites provide. This could mean print versions of pages, rss feeds, using curl or wget -- your best results will come from using creative new ways to work with your data.
I'm using Arch + KDE and firefox, with 10 tabs open is using 1.65gb or ram, what sites are you using? 2gb should be ok for light browsing.
Do you have swap or zram? Or (dumb question) does a DE like KDE handle memory in any way like they do power management?
I have 4Gb of swap, but 0 used. The DE don't handle memory, the kernel is responsible to handle memory. Can you run memtest86 on the machine to see if you have some faulty memory chips?
Higher RAM usage occurs not because of the number of tabs open, but because of the webapps those tabs load. 10 tabs with Google or Wiki open will not be that much, but opening 4 tabs, where one is YouTube, Gmail, Facebook and Twitch, will make your RAM go dry.
Hopefully the swap helps. Do you need advanced browsers features or are you mostly just using it for simple web page browsing. There’s quite a few lightweight browsers, but most have drawbacks.
Thanks.
Using Firefox + extensions: vim-vixen + ad-nauseum + forest focus.
The need for DRM, vim keys, adblock and extensions to mitigate my ADHD put this combo above Qutebrowser, w3m, surf, all of which I've tried.
Found one of your problems, this extension is very very costly. Go back to Ublock Origins.
Makes sense
Might be worthwhile reading up on compressed memory. I heard that the kernel supports it, can't help with any details.
Yeah that's zram: https://wiki.archlinux.org/index.php/Improving_performance#Zram_or_zswap
Google's ChromeOS does it by default, which may be why it never hangs (though browser tabs do require reloading when returning to foreground, which is less than ideal if you have to cross-reference data on demanding websites).
I've tried setting up zram, but I've either set it up incorrectly or it hasn't made a difference. I'm not quite sure how to debug, and I gave up a little bit ago. Might give it a shot again, along with some swap space, and maybe zswap.
In all seriousness though, here's my take.
- Correction: oh my zsh is actually a package manager for z shell.
- Firefox (at least for me) has been objectively slower than chromium. I really wanted to like firefox, but I had to switch to chrome because it uses less ram.
- Your setup seems fine (I like your choice of terminal and shell, and while you could get a lighter window manager, you're getting very diminished returns as this is not the bottleneck for your ram).
- I would try to avoid using heavy webapps like gmail (memes aside, luke smith has done a great job with making mutt accessible https://github.com/LukeSmithxyz/mutt-wizard). Beyond that, the great suspender has been useful for me in terms of saving ram.
- Like others suggested, consider maybe making a gig or so of your remaining ram into swap? swap can be helpful with this thing...
Thank you for the detailed reply and correction. I specified oh-my-zsh in case the history/autocomplete competes for RAM at all.. I don't know if that's the case but I've definitely noticed it's slower to start on my PocketCHIP than when I just had bash. But I guess that wouldn't make sense since upon first-run there's no history to refer to.
I've tried Lukesmiths mutt-wizard honestly, but it proceeds from the assumption of offlineimap by default which isn't ideal when I've thousands of emails across several addresses. I had to stop syncing and deleting when it got to 20gbs disk used. Granted I've started a project of filtering and mass deleting as of today to transition to mutt (eventually).. removed 15,000 so far but this is a very slow process.
I haven't done a good enough job to investigate his script to see about disabling offlineimap and still continuing with the rest of the wizard (I recall it requires syncing before proceeding to another step). I'm also unsure how rewarding it'll be if I can't get into the habit of using Mutt over Gmail. But that's my own personal conundrum.
Edit: typo
One possibility is to run Firefox inside a systemd container (minimal overhead) and then limit the RAM used by that container. That would prevent any hangs.
Besides, many about:config Firefox options will allow you to reduce RAM usage. E.g. reduce the number of processes.
How much RAM does your setup use with just one terminal open inside X? I'm surprised you struggle that much if you use Firefox as it's reasonably RAM-friendly (especially with ublocko enabled).
My whole setup runs on 192 MB of RAM with X and a terminal, and 1024 MB with Firefox and Gmail open.
Perhaps you can run LaTeX on sharelatex.com or an Amazon AWS instance (you can get some credit as a student) to free up some disk space.
oh-my-zsh is a bit bloated. Stock zsh or bash are a bit more lightweight, although it won't make a big difference.
Good question...
185MB RAM with X and a terminal running top
1065MB when adding Firefox + Gmail
Thanks for the LaTeX tips. Could I still use Vim to achieve that? SSH into Amazon AWS?
Edit: I think that might complicate my vim-latex-live-preview setup. Fuck this soldered-on shit lmao.
On my own 2GB Chromebook, I noticed a difference after I installed the Firefox addon UMatrix - it automatically cuts out a lot of heavyweight scripts. It does break websites, so you have to be willing to turn on the scripts that are actually needed, but you only have to do that on your first visit to each site.
I've often had problems due to Gmail - I just put up with it on my Chromebook, but you might be able to switch to the HTML-only view or get a lightweight email reader.
Trueeee, thank you. Sounds like a plan.
ssh brow.shIt's a fully modern, terminal based browser.
As novel as this is, it still uses the firefox engine. Even running browsh in tty, no X/WM, uses 1.1GBs with no mouse/tab-key support lol.. I might try it over mosh on my VPS and see how that does.
For disk space, btrfs with zstd compression helps.
Gmail has a basic html mode, uses less memory. I'm guessing noscript helps with memory too.
https://support.mozilla.org/en-US/kb/firefox-uses-too-much-memory-ram
Honestly you can't really have a decent solution. IMHO the internet is broken and inefficient. Enable swap like other have said to avoid lockups.
You could consider https://www.brow.sh. Install and have it enabled on a remote VPS for example and use ssh or mosh to have a minimal browser experience.
Also I can recommend using a email client instead to save on browser overhead.
Deleted before we saved it.
I used Netsurf on my RPI, good enough for basic duckduckgo-ing, and really light
https://downloadmoreram.com/
Less processes uses less memory I believe. Using a different browser should help.
Could you offload your /home to a flash drive and clear up some space for swap? What about a lighter browser like Midori or something? How about changing your user agent to a mobile one? Pages would prob be smaller and if you used the safari mobile one I think that will knock out flash which can be a hog. You could setup gmail to use the lighter interface which might help if you need it open all the time.
Specwise, it sounds like you’re about on par with an RPi. Maybe that could give you some inspiration.
In order to access your mails, you can use a mail client like, Mutt.