Display the correct name for Nuwa processes

RESOLVED FIXED in 1.4 S1 (14feb)


Firefox OS
4 years ago
4 years ago


(Reporter: fabrice, Assigned: fabrice)


1.4 S1 (14feb)
Gonk (Firefox OS)

Firefox Tracking Flags

(Not tracked)



(1 attachment)



4 years ago
i.e it's niced at 1. I don't know why we do that, but letting it running as a background process (hence niced at 18) seems to help a bit with app startup time.

Comment 1

4 years ago
Created attachment 8365712 [details] [diff] [review]

I also changed the FriendlyName implementation to display (Nuwa) instead of (Preallocated) when we turn on debugging in ProcessPriorityManager.cpp
Assignee: nobody → fabrice
Attachment #8365712 - Flags: review?(khuey)
Attachment #8365712 - Flags: review?(cyu)
Comment on attachment 8365712 [details] [diff] [review]

At first glance, I don't think letting the Nuwa process have background priority a good idea:

1. The Nuwa process doesn't do much work after it is ready: all threads other than the main and the IPC thread are frozen. It has not much to do other than receiving the fork request. Most of the time it is in sleep mode.

2. This makes it susceptible to fall victim to the lowmem killer. When it is killed, the processes forked from it will not share memory with the apps launched after that. Because we need to have the Nuwa process for app launching, we will fork the Nuwa process once it is killed (without delay) and compete for CPU time with the foreground app.

We actually do the opposite on the 128Mb device that we increase the priority of the Nuwa process to the same as the chrome process so that it will not be killed due to low memory.

Fabrice, what is the difference in app launch time you observed? If lowering the Nuwa process's priority does improve app launch time, we then need to look deeper and fix that.
Attachment #8365712 - Flags: review?(cyu) → review-
Flags: needinfo?(fabrice)
I agree with Cervantes.  This is the exact opposite of what we want to do in bug 952693.

Comment 4

4 years ago
yeah, you're right, I forgot about 952693.

The difference in app launch time difference was around 200ms but make perf-test is so noisy on my device that this may not be really relevant. I'll update the patch to just include the friendly name change.
Flags: needinfo?(fabrice)
Comment on attachment 8365712 [details] [diff] [review]

Review of attachment 8365712 [details] [diff] [review]:

r=me on the name bit
Attachment #8365712 - Flags: review?(khuey) → review+


4 years ago
Summary: The nuwa process is always running as a foreground process → Display the correct name for Nuwa processes
Last Resolved: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 1.4 S1 (14feb)
You need to log in before you can comment on or make changes to this bug.