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)

ARM
Gonk (Firefox OS)
defect
Not set
normal

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.
(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.
Blocks: 957346
Whiteboard: memshrink → [memshrink][tarako][~400KB]
Whiteboard: [memshrink][tarako][~400KB] → [c=memory p= s= u=tarako] [memshrink][tarako][~400KB]
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?
Flags: needinfo?(tlee)
Flags: needinfo?(cyu)
See Also: → 959966
I agree to close this bug as WONTFIX.
Flags: needinfo?(tlee)
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → WONTFIX
Flags: needinfo?(cyu)
no needed for tarako. remove [tarako]
Whiteboard: [c=memory p= s= u=tarako] [memshrink][tarako][~400KB] → [c=memory p= s= u=tarako] [memshrink][~400KB]
Whiteboard: [c=memory p= s= u=tarako] [memshrink][~400KB] → [c=memory p= s= u=] [memshrink][~400KB]
It turns out bug 959966 was tarako only. Maybe we should consider doing this for other devices.
Status: RESOLVED → REOPENED
Resolution: WONTFIX → ---
(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 ago10 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.