Gabriele Svelto <[email protected]> writes: > On 16/11/2013 11:24, Andreas Gal wrote: >> Nice analysis. Idea 1 you might be onto something. Maybe NuWa >> rebalanced our memory equation here? > > Yes, it would be worth to re-evaluate our parameters for NUWA as the > current settings were tailored before it. In addition to that, those > parameters were also geared for 256MiB devices that had ~180MiB of > memory available to userspace. We have a bug (886278) for > re-evaluating them for devices with more memory. > > I had posted a proposal there to make those and other values > dynamically computed depending on the total amount of free memory but > didn't have time to follow-up on that: > > https://bugzilla.mozilla.org/show_bug.cgi?id=886278#c10 > > Maybe it's time that I prioritize this stuff. >
We are also considering to set lower adj value for the Nuwa process, even lower than foreground. It is supposed to get more responsive of switching Apps during low water level of memory by without relaunch Nuwa process. It is also more efficient of memory sharing among content processes since Nuwa was not killed, and new processes share pages with old ones. The bad side is the unique pages occupied by Nuwa can not be free for foreground although most pages of Nuwa are shared with exisiting content processes. And, we are also looking on how the b2g is on devices with even lower memory size (< 256MB). So, maybe we should do a series of evaluations for various configurations. I think these values are functions of factors not only device's memory size, but also the speed of CPU, and the number of CPU threads. I believe LKM give processes a chance to release memory before OOM. So, we should consider how fast the apps can be to run out of the memory, and how fast the b2g can be to free the memory. It depends on the speed of the CPU. So, if a device have 2GB of DRAM and 4 cores of 2GHz processors and very fast network, it maybe not a bad idea to trigger LKM when there is still 100MB of free memory. This is very complicated, not easy to model it with a perfect function. Maybe, we should do some test for various configurations, and give some recommended values, and left this to vendors to decide and fine tuning these values. -- Sinker -- 天教懶漫帶疏狂 _______________________________________________ dev-b2g mailing list [email protected] https://lists.mozilla.org/listinfo/dev-b2g
