[Live-devel] CPU usage is high when there are 64 concurrent sessions.

West Chen westchen at gvdigital.com
Wed Jul 10 18:52:10 PDT 2013


Hi,

I'm building an application to support RTSP over HTTP using live555, and I
ran into a situation that the CPU usage (1 core is completely used) is high
(25% or above).

Here are the information:
1. windows 7 x64, network 1Gbps, CPU i5 4 cores 2.8GHz, 8G RAM
2. building application with VS2010, application is x64, and I assign the
live555 thread to a specific core via windows API. Therefore I can observe
which thread is eating up the cpu usage.
3. Concurrent session: 64. (all different sources)
4. H264 video source received from my own camera.
5. I subclassed FramedSource to implement method doGetNextFrame and method
afterGetting, and  let the delay be 100us when try to call
scheduleDelayedTask. When there is a frame available, I copy the bitstream
into fTo, assign the fFrameSize according to fMaxSize, and then calculate
the fNumTruncatedBytes. If there are remaining bitstream of a frame, I
would store it for next doGetNextFrame call, so that all frames are not
truncated. Is this correct or related to my current situation?
6. I also subclassed OnDemandServerMediaSubsession to implement my own
method checkForAuxSDPLine.
7. If I reduce the concurrent session count to 32, the cpu usage is the
same as 64, but the thread of live555 can not handle more than 64 sessions.

If more information is needed, please let me know, thank you.
I'm kinda new to live555 and the mailing list, forgive my poor presentation
skill in Engilish.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.live555.com/pipermail/live-devel/attachments/20130711/3dc1714a/attachment.html>


More information about the live-devel mailing list