Closed
Bug 947571
Opened 11 years ago
Closed 10 years ago
do not spawn pre-allocated process in low memory conditions
Categories
(Core :: DOM: Device Interfaces, defect)
Tracking
()
RESOLVED
WONTFIX
People
(Reporter: bkelly, Unassigned)
References
Details
(Keywords: perf, Whiteboard: [c=memory p= s= u=] [memshrink][~400KB])
The pre-allocated process is currently marked with an oom adj of 10, which means it will be considered by the OOM killer if we have less than 20MB of free memory.
It seems, however, if we are in low memory conditions we will currently launch the pre-allocated process just to have it killed shortly thereafter. This seems a bit wasteful in terms of CPU and probably spikes our memory usage when its already under pressure.
I believe I saw this in bug 945948 where the pre-allocated process was spawned when we only had ~10MB of free memory. It was, of course, killed immediately.
Perhaps we should consider taking some of the code from b2g-info to read the current free memory and oom parameters to determine if the pre-allocate process will survive before spawning it.
Comment 1•11 years ago
|
||
(In reply to Ben Kelly [:bkelly] from comment #0)
> Perhaps we should consider taking some of the code from b2g-info to read the
> current free memory and oom parameters to determine if the pre-allocate
> process will survive before spawning it.
Sounds like a good idea. Currently the pre-launched process starts on a timeout; we could integrate it with a check of how much free memory is available when it expires. In case there's too little memory we could either give up or re-schedule the timer with a longer interval.
Updated•11 years ago
|
Whiteboard: memshrink → [memshrink][tarako][~400KB]
Updated•11 years ago
|
Whiteboard: [memshrink][tarako][~400KB] → [c=memory p= s= u=tarako] [memshrink][tarako][~400KB]
Reporter | ||
Comment 2•11 years ago
|
||
Based on the activity in bug 959966 it appears we are going to be keeping the pre-allocated process at a high priority. Cervantes, Thinker, should we close this bug out as WONTFIX?
Reporter | ||
Updated•11 years ago
|
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → WONTFIX
Updated•11 years ago
|
Flags: needinfo?(cyu)
Comment 4•11 years ago
|
||
no needed for tarako. remove [tarako]
Whiteboard: [c=memory p= s= u=tarako] [memshrink][tarako][~400KB] → [c=memory p= s= u=tarako] [memshrink][~400KB]
Updated•11 years ago
|
Whiteboard: [c=memory p= s= u=tarako] [memshrink][~400KB] → [c=memory p= s= u=] [memshrink][~400KB]
Reporter | ||
Comment 5•10 years ago
|
||
It turns out bug 959966 was tarako only. Maybe we should consider doing this for other devices.
Status: RESOLVED → REOPENED
Resolution: WONTFIX → ---
Comment 6•10 years ago
|
||
(In reply to Ben Kelly [:bkelly] from comment #5)
> It turns out bug 959966 was tarako only. Maybe we should consider doing
> this for other devices.
Is it? Bug 959966 comment 29 shows that the change landed on master too.
Status: REOPENED → RESOLVED
Closed: 11 years ago → 10 years ago
Resolution: --- → WONTFIX
You need to log in
before you can comment on or make changes to this bug.
Description
•