Hello,
I tried to limit the memory usage of both firefox and chromium snap using the following commands:
snap set-quota memlimit-chromium --memory=4GB chromium
snap set-quota memlimit-firefox --memory=4GB firefox
However, even after restarting chrome of firefox, quotas don’t seem to be enforced:
~ $ snap quotas
Quota Parent Constraints Current
memlimit-chromium memory=4.00GB
memlimit-firefox memory=4.00GB
~ $ snap quota memlimit-firefox
name: memlimit-firefox
constraints:
memory: 4.00GB
current:
memory: 0B
snaps:
- firefox
~ $ ps -ef | grep -c -E "firefox"
10
~ $ ps -ef | grep -c -E "chrome"
26
i use snap on ubuntu 23.04.
~ $ snap version
snap 2.59.5
snapd 2.59.5
series 16
ubuntu 23.04
kernel 6.2.0-25-generic
~ $ snap list | grep -E "firefox|chromium"
chromium 114.0.5735.198 2529 latest/stable canonical** -
firefox 115.0b9-1 2825 latest/beta mozilla** -
i followed this documentation:
https://snapcraft.io/docs/installing-snap-on-ubuntu
and did not find any related issue on:
https://bugs.launchpad.net/snapd
I did set experimental.quota-groups
to true
before upgrading to ubuntu 23.04 and did not modify this setting (but from snapd release notes this should not be necessary anymore)
~ $ sudo snap get system experimental.quota-groups
true
Did i miss something ? Cheers,