Skip to content

Low RAM builds, how do you browse the web?

Removed before it was archived.

Edited 25 Aug 2018. We only hold this version.

44 points92 comments
Open on Reddit
About this post
Posted
Archived
Deleted on
Edited
Score
44 · 100% up
Kind
Text
ID
9aaeks

97 comments

Enable swap

Use a simple window manager like i3wm, awesome, xmonad,

46 points

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.

10 points

Unless it's really shit, your SSD should be able to swap non-stop for years before wearing out.

24 points

From what is said here, you can use a USB drive to swap instead of the SSD.

0 points

i3 is bloated, use tinywm

-30 points

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.

10 points

Have you got any swap setup?

13 points

I've read that SSD swap is a terrible idea though, the constant read-write destroys the disk?

6 points

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.

9 points

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.

3 points

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?

1 points

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.

12 points

Ah I've been looking for something like these, thank you!

Lot of great tips in this thread.

2 points

Links2 or w3m really

9 points

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.

3 points
unknown author

Deleted before we saved it.

2 points

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!

7 points

Qutebrowser

6 points

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.

5 points

Qutebrowsers really slow and not very resource efficent considering its written in Python

1 points

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.

1 points

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?

5 points

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..

1 points

Maybe you should try reducing the graphical elements of the page:

  • For articles - use an extension like this one, I tested it and on Chrome it reduced a few pages of about 200MB each to just 40MB of RAM altogether (including the extension itself). Just make sure you're using an extension that replaces the page and not applying another layer on top of it (like the Just-Read extension).
  • Try to use the Gmail version for slow connections, it can save you a some RAM (350MB VS 200MB for initial loading, 290MB VS 90MB after a minute or two)
  • Try to use an ad-blocker and block unnecessary graphical elements of the page, but notice that the ad-blocker (ABP in my case) itself can take about 200MB itself, so I'm not sure it's worth it.
1 points

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.

5 points

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.

4 points

Do you have swap or zram? Or (dumb question) does a DE like KDE handle memory in any way like they do power management?

1 points

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?

2 points

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.

1 points

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.

2 points

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.

2 points

Might be worthwhile reading up on compressed memory. I heard that the kernel supports it, can't help with any details.

2 points

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.

3 points

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...

2 points

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

1 points

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.

2 points

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.

1 points

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.

2 points

ssh brow.sh

It's a fully modern, terminal based browser.

2 points

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.

1 points

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.

2 points
unknown author

Deleted before we saved it.

1 points

I used Netsurf on my RPI, good enough for basic duckduckgo-ing, and really light

1 points

Less processes uses less memory I believe. Using a different browser should help.

1 points

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.

1 points

In order to access your mails, you can use a mail client like, Mutt.

1 points

Keyboard shortcuts

Move and act

jork
Next / previous post or comment
Enteroro
Open the post
f
Open the media viewer
s
Save
h
Hide (the toast has Undo)
Tab
Right after an action: the toast's Undo
x
Collapse the comment
v
Next layout: cards, compact, grid

Go to

/
Search
gthenh
Home
gthena
All
gthens
Subreddits
gthenl
Library
?
This list
Esc
Close a menu or this list

In the viewer

←or→
Previous / next file
↑or↓
Previous / next post
korj
Previous / next post
Space
Play / pause
m
Mute
z
Zoom
s
Save
o
Open the post (on its own page: back to it)
Esc
Close

Keys do nothing while you type in a box.