Video servers play a major role in video on demand systems and form one of the critical components of the system, hence improving the
perfomace of the server is ultimately the improvement for the entire system.
In the project the I/O performance of the video servers is focused on live555 Media server.
Live555 Server : http://www.live555.com/mediaServer/
Gap Analysis
In order to solve multiple data copy issue, the linux kernel (2.6 and above) provides “sendfile” system call to implement “zero copy method” over TCP sockets. The media streaming servers like “live 555” uses “read” and “write” system calls to perform the data transfer from disk to socket buffer. So, we have planned to make the following changes:
• Write a system call sendfile_UDP() equivalent to sendfile which can work for UDP sockets over a RTP connection.
• Make use of sendfile_UDP() call to perform read operation on the “Live 555” media server.
Existing System
- Multiple copy operations takes place internally in the system.
- They are as follows…
- Hard drive to the kernel buffer (DMA copy)
- Kernel buffer to the user buffer(CPU copy)
- User buffer to the socket buffer(CPU copy)
- Socket buffer to protocol engine(DMA copy)
- This is further worst for the Video/Streaming data.
- Though the network infrastructures support high speed data transfer rate, the utilization and smart use of the same is limited by the above process over heads.
Sendto() + read() vs Sendfile()
Advantages of Using the sendfile() system call
- Implemented Using Zero-Copy Method
- Better CPU Utilization
Integration of Sendfile() into the live555 server
Various classes were identified and modified to support sendfile() in the media server.
-
Groupsock
-
GroupsockHelper
-
RTPInterface
-
RTPSink
-
MultiFramedRTPSink
- Socket
Deliverables
Demo of working Live 555 media server implemented using Zero Copy method with help of senfile_UDP() system call for MP3 media streaming.
To download,click here