[Live-devel] Do the test applications ever sleep?

Ross Finlayson finlayson at live555.com
Fri Aug 17 08:40:01 PDT 2012


> I have run performance monitoring, again mentioned in an earlier post and I know pretty well that the “OnDemandRTSPServer” is consuming about 7% of my CPU time when Idle (just ran the tests and the earlier figure I quoted was not accurate).

> My hope was to reduce this to an absolute minimum by changing to a true event driven server.

I don't understand this comment at all.  The server *is* a "true event driven" server.  All LIVE555 applications are event driven.

It's difficult to see how a 'null' task running every 10 ms (which is also an event, BTW) could be consuming 7% of your CPU.  However, if (and only if) you don't use any event triggers in your application, then I suggest that you - as an experiment - comment out the line
	schedulerTickTask(this); // ensures that we handle events frequently
on line 46 of "BasicUsageEnvironment/BasicTaskScheduler.cpp", recompile, and check how this affects your server's CPU time.  Please let me know.

If - even after commenting out that line - your server still consumes CPU when idle, then you have a problem somewhere in your system.  However, if your CPU time drops to zero when you comment out that line, then I'll add an (optional) parameter to "BasicTaskScheduler::createNew()" to allow you to disable the 'schedulerTickTask'.  (Note, though, that you could use this only if you *don't* use event triggers at all.)

Ross Finlayson
Live Networks, Inc.
http://www.live555.com/

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.live555.com/pipermail/live-devel/attachments/20120817/644701a4/attachment-0001.html>


More information about the live-devel mailing list