Hi, I have 32 GB of RAM and my previous SSD spent half its TBW, I bought a new one recently. So, I suppose, the YouTube videos use a lot of GBS and maybe it’s better to disable the cache and use only RAM. How to optimize it? I got a tip to use HW acceleration but in my browsers (Opera, Brave, all chrome-based) “Use hardware acceleration when available” was always true. How to check the cache?
Also there is a thread that can’t solve the issue for FF, so maybe I need to switch some other settings?
System cache and app cache are different locations System cache is only used when user space runs out of RAM. Application caches are controlled by the apps and use a file defined by the application . Turn caching off in the program (Browser) or set a smaller cache . Also the browser reports usage and cache settings in most cases in its settings With 32 gig you generally don’t need system cache unless you are using really high RAM usage. Note if you run out of ram the system will crash with no system cache
If you set a smaller cache, it’s highly likely the cache just will be rewritten more often without any advantages to SSD. How should I disable cache properly, does anybody know?
Was not aware that Firefox didn’t respect network cache settings for videos. I’d find out where these files are written to (tools: strace, fatrace), and mount a tmpfs on /etc/fstab for that location.
Did you find where this cache is stored for Chrome-based browsers?
Looks like there is only a common cache for Opera: ~/.cache/opera/Cache/
profile-sync-daemon (psd) is a tiny pseudo-daemon designed to manage browser profile(s) in tmpfs and to periodically sync back to the physical disc (HDD/SSD). This is accomplished by an innovative use of rsync to maintain synchronization between a tmpfs copy and media-bound backup of the browser profile(s). Additionally, psd features several crash recovery features.
The design goals and benefits of psd are:
- Transparent user experience
- Reduced wear to physical drives
- Speed
Since the profile(s), browser cache, etc. are relocated into tmpfs (RAM disk), the corresponding I/O associated with using the browser is also redirected from the physical drive to RAM, thus reducing wear to the physical drive and also greatly improving browser speed and responsiveness.
How can implement it here? It is not in OpenSUSE, I only found custom builds
https://software.opensuse.org/package/profile-sync-daemon
It’s part of Tumbleweed:
erlangen:~ # zypper if profile-sync-daemon
Loading repository data...
Reading installed packages...
Information for package profile-sync-daemon:
--------------------------------------------
Repository : Haupt-Repository (OSS)
Name : profile-sync-daemon
Version : 6.48-1.1
Arch : noarch
Vendor : openSUSE
Installed Size : 47.8 KiB
Installed : No
Status : not installed
Source package : profile-sync-daemon-6.48-1.1.src
Upstream URL : https://github.com/graysky2/profile-sync-daemon
Summary : Symlinks and syncs browser profile dirs to RAM thus reducing HDD/SDD calls
Description :
Profile-sync-daemon (psd) is a tiny pseudo-daemon designed to manage your
browser's profile in tmpfs and to periodically sync it back to your physical
disc (HDD/SSD). This is accomplished via a symlinking step and an innovative
use of rsync to maintain back-up and synchronization between the two. One of
the major design goals of psd is a completely transparent user experience.
erlangen:~ #
Installed from a custom package but can’t launch:
zypper addrepo https://download.opensuse.org/repositories/home:kostasp/15.4/home:kostasp.repo
systemctl start example.service
Failed to start psd.service: Unit psd.service not found.
Looks like need to create a copy.
karl@leap154:~> systemctl --user enable --now psd
Created symlink /home/karl/.config/systemd/user/default.target.wants/psd.service → /usr/lib/systemd/user/psd.service.
karl@leap154:~>
karl@leap154:~> ll .config/systemd/user/default.target.wants/psd.service
lrwxrwxrwx 1 karl users 33 18. Mär 11:32 .config/systemd/user/default.target.wants/psd.service -> /usr/lib/systemd/user/psd.service
karl@leap154:~>
karl@leap154:~> systemctl --user status psd
● psd.service - Profile-sync-daemon
Loaded: loaded (/usr/lib/systemd/user/psd.service; enabled; vendor preset: disabled)
Active: active (exited) since Sat 2023-03-18 11:32:26 CET; 2min 46s ago
Docs: man:psd(1)
man:profile-sync-daemon(1)
https://wiki.archlinux.org/index.php/Profile-sync-daemon
Process: 7238 ExecStart=/usr/bin/profile-sync-daemon startup (code=exited, status=0/SUCCESS)
Main PID: 7238 (code=exited, status=0/SUCCESS)
Mär 18 11:32:26 leap154 systemd[6774]: Starting Profile-sync-daemon...
Mär 18 11:32:26 leap154 profile-sync-daemon[7238]: First time running psd so please edit /home/karl/.config/psd/psd.conf to your liking and run again.
Mär 18 11:32:26 leap154 systemd[6774]: Finished Profile-sync-daemon.
karl@leap154:~>
karl@leap154:~> systemctl --user status psd
● psd.service - Profile-sync-daemon
Loaded: loaded (/usr/lib/systemd/user/psd.service; enabled; vendor preset: disabled)
Active: active (exited) since Sat 2023-03-18 11:40:04 CET; 29s ago
Docs: man:psd(1)
man:profile-sync-daemon(1)
https://wiki.archlinux.org/index.php/Profile-sync-daemon
Process: 7731 ExecStart=/usr/bin/profile-sync-daemon startup (code=exited, status=0/SUCCESS)
Main PID: 7731 (code=exited, status=0/SUCCESS)
Mär 18 11:40:03 leap154 systemd[6774]: Starting Profile-sync-daemon...
Mär 18 11:40:04 leap154 profile-sync-daemon[7731]: psd startup check successful
Mär 18 11:40:04 leap154 systemd[6774]: Finished Profile-sync-daemon.
karl@leap154:~>
When you add a repo, then you can install packages from it. I do not see the installation.
This post is confusing in any case. We see some commands, but we like to see the full action: line with prompt and command, all output, line with new prompt.
This is wrong
5.14.21-150400.24.46-default
This is OK
henk@boven:~> uname -r
5.14.21-150400.24.46-default
henk@boven:~>
And doing this will avoid strange things like starting example
and then getting psd
is not found.
What about adding it to FAQ? Together with explanation how to properly post computer text?
Do you really believe that this will change anything? Most users are not even able to use the search function (can be seen at the amount of threads regarding the failing Leap kernel…)
In the long run hopefully yes.
~> systemctl --user enable --now psd
Created symlink /home/psijic/.config/systemd/user/default.target.wants/psd.service → /usr/lib/systemd/user/psd.service.
~> ll .config/systemd/user/default.target.wants/psd.service
lrwxrwxrwx 1 psijic users 33 мар 18 16:19 .config/systemd/user/default.target.wants/psd.service -> /usr/lib/systemd/user/psd.service
~> systemctl --user status psd
● psd.service - Profile-sync-daemon
Loaded: loaded (/usr/lib/systemd/user/psd.service; enabled; vendor preset: disabled)
Active: active (exited) since Sat 2023-03-18 16:19:44 +03; 23s ago
Docs: man:psd(1)
man:profile-sync-daemon(1)
https://wiki.archlinux.org/index.php/Profile-sync-daemon
Process: 6345 ExecStart=/usr/bin/profile-sync-daemon startup (code=exited, status=0/SUCCESS)
Main PID: 6345 (code=exited, status=0/SUCCESS)
~> systemctl start psd.service
Failed to start psd.service: Unit psd.service not found.
Not sure if all is ok here. And how can I add Brave browser? Cache is here: .cache/BraveSoftware/Brave-Browser/Default/Cache/Cache_Data/
I assume that when user psijic enables this, (s)he is also the one that should start it and not root. It is a user wish/solution/action and has not much to do with the system (except the installation to make it available to the user).
You need to talk to the user instance of systemd:
karl@6700k:~> systemctl --user status psd
● psd.service - Profile-sync-daemon
Loaded: loaded (/usr/lib/systemd/user/psd.service; enabled; preset: disabled)
Active: active (exited) since Sun 2023-03-19 04:39:28 CET; 2min 7s ago
Docs: man:psd(1)
man:profile-sync-daemon(1)
https://wiki.archlinux.org/index.php/Profile-sync-daemon
Process: 6550 ExecStart=/usr/bin/profile-sync-daemon startup (code=exited, status=0/SUCCESS)
Main PID: 6550 (code=exited, status=0/SUCCESS)
CPU: 1.131s
Mar 19 04:39:27 6700k systemd[1229]: Starting Profile-sync-daemon...
Mar 19 04:39:28 6700k profile-sync-daemon[6550]: psd startup check successful
Mar 19 04:39:28 6700k systemd[1229]: Finished Profile-sync-daemon.
karl@6700k:~>
Check for profile:
karl@6700k:~> du -hd1 /run/user/1000/psd
56M /run/user/1000/psd/karl-firefox-f5hg0ga2.default-release
4.0K /run/user/1000/psd/karl-firefox-ijpz0q94.default
56M /run/user/1000/psd
karl@6700k:~>
karl@6700k:~> journalctl --user -b -u psd
Mar 19 04:38:52 6700k systemd[1229]: Starting Profile-sync-daemon...
Mar 19 04:38:52 6700k profile-sync-daemon[5945]: First time running psd so please edit /home/karl/.config/psd/psd.conf to your liking and run again.
Mar 19 04:38:52 6700k systemd[1229]: Finished Profile-sync-daemon.
Mar 19 04:39:26 6700k systemd[1229]: Stopping Profile-sync-daemon...
Mar 19 04:39:26 6700k profile-sync-daemon[6345]: firefox resync successful
Mar 19 04:39:26 6700k profile-sync-daemon[6345]: firefox resync successful
Mar 19 04:39:27 6700k profile-sync-daemon[6345]: firefox unsync successful
Mar 19 04:39:27 6700k profile-sync-daemon[6345]: firefox unsync successful
Mar 19 04:39:27 6700k systemd[1229]: Stopped Profile-sync-daemon.
Mar 19 04:39:27 6700k systemd[1229]: psd.service: Consumed 1.035s CPU time.
Mar 19 04:39:27 6700k systemd[1229]: Starting Profile-sync-daemon...
Mar 19 04:39:28 6700k profile-sync-daemon[6550]: psd startup check successful
Mar 19 04:39:28 6700k systemd[1229]: Finished Profile-sync-daemon.
karl@6700k:~>
Looks something is supported:
systemctl --user status psd
● psd.service - Profile-sync-daemon
Loaded: loaded (/usr/lib/systemd/user/psd.service; enabled; vendor preset: disabled)
Active: active (exited) since Sun 2023-03-19 11:42:06 +03; 24min ago
Docs: man:psd(1)
man:profile-sync-daemon(1)
https://wiki.archlinux.org/index.php/Profile-sync-daemon
Main PID: 1613 (code=exited, status=0/SUCCESS)
~> du -hd1 /run/user/1000/psd
887M /run/user/1000/psd/psijic-opera
0 /run/user/1000/psd/psijic-google-chrome
42M /run/user/1000/psd/psijic-firefox-chh9wspd.default-release
4.0K /run/user/1000/psd/psijic-firefox-r4npqvhs.default
928M /run/user/1000/psd
Need to add Brave also.