can i just limit the chromium browser use how much meomory ? eg .set the max used memory is 350M ?

1,702 views
Skip to first unread message

顾悠悠

unread,
Jan 20, 2016, 7:20:39 AM1/20/16
to Chromium-discuss
Can i  just limit the chromium browser use how much meomory ? eg .set the max used memory is 350M ?
Can i ? 
If can ? how to do that ?
If i did this, can any terrible things happen ? 

Primiano Tucci

unread,
Jan 20, 2016, 8:05:37 AM1/20/16
to guyouy...@gmail.com, Chromium-discuss
There is no such thing in chrome as a max-memory setting (but general improvements coming on each release).
From a more general standpoint, however, on Linux you can use control groups to set the memory limit of any kind of app. If you do that will chrome, that the result will be that tabs will die and be discarded very easily (you'll get lot of "aw snaps").


Example:
sudo apt-get install cgroup-bin
sudo cgcreate -a $USER -s 666 -g memory:chrome
cgset -r memory.limit_in_bytes=500M chrome
cgexec -g memory:chrome /opt/google/chrome-beta/google-chrome



--
--
Chromium Discussion mailing list: chromium...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-discuss

---
You received this message because you are subscribed to the Google Groups "Chromium-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-discu...@chromium.org.

顾悠悠

unread,
Jan 20, 2016, 8:30:37 AM1/20/16
to Chromium-discuss, guyouy...@gmail.com
how can i control such as max-memory in chromium in android? 
not use linux or  android command

在 2016年1月20日星期三 UTC+8下午9:05:37,Primiano Tucci写道:

顾悠悠

unread,
Jan 24, 2016, 8:24:33 PM1/24/16
to Chromium-discuss
does any one knows this?

在 2016年1月20日星期三 UTC+8下午8:20:39,顾悠悠写道:

Anand

unread,
Jan 24, 2016, 10:57:54 PM1/24/16
to Chromium-discuss
The previous answer said it all. There's no built-in way of limiting memory. You need to use your OS provided mechanism such as cgroups on Linux. Questions about how to do that on your OS are best asked elsewhere (i.e. Stack Overflow).
Reply all
Reply to author
Forward
0 new messages