New feature: Browsers on RAM ! (faster & healthier for your computer)

I have been working for 3 days to make this feature well integrated, I think now its done and correctly working, so everybody is welcome to try it :slight_smile:

What

Your (bloated) browsers uses a lot of HD access, especially writing, this damages your hard disk (especially SSD and extremely for USB's on persistence) over time, by running the conf file over RAM it makes it more responsive but also improves your HD health, this can be an issue because browsers are already bloated and using even more ram could be worse, but fortunately Elive uses special overlay systems and so the ram impact is not very big :slight_smile: it includes a sync to the real HD every 30 minutes too

The feature is automatically enabled for computers that:

  • require it (SSD or Live mode on persistence)
  • has enough ram (more than 4gb)
  • ask to the user (at least 3gb of ram)
  • anything else, is not asked (not used)

How to use it:

Simply run "apug" and reboot, if your computer is candidate, it will directly work, give it 2 minutes after the desktop starts to make it ready, with the next command you can see if shows the browser mounted on ram:

mount | grep "upperdir=/run/user"

If your computer is not candidate / needed to use it, you can still enjoy the feature running "elive-browsers-on-ram"

Enjoy! :applause:

3 Likes

Is this mod on stable or just beta?

Anyhow I did this on beta:-
~ ❯❯❯ elive-browsers-on-ram
E: Command 'psd' for elive-browsers-on-ram not found, func: main
Installing Dependencies
Created symlink /home/david/.config/systemd/user/default.target.wants/psd.service → /usr/lib/systemd/user/psd.service.
Created symlink /home/david/.config/systemd/user/default.target.wants/psd-resync.service → /usr/lib/systemd/user/psd-resync.service.
Job for psd-resync.service failed because the control process exited with error code.
See "systemctl --user status psd-resync.service" and "journalctl --user -xe" for details.
~ ❯❯❯

No joy on my machine:

I have the same failure where the 'systemctl status' output is:

~ ❯❯❯ systemctl --user status psd-resync.service                                                                                                                                  1
● psd-resync.service - Timed resync
     Loaded: loaded (/usr/lib/systemd/user/psd-resync.service; enabled; vendor preset: enabled)
     Active: failed (Result: exit-code) since Mon 2022-01-10 13:33:16 CET; 3min 31s ago
TriggeredBy: ● psd-resync.timer
    Process: 4737 ExecStart=/usr/bin/profile-sync-daemon resync (code=exited, status=1/FAILURE)
   Main PID: 4737 (code=exited, status=1/FAILURE)
        CPU: 53ms

Jan 10 13:33:16 Elive-triantares-X1 systemd[4712]: Starting Timed resync...
Jan 10 13:33:16 Elive-triantares-X1 sudo[4760]: triantares : a password is required ; PWD=/home/triantares ; USER=root ; COMMAND=/usr/bin/psd-overlay-helper
Jan 10 13:33:16 Elive-triantares-X1 systemd[4712]: psd-resync.service: Main process exited, code=exited, status=1/FAILURE
Jan 10 13:33:16 Elive-triantares-X1 systemd[4712]: psd-resync.service: Failed with result 'exit-code'.
Jan 10 13:33:16 Elive-triantares-X1 systemd[4712]: Failed to start Timed resync.
~ ❯❯❯ 

SOLVED!

And this looks like the reason: triantares needs sudo access to /usr/bin/psd-overlay-helper
where the recommended solution works (in my case):
add
'triantares ALL=(ALL) NOPASSWD: /usr/bin/psd-overlay-helper' to the /'etc/sudoers.d/ sudo_nopasswd_generic_triantares' by using the 'sudo visudo' command to edit said file.

  • If anyone else does this, make sure 'triantares' is replaced by your $USER name in the generic file-name as well as inside it.

You can also simply wait it out as I have no doubt @thanatermesis will resolve this ASAP. :work:

BTW,
This an awesome enhancement to Elive.......the world should know, at the least.

Ok, all seems to be fixed, simply run the command:

elive-upgrader

You should see a notification about this update, and after reboot, all it should be working and set up :applause:

yes it is, I will include it in the release announcement (the website should also tell that in the future Features pages)

1 Like

Here we go. :smiley14:

There is a slight issue with 'elive-upgrader' if upgraded to Bullseye:

 ❯❯❯ elive-upgrader
E: debian version unknown: 11.1
~ ❯❯❯ 

Not that it's a problem for me ....... I already edited my '/etc/sudoers' myself but 'elive-upgrader' should have Bullseye recognition (and available hooks) for future use.

thanks, I added the recognition of elive-upgrader for bullseye, but in any case the hooks are implemented per-distro so they are implemented only on buster since is the actual version used for elive (bullseye is for experimenters at the moment :slight_smile: even if works good )

Tweet re-teweeteeed

I added that to the HowTo too. :smiley14:

Good! 44 now. :applause:

I just installed Brave after that Browser in memory wizzard short up

How do I manually make sure Brave use that new IN RAM feature ?

He explained:

1 Like

as stated in the first post..... It should give a mount named 'overlaid'

to manually run it (again) use:
'elive-browser-on-ram' in a terminal.

Also with 'free -h' you'll prolly see RAM usage rise when opening tabs.

1 Like

Brave does not show up in the list of Web Browser... I guess the way I installed it make it difficult for that app to see it

Well considering those are very old versions of Debian, Ubuntu and Mint ..... I wouldn't be surprised.
Isn't there a more recent version like here: How to Install Brave Browser on Debian 11 – LinuxWays
I take it that Brave doesn't show up in the desktop-menu under 'network' either?

Alas 'brave' isn't on the expected browser listing (yet):

  • google-chrome chromium firefox firefox-esr palemoon midori opera vivaldi

tks will try your link
Yes brave showed up in Elive Menu, Network

But it's not going to change the fact that 'brave-browser' was left out.
Wait it out, i'd say.

If you do 'less $(which elive-browser-on-ram)' you'll see it's missing in the line-up.

Might just be a hard nut to crack. :frowning_face:

1 Like

Browser on ram is a nice touch and i always use it.
I just encountered a problem today for the first time: i run borwser on ram, i clicked on yes, nothing happened.
I thought it was normal coz i had just one browser installed this time, so no need for choosing which one.
Started to do my stuff on firefox, but after several minutes (at least five) the browser crashed and i got the notification "now your browser will run on ram (or something like that)". I didn't expect it to take so much and it made the browser crash while i was doing stuff on my bank account so not really in the best moment :sweat_smile: Maybe a "loading" or a warning is needed!

Something strange happened to me today too, seems like the systemctl connection was lost I don't know why, upgrade your system (bookworm) to have these updates.

In any case, upgrade, reboot, and try to run again "elive-browsers-on-ram" with the browsers previously closed, if you had the issue again run "elive-health" manually to verify if systemctl is correctly connected (which seems to have been the cause), so you can know if that was the issue or not

1 Like

I shall give it a go.