mozilla / r2d2b2g

Firefox OS Simulator is a test environment for Firefox OS. Use it to test your apps in a Firefox OS-like environment that looks and feels like a mobile phone.
https://addons.mozilla.org/en-US/firefox/addon/firefox-os-simulator/
Other
393 stars 139 forks source link

cpu overload #521

Open gorghoa opened 11 years ago

gorghoa commented 11 years ago

Hi,

On ubuntu 13.04, firefox simulator seems to need a lot of cpu. I have an intel core i5.

I have always one of the 4 cpu cores taken by FFOS simulator. Is this a normal behavior ?

This power loss does not let me work in the train, as my battery get discharged too quickly!

Regards.

mykmelez commented 11 years ago

Hi @gorghoa, no, that isn't normal! And I see it too on my Ubuntu 12.10 64-bit VM:

myk@ubuntu:~$ while true; do ps -C b2g -o "%p %c %C" h; sleep 1; done
 4136 b2g             63.7
 4136 b2g             63.7
 4136 b2g             63.7
 4136 b2g             63.7
 4136 b2g             63.7

cc: @rpl & @ochameau, who might know what's going on and how to address it.

emilis commented 11 years ago

I can confirm this on an Ubuntu 12.10 64-bit laptop.

rpl commented 11 years ago

@mykmelez I'm on Ubuntu 13.04 64-bit, it presents the same behavior, and I see this log on every b2g start:

(process:1192): GLib-CRITICAL **: g_slice_set_config: assertion `sys_page_size == 0' failed

it seems to be already reported here:

and in the comments its behavior is reported as cpu intensive (or crash for some user), but it should happen only on glib >= 2.35 (and on my Ubuntu 13.04 I've glib 2.36)

rpl commented 11 years ago

@mykmelez I see the same error in the logs related to the Firefox instance started by "make run", but it doesn't present the same behavior, so I'm not sure if it could be really a symptom of the same issue reported on bugzilla 833117.

rpl commented 11 years ago

@mykmelez Another detail that could be important: one of the most active processes is a b2g's child named "(Preallocated app)"

gorghoa commented 11 years ago

Does somebody found a way to fix it ? I’m afraid that my c++ skills are not sufficient :/

ochameau commented 11 years ago

I've seen the same behavior with raw b2g desktop. So it is an issue in gaia or b2g platform code, but I don't know much more yet.

mykmelez commented 11 years ago

We've gotten a couple bad reviews on AMO because of this:

eats CPU on linux Rated 1 out of 5 stars by hadrons on July 17, 2013 · permalink The moment you start the Os simulator it starts eating all the CPU. I 'm running it on Gentoo Linux stable. It needs more work..

Although this one doesn't mention the OS:

180% CPU in IDLE :-( Rated 3 out of 5 stars by MarcinEK on July 3, 2013 · permalink 180% CPU in IDLE :-(