Bruno Hertz
2005-Jan-17 13:49 UTC
[Asterisk-Users] Offtopic: improving softphone latency on Linux?
Hi folks last weekend, I tried Windows Messenger first time and was stunned by the little latency it gives. Until now, I've been using softphones on Linux exclusively, like iaxcomm, linphone and sjphone, and they all give me about 1, at times even 2 secs delay. Whereas Messenger really seems to be in the millisec range. Of course, I'm now curious why there is that difference. Clearly, Messenger is more tightly integrated with the OS and accordingly tuned. So where does this time go? Kernel? Application level? Web searches seem to suggest that sound latency generally is a problem on Linux, so I tried the low latency kernel from http://ccrma.stanford.edu/planetccrma/software/planetccrma.html (there are two kernels, actually, where I only got the stable version to boot - bleeding edge didn't do on my machine). Still, that kernel did not really improve things in a noticeable way. Question hence: did some of you guys experience and investigate this same issue? Any recommendations or hints how to make VoIP even more enjoyable on linux? I wouldn't care that much if I was the only affected party, but of course whomever I call will also suffer from those delays, so as the staunch Linux advocate I've been so far I'd really like to show better performance ... Thanks, Bruno.
Steve Kann
2005-Jan-17 14:51 UTC
[Asterisk-Users] Offtopic: improving softphone latency on Linux?
Bruno Hertz wrote:>Hi folks > >last weekend, I tried Windows Messenger first time and was stunned by >the little latency it gives. Until now, I've been using softphones on >Linux exclusively, like iaxcomm, linphone and sjphone, and they all give >me about 1, at times even 2 secs delay. Whereas Messenger really seems >to be in the millisec range. > >Of course, I'm now curious why there is that difference. Clearly, >Messenger is more tightly integrated with the OS and accordingly tuned. > >So where does this time go? Kernel? Application level? Web searches seem >to suggest that sound latency generally is a problem on Linux, so I >tried the low latency kernel from >http://ccrma.stanford.edu/planetccrma/software/planetccrma.html >(there are two kernels, actually, where I only got the stable version to >boot - bleeding edge didn't do on my machine). > >Still, that kernel did not really improve things in a noticeable way. > >Question hence: did some of you guys experience and investigate this >same issue? Any recommendations or hints how to make VoIP even more >enjoyable on linux? > > >What softphone are you using on Linux? If you use an iaxclient-based softphone on linux as root, it runs with RT priority, and pretty low latency -- it certainly is much less than 2 seconds, usually less than 100-200ms or so, depending on the network. There's certainly room to squeeze down the path through the library, but there's isn't that much latency in there.. -SteveK
Steve Underwood
2005-Jan-17 16:43 UTC
[Asterisk-Users] Offtopic: improving softphone latency on Linux?
Hi Bruno, Latencies that big should not be due to the softphone. They are often due to the sound card driver. The driver for the Yamaha sound chip in my Vaio, for example, has massive latency like you are seeing. There seems to be no way to configure that driver to stop it. With the good drivers you can configure the sound card's buffering - small buffers/low latency, or big buffers/high latency. The Yamaha driver accepts those commands, but it seems to have no effect on actual operation. You may find the latency is dramatically different if you try a different sound card or a different machine. Regards, Steve Bruno Hertz wrote:>Hi folks > >last weekend, I tried Windows Messenger first time and was stunned by >the little latency it gives. Until now, I've been using softphones on >Linux exclusively, like iaxcomm, linphone and sjphone, and they all give >me about 1, at times even 2 secs delay. Whereas Messenger really seems >to be in the millisec range. > >Of course, I'm now curious why there is that difference. Clearly, >Messenger is more tightly integrated with the OS and accordingly tuned. > >So where does this time go? Kernel? Application level? Web searches seem >to suggest that sound latency generally is a problem on Linux, so I >tried the low latency kernel from >http://ccrma.stanford.edu/planetccrma/software/planetccrma.html >(there are two kernels, actually, where I only got the stable version to >boot - bleeding edge didn't do on my machine). > >Still, that kernel did not really improve things in a noticeable way. > >Question hence: did some of you guys experience and investigate this >same issue? Any recommendations or hints how to make VoIP even more >enjoyable on linux? > >I wouldn't care that much if I was the only affected party, but of >course whomever I call will also suffer from those delays, so as the >staunch Linux advocate I've been so far I'd really like to show better >performance ... > >Thanks, Bruno. > >