Bug 13579

Summary: Extremely high CPU usage when transmitting large signal messages
Product: Telepathy Reporter: Mike C. Fletcher <mcfletch>
Component: generalAssignee: Telepathy bugs list <telepathy-bugs>
Status: RESOLVED MOVED QA Contact: Telepathy bugs list <telepathy-bugs>
Severity: normal    
Priority: medium    
Version: unspecified   
Hardware: x86-64 (AMD64)   
OS: Linux (All)   
URL: http://www.vrplumber.com/olpc/Productive-1.xo
Whiteboard:
i915 platform: i915 features:

Description Mike C. Fletcher 2007-12-09 19:56:37 UTC
I have an OLPC-XO/Sugar activity which is written to use Telepathy to transmit messages between a server (one of the XOs) and the clients (2, one being the server as well).  To do this it does a state update every 1/2 second.

A state update (signal) signature looks like this:

'(a(i(ii)iiai)a(i(ii)iii)a(ibiidia(ii)ai)a(isiidiii))'

With the arrays containing (roughly, depending on the game size), 20 of the first array, 20*9 of the second, a couple of the third (theoretically could be up to of 20*9 in that array), and 2 in the fourth.  That is, around 1500 primitive objects, around 6 kilobytes of data per update with a resonably efficient encoding.

We're using a dbus tube object using an ExportedGObject.  The networking code is primarily defined at:

  http://dev.laptop.org/git?p=projects/productive;a=blob;f=Productive.activity/productive/networkserver.py;h=9b51d70959975cc117a5e5c7be6f8fd6ce8f4f68;hb=HEAD

When this activity is running on two sugar-jhbuild emulators on a dual-core AMD64 4800+ I'm seeing 97% of one CPU used by the telepathy-gabble process (as reported by top).  This seems extremely high to me and I would class it as a failure case.

To reproduce, install the .xo linked in the URL into Sugar on two machines (or one machine with two emulators).  Start the game on one machine, share it.  Click on the shared game on the other machine.  On the host, click start game.  Once the game starts, the CPU usage on the telepathy-gabble process climbs to 97% or so.

It could be this is a usage problem (I'm relatively new to telepathy).  If it is, please let me know so I can document the pitfall for other activity developers.
Comment 1 GitLab Migration User 2019-12-09 11:21:18 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/telepathy/telepathy-spec/issues/147.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.