You are not logged in.
Pages: 1
Hi all,
I tend to open many tabs with my browsers and some times this can cause my system to freeze. So I would like to limit their resources, especially the memory. According to this thread:
https://unix.stackexchange.com/question … -7-cgroups
there are at least 2 solutions: timeout and cgroups, of which cgroups is recommended.
In the Arch Wiki:
https://wiki.archlinux.org/index.php/Cgroups
for cgroups any of the 3 packages (libcgroup, cgmanager, systemd) must be installed.
systemd is already installed, libcgroup is in the AUR and hasn't got updated since 2015, so I've installed cgmanager and started the service.
I guess what I need is "Persistent group configuration" but then again in the Note:
"Note: when using Systemd > = 205 to manage cgroups, you can ignore this file entirely."
which is the case. There is also an example for Matlab using /etc/cgconfig.conf.
During my research I've seen this file appearing a lot, and exactly for what I need here:
https://unix.stackexchange.com/question … -on-fedora
Long story short I'm confused how to use cgroups to limit CPU and memory of my browsers.
Any ideas how can I make it work?
Offline
better to try this first:
https://addons.mozilla.org/en-US/firefo … suspender/
https://chrome.google.com/webstore/deta … imepjeapih
as for the cpu use, why not just set a high nice level? or try cpulimit package.
Last edited by kokoko3k (2019-04-13 22:34:41)
Help me to improve ssh-rdp !
Retroarch User? Try my koko-aio shader !
Offline
@kokoko3k: thanks for the response!
I've already installed similar add-ons. For Chrome and Vivaldi seem to have effect but for the Firefox fork (most of the add-ons are not compatible) I use not always and actually this is where I need it the most.
I've never used nice. As far as I remember I tried shortly with cpulimit but I don't remember what happened. I'll look into them again.
Offline
I use "tab suspender (memory saver)" for firefox (quantum) without any issue.
AFAIK, limiting the memory via cgroups would make the application to swap when it tries to allocate more memory or crash/be killed if there's no swap to use.
As for the cpu, i'd prefer the nice method.
I you want to start the browser with the lowest priority (cpu and disk), star it this way:
# nice -n 19 ionice -c3 browserHelp me to improve ssh-rdp !
Retroarch User? Try my koko-aio shader !
Offline
I use "tab suspender (memory saver)" for firefox (quantum) without any issue.
I use "Auto Unload Tab" in Waterfox. Unfortunately it doesn't always work. I would use Firefox Quantum if the addons I use, like "Tab Mix Plus", would work with it.
AFAIK, limiting the memory via cgroups would make the application to swap when it tries to allocate more memory or crash/be killed if there's no swap to use.
Yes. I 've got more than enough swap. I prefer that the browsers use the swap instead of system processes and then see my system freeze.
Offline
Pages: 1