Discussion:
[chromium-dev] Chromium out of memory
e***@gmail.com
2018-11-07 06:32:47 UTC
Permalink
Hi,

I am interested in how chromium handle the out of memory by set
the --js-flags="--max_old_space_size=xxx".This parameter seems set the
memory limit of render process.
When I set it as 10 and visit the page which to allocate much more memory,
it will do GC and invokenearheaplimitcallback in
https://cs.chromium.org/chromium/src/v8/src/heap/heap.cc?type=cs&g=0&l=3293,then
the render process is killed.
I tried to adjust the oomscore from 300 to 0 here
https://cs.chromium.org/chromium/src/base/process/memory_linux.cc?gsn=LAST_GROWABLE_PAGED_SPACE&g=0&l=84
and render process was still killed when oom happened.

I understand we can use cgroups to limit the process's resource,but I am
not sure whether chromium use it together with max_old_space_size to limit
render or V8's resource.Could some one help guide me how chromium limit its
memory by using max_old_space_size?
By the way,adjustoomscore seems not work to avoid render be killed,is this
behavior controlled by chromium or linux kernel?

Thanks.
--
--
Chromium Developers mailing list: chromium-***@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev
---
You received this message because you are subscribed to the Google Groups "Chromium-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-dev+***@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/241c3246-e65a-45e3-8550-9d58182fc2ba%40chromium.org.
PhistucK
2018-11-07 07:08:57 UTC
Permalink
Note that it probably does not affect the memory of the renderer, though,
only the JavaScript memory (it is an internal V8 flag, not a Blink/Chromium
flag).

☆*PhistucK*
Post by e***@gmail.com
Hi,
I am interested in how chromium handle the out of memory by set
the --js-flags="--max_old_space_size=xxx".This parameter seems set the
memory limit of render process.
When I set it as 10 and visit the page which to allocate much more memory,
it will do GC and invokenearheaplimitcallback in
https://cs.chromium.org/chromium/src/v8/src/heap/heap.cc?type=cs&g=0&l=3293,then
the render process is killed.
I tried to adjust the oomscore from 300 to 0 here
https://cs.chromium.org/chromium/src/base/process/memory_linux.cc?gsn=LAST_GROWABLE_PAGED_SPACE&g=0&l=84
and render process was still killed when oom happened.
I understand we can use cgroups to limit the process's resource,but I am
not sure whether chromium use it together with max_old_space_size to limit
render or V8's resource.Could some one help guide me how chromium limit its
memory by using max_old_space_size?
By the way,adjustoomscore seems not work to avoid render be killed,is this
behavior controlled by chromium or linux kernel?
Thanks.
--
--
http://groups.google.com/a/chromium.org/group/chromium-dev
---
You received this message because you are subscribed to the Google Groups
"Chromium-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an
To view this discussion on the web visit
https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/241c3246-e65a-45e3-8550-9d58182fc2ba%40chromium.org
<https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/241c3246-e65a-45e3-8550-9d58182fc2ba%40chromium.org?utm_medium=email&utm_source=footer>
.
--
--
Chromium Developers mailing list: chromium-***@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev
---
You received this message because you are subscribed to the Google Groups "Chromium-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-dev+***@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/CABc02_LHhpT-4v7NNzhQAvoS0d%3DHBkqpEE4Ou59R88zywnk1zQ%40mail.gmail.com.
e***@gmail.com
2018-11-07 07:24:53 UTC
Permalink
Thanks Phistuck for your information.Could you share how JavaScript use the
flag to limit the memory?
Does JavaScript use it to allocate fixed memory from system as a pool ,when
js want to allocate memory and it will use the memory from the pool.If the
left memory is not enough for js,then will fire kernel's oom to kill render
process?
--
--
Chromium Developers mailing list: chromium-***@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev
---
You received this message because you are subscribed to the Google Groups "Chromium-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-dev+***@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/a1bbf010-073d-4595-91c6-02624de53842%40chromium.org.
Loading...