On Sat, Dec 5, 2009 at 4:28 AM, Ted Merrill <voice at embuildsw.com> wrote: > Thanks, Mark > > This is for a project to add VoIP to a gateway box where the processor > spends a signficant amount of time in the linux kernel doing network > processing. I'm afraid that even with realtime priority, a user space > process will be preempted too much by the kernel. > You might want to start playing with the new (as of 2.6.30) TX ring feature of the linux kernel's packet_mmap facility (it's what pcap uses): http://wiki.ipxwarzone.com/index.php5?title=Linux_packet_mmap You'd have to write your own UDP/IP stack since you'd be dealing with raw ethernet frames. I've done this, and my speed tests show a huge improvement: from around 120k packets/sec (G.711 @ 20ms) to almost 600k, thanks to the reduction of context switching and a shorter pipeline to the network driver. Basically, BSD sockets are pretty inefficient. After heavily customising pjsip as well as the kernel to speed things up further, we can do over 8000 call legs on a single interface on fairly standard server hardware, although this is still limited by kernel processing. Hope that helps! -Mark -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20091205/bea8a071/attachment.html>