Closed
Bug 1057065
Opened 10 years ago
Closed 10 years ago
High memory usage and apps gets killed more often because of multiple preallocate process on device .
Categories
(Firefox OS Graveyard :: Performance, defect, P1)
Tracking
(blocking-b2g:2.0+, firefox32 wontfix, firefox33 wontfix, firefox34 fixed, b2g-v2.0 fixed, b2g-v2.1 fixed)
People
(Reporter: tkundu, Assigned: ting)
References
Details
(Keywords: memory-footprint, perf, Whiteboard: [caf priority: p1][CR 713185][MemShrink])
Attachments
(5 files, 2 obsolete files)
STR: DO some random stability testing on device.
1) Device takes longer time to launch subsequent app and it becomes unresponsive temporarily at some point
2) Multiple preallocate process are created from NUWA process and it does not goes away even after device resumes normal operations
Reporter | ||
Comment 1•10 years ago
|
||
[Blocking Requested - why for this release]:
blocking-b2g: --- → 2.0?
Reporter | ||
Comment 2•10 years ago
|
||
gecko memory report from affected device
Reporter | ||
Updated•10 years ago
|
Flags: needinfo?(khuey)
Flags: needinfo?(erahm)
Updated•10 years ago
|
Updated•10 years ago
|
Whiteboard: [CR 713185][MemShrink] → [caf priority: p1][CR 713185][MemShrink]
Assignee | ||
Updated•10 years ago
|
Assignee | ||
Comment 4•10 years ago
|
||
Calling RunAfterPreallocatedProcessReady() in nsFrameLader::ReallyStartLoadingInternal() causes SendNuwaFork(), which is not needed as of bug 1033618 landing. If two applications are launched continuously when there's no preallocated process, there will be chances that Nuwa forks two preallocated processes and both are not used.
Kyle, I removed also RunAfterPreallocatedProcessReady() since it is not used in any other places, please let me know if I should recover it.
Tapas, could you please test the patch since there's no specific STR? I couldn't repro after applying the patch, but I am afraid maybe I just didn't trigger it.
The patch of bug 1033618 seems applied differently on trunk, I will make another patch for it later.
Attachment #8477249 -
Flags: review?(khuey)
Flags: needinfo?(tkundu)
Assignee | ||
Comment 5•10 years ago
|
||
Comment on attachment 8477249 [details] [diff] [review]
patch-b2gv2.0
Removed duplicate review flag.
Attachment #8477249 -
Flags: review?(khuey)
Assignee | ||
Updated•10 years ago
|
Assignee | ||
Comment 6•10 years ago
|
||
I just realized v2.0 is now on mozilla-beta, rebased.
Attachment #8477249 -
Attachment is obsolete: true
Attachment #8477249 -
Flags: review?(khuey)
Attachment #8477349 -
Flags: review?(khuey)
Assignee | ||
Comment 7•10 years ago
|
||
Try looks good: https://tbpl.mozilla.org/?tree=Try&rev=f614089dc04b
Updated•10 years ago
|
Flags: needinfo?(erahm)
Comment 8•10 years ago
|
||
Confirmed with Tapas/Inder that they have picked the patch in review here and are trying to test it.
Reporter | ||
Comment 9•10 years ago
|
||
This is reproduced again with patch from attachment 8477349 [details] [diff] [review] .
UI is stuck and we are seeing multiple preallocate process. We have to wait for 2-3 mins so that preallocate apps are killed or converted to actual apps (Please see b2g-info logs).
Flags: needinfo?(tkundu)
Reporter | ||
Updated•10 years ago
|
Flags: needinfo?(tchou)
Assignee | ||
Comment 10•10 years ago
|
||
Can you elaborate "UI is stuck" and how was "2-3 mins" counted, does that mean you did nothing and wait 2-3 mins for preallocated processes to become apps?
From b2g-info logs, it seems you launch multiple applications simutaneously, so there could be some preallocated processes existed (forked and haven't changed to app), but I don't see two preallocated which do not go away as you reported originally?
Flags: needinfo?(tchou) → needinfo?(tkundu)
Assignee | ||
Comment 11•10 years ago
|
||
Also from b2g-info logs of attachment 8477349 [details] [diff] [review], I don't see more than one prallocated process is forked from Nuwa.
Reporter | ||
Comment 12•10 years ago
|
||
(In reply to Ting-Yu Chou [:ting] from comment #10)
> Can you elaborate "UI is stuck" and how was "2-3 mins" counted, does that
> mean you did nothing and wait 2-3 mins for preallocated processes to become
> apps?
>
Yes. UI stuck means I am touching icons of multiple apps but it is taking to start those apps.
And I have to wait 2-3 mins for preallicated processes to become apps.
> From b2g-info logs, it seems you launch multiple applications simutaneously,
> so there could be some preallocated processes existed (forked and haven't
> changed to app), but I don't see two preallocated which do not go away as
> you reported originally?
I am just touching multiple icons in homescreen as quickly as possible without closing any apps.
Flags: needinfo?(tkundu) → needinfo?(tchou)
Assignee | ||
Comment 13•10 years ago
|
||
Please correct me if I misunderstood.
So the "reproduced again" in comment 9 means you didn't see extra unused preallocated process forked from Nuwa but you saw preallocated processes transform to apps slowly when try to launch many apps at the same time?
2-3 mins is still too slow, is the test device a 319MB Flame? I couldn't reproduce that on mine.
Flags: needinfo?(tchou) → needinfo?(tkundu)
Comment 14•10 years ago
|
||
(In reply to Ting-Yu Chou [:ting] from comment #13)
> Please correct me if I misunderstood.
>
> So the "reproduced again" in comment 9 means you didn't see extra unused
> preallocated process forked from Nuwa but you saw preallocated processes
> transform to apps slowly when try to launch many apps at the same time?
>
> 2-3 mins is still too slow, is the test device a 319MB Flame? I couldn't
> reproduce that on mine.
ting, the CAF testing is based on a 256MB QRD 8x10 hardware.
blocking-b2g: 2.0? → 2.0+
Reporter | ||
Comment 15•10 years ago
|
||
(In reply to Ting-Yu Chou [:ting] from comment #13)
> Please correct me if I misunderstood.
>
> So the "reproduced again" in comment 9 means you didn't see extra unused
> preallocated process forked from Nuwa but you saw preallocated processes
> transform to apps slowly when try to launch many apps at the same time?
>
Yes . You are right.
Flags: needinfo?(tkundu) → needinfo?(tchou)
Assignee | ||
Comment 16•10 years ago
|
||
(In reply to Tapas (always NI me) from comment #0)
> 2) Multiple preallocate process are created from NUWA process and it does
> not goes away even after device resumes normal operations
The patch (attachment 8477439 [details] [diff] [review]) is to adress this, which from your attachment 8476966 [details] there's an extra unused preallocated process from Nuwa:
NAME PID PPID CPU(s) NICE USS PSS RSS SWAP VSIZE OOM_ADJ USER
b2g 231 1 155.8 0 36.2 38.3 43.7 14.4 243.4 0 root
(Nuwa) 983 231 2.4 0 0.0 0.0 0.4 7.8 53.8 0 root
Homescreen 1019 983 35.4 1 1.2 2.2 5.6 15.5 79.0 2 u0_a1019
(Preallocated a 24939 983 1.6 18 0.0 0.2 1.4 10.1 60.9 1 u0_a24939
QcSettings 24949 231 2.8 18 7.6 9.9 15.5 3.5 67.9 11 u0_a24949
HelloWorld 24968 231 2.5 18 6.4 8.5 14.0 3.9 67.9 10 u0_a24968
(Preallocated a 25004 983 1.3 18 0.0 0.2 1.3 10.1 60.9 1 u0_a25004
Tapas, then what is the expected result of this bug?
Flags: needinfo?(tchou) → needinfo?(tkundu)
Assignee | ||
Comment 17•10 years ago
|
||
(In reply to Ting-Yu Chou [:ting] from comment #16)
> (In reply to Tapas (always NI me) from comment #0)
> > 2) Multiple preallocate process are created from NUWA process and it does
> > not goes away even after device resumes normal operations
>
> The patch (attachment 8477439 [details] [diff] [review]) is to adress this,
I meant attachment 8477349 [details] [diff] [review].
Reporter | ||
Comment 18•10 years ago
|
||
(In reply to Ting-Yu Chou [:ting] from comment #17)
> (In reply to Ting-Yu Chou [:ting] from comment #16)
> > (In reply to Tapas (always NI me) from comment #0)
> > > 2) Multiple preallocate process are created from NUWA process and it does
> > > not goes away even after device resumes normal operations
> >
> > The patch (attachment 8477439 [details] [diff] [review]) is to adress this,
>
> I meant attachment 8477349 [details] [diff] [review].
Yes this issue is fixed with this patch. I also agree.
I will raise separate bug for my comment 9.
Please go ahead and land your fix in v2.0
Flags: needinfo?(tkundu) → needinfo?(tchou)
Can you summarize comments 9-18 for me so I can review this quickly tomorrow?
Flags: needinfo?(khuey) → needinfo?(tchou)
Assignee | ||
Comment 21•10 years ago
|
||
Tapas said the bug is still reproducible even with the patch applied because preallocated processes transform to apps slowly. But the bug was reported that there're multiple preallocated processes from Nuwa do not go away. So I explained what the patch fixes and asked what is the expected result of this bug in comment 16. He then confirmed the bug is fixed with the patch, and will file another bug for "transforming slowly".
Flags: needinfo?(tchou)
Comment on attachment 8477349 [details] [diff] [review]
patch-b2gv2.0
Review of attachment 8477349 [details] [diff] [review]:
-----------------------------------------------------------------
I love removing code. r=me
Attachment #8477349 -
Flags: review?(khuey) → review+
Reporter | ||
Comment 23•10 years ago
|
||
(In reply to Ting-Yu Chou [:ting] from comment #21)
> He then confirmed the bug is fixed with the patch, and
> will file another bug for "transforming slowly".
This "transforming slowly" issue is related to bug 1055299 . I will follow up there.
Assignee | ||
Comment 24•10 years ago
|
||
Carry r+ from comment 22.
Attachment #8477349 -
Attachment is obsolete: true
Attachment #8478765 -
Flags: review+
Assignee | ||
Comment 26•10 years ago
|
||
Try on trunk: https://tbpl.mozilla.org/?tree=Try&rev=7f737cc8302e
Keywords: checkin-needed
Comment 27•10 years ago
|
||
Keywords: checkin-needed
Comment 28•10 years ago
|
||
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → 2.1 S3 (29aug)
Comment 29•10 years ago
|
||
status-b2g-v2.0:
--- → fixed
status-b2g-v2.1:
--- → fixed
status-firefox32:
--- → wontfix
status-firefox33:
--- → wontfix
status-firefox34:
--- → fixed
Comment 30•10 years ago
|
||
It seems that this patch has a side-effect.
please check below issue.
https://bugzilla.mozilla.org/show_bug.cgi?id=1079654
You need to log in
before you can comment on or make changes to this bug.
Description
•