I have set ulimit in /etc/security/limits.conf
. When I log in into my desktop environment as user testuser
normally (using slim login
manager), everything works fine.
When I log in as user testuser
via Xephyr
(from my other session as another user), everything works fine except chromium
browser. This is the error I get in dmesg
:
Chrome_ChildIOT (2472): VmData 4310827008 exceed data ulimit 4294967296. Update limits or use boot option ignore_rlimit_data.
And chromium is unusable (it starts, but waits indefinitely to load any page)
All other programs except chromium
have correct limits set. I have verified this using:
find /proc/ -maxdepth 1 -user testuser -exec cat {}/limits \; | grep 'Max data size'
all PIDs
have Max data size
set to unlimited:
Max data size unlimited unlimited bytes
except chromium
processes:
Max data size 4294967296 4294967296 bytes
Max data size 17179869184 17179869184 bytes
Max data size 17179869184 17179869184 bytes
Max data size 17179869184 17179869184 bytes
Max data size 17179869184 17179869184 bytes
Max data size 17179869184 17179869184 bytes
Max data size 17179869184 17179869184 bytes
Max data size 17179869184 17179869184 bytes
I would like to understand:
1) why does chromium
have different limits than all other programs ?
2) where do the "default" limits come from (where does chromium take the limit 4294967296
from ?
3) how can I change these default limits once and for all, globally, for all processes regardless whether they use pam or not ?
Best Answer
Chromium may look like a simple application but it is not, first there is the multi-threading which makes chromium run multiple process for different tasks (extensions, tab, core web-engine, etc) then the virtualisation, chromium use many sandbox to isolate the browsing activities which make it use more ressources than other application, also the used web-engine is not a light one... add to that the different needed libraries that are required to run and other heavy ressources functions... some related documentations are available here, here and this article have some useful infos.
4294967296 bytes (4096 MB, or 4GB limit) chromium have by design a 4GB limit this is hard coded, more infos about this is available here and here
Not an easy task but you are doing it right for most usual process, now for complicated process like chromium you need to customize your config for each "special" app.
For chromium there are some command parameters that can be used to customise/enable/disable features, you can try to use some of them to make chromium suit your needs, here are some interesting switch:
Those switch can be used with a command line like this
/usr/bin/chromium --single-process
You can also run chromium with a script that update the ulimit for it (note that values lower than 4GB may crash the browser...)