[libnice] receiving data consumes 100% cpu on initiator peer

Philip Withnall philip at tecnocode.co.uk
Tue Nov 4 03:52:30 PST 2014


On Tue, 2014-11-04 at 12:30 +0100, Klaus Kranz wrote:

> I just found that during data communication using pseudotcp the
> „initiator“ peer consumes 99-100% CPU using
> nice_agent_recv_nonblocking(). 
> Varying the poll frequency which was adjusted to approx 100ms doesn’t
> change it. Commenting out the call made it visible that the load is
> consumed somewhere under the hood inside libnice.
> Added a usleep(1msec ) in component_io_cb()  released the cpu form its
> pain, but made the communication very unstable and or slow.
> Does someone have an idea what’s going wrong here ?

It’s hard to know what’s happening without some kind of trace or logging
data, but this sounds like it should be easy to fix.

Can you run your test under callgrind and send me the logs please?
        G_MESSAGES_DEBUG=all NICE_DEBUG=all valgrind --tool=callgrind
        --callgrind-out-file=callgrind.log /path/to/test/program &>

That should result in callgrind.log and libnice.log.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 213 bytes
Desc: This is a digitally signed message part
URL: <http://lists.freedesktop.org/archives/nice/attachments/20141104/e16f4eed/attachment.sig>

More information about the nice mailing list