[asterisk-dev] Re: Kernel modules => mainline kernel

Oron Peled oron at actcom.co.il
Tue Feb 13 01:00:48 MST 2007


On Monday, 12 בFebruary 2007 21:38, Matthew Fredrickson wrote:
> ...There have been a number of really good ideas suggested for improving
> zaptel performance (zero copy/mmap'd > data) that might involve breaking
> the current API.

If you look for performance, the first thing you'd look into is lowering
the interrupt rate from 1000/sec to 100/sec (or even lower). This is
the biggest bottleneck in zaptel. Zero copy doesn't buy that much
at the data volume we talk about.

Q: What is the data rate when you have 1000 active lines?
A: 1000 * 8bytes/msec * 2 = 16Kb/msec = 16Mb/sec
   How that compares to a single Fast ethernet?

Q: What is the interrupt rate in this situation?
A: Assume a favorable condition: All PRI with one interrupt
   per port (with analog lines we would need many more cards).

   Number of required cards =~ 1000 / 30 = 34 (assume we have such a PC ;-)
   Number of interrupts = 34 * 1000/sec = 34,000/sec (without counting
   the matching context switches on the transmit path).

Relating to the discussion that started this thread: If zaptel
development would be more integrated to the kernel mainline than
the previous analysis would be obvious.
There is no need to repeat the learning curve that was done by the
network driver folks years ago. One of the things we loose by not
being part of the kernel development process is the peer review
and the missed opportunities for learning and really imrove
zaptel -- this is a sad phenomena of NIH...

For anyone interested, during kernel 2.2 everybody were talking about
zero-copy. Then came the reality check. Zero copy only helped Gigabit
ethernet and above. However, the NAPI api that enabled drivers to
dynamically switch to polling instead of interrupt per-packet was a
major win for many 100Mb drivers (the results were applied to kernel 2.4).

[side note: zero-copy is back in fashion as 10Gb start to appear]

Cheers,

-- 
Oron Peled                             Voice/Fax: +972-4-8228492
oron at actcom.co.il                  http://www.actcom.co.il/~oron
ICQ UIN: 16527398

"Linux: like the air you breathe, ubiquitous and free"


More information about the asterisk-dev mailing list