2002-07-16 01:08:16

by zhengchuanbo

[permalink] [raw]
Subject: how to improve the throughput of linux network


we use linux as our router. i just tested the performance of the router with smartbits, and i found that the throughput of 64byte frame is only 25%, about 35kpps.
someone mentioned that the throughput of 64byte frame could reach 70kpps.so i wish i could improve the performance of our router,but i don't know how to do that.
i looked for some solution,and found some article mentioned the NAPI. it changed the driver to polling mode,so that the interrupt is no too much. but i could not find drivers for our router.(eepro100 card). has the polling mode driver been used in linux?
i think there should be some other methods to improve the performance.but what is the most efficient one?
thanks for help. please cc.

chuanbo zheng


2002-07-16 15:55:59

by Jason Lunz

[permalink] [raw]
Subject: Re: how to improve the throughput of linux network

[email protected] said:
> we use linux as our router. i just tested the performance of the
> router with smartbits, and i found that the throughput of 64byte frame
> is only 25%, about 35kpps.
>
> someone mentioned that the throughput of 64byte frame could reach
> 70kpps.so i wish i could improve the performance of our router,but i
> don't know how to do that.
>
> i looked for some solution, and found some article mentioned the NAPI.
> it changed the driver to polling mode,so that the interrupt is no too
> much. but i could not find drivers for our router.(eepro100 card).
> has the polling mode driver been used in linux?

I made NAPI core and driver patches for linux 2.4; they're at
http://gtf.org/lunz/linux/net/. There's an eepro100 driver there.

Please send me (and the linux netdev list) the results of any testing
you do.

Jason

2002-07-16 19:07:16

by Jason Lunz

[permalink] [raw]
Subject: Re: how to improve the throughput of linux network

On Tue, Jul 16, 2002 at 6:59PM +0200, Filip Sneppe (Yucom) wrote:
> Hey, that's funny. I downloaded NAPI patches from:
> ftp://robur.slu.se/pub/Linux/net-development/NAPI/

Yes, that's where the NAPI stuff originates. The core patch from that
site is what made it into 2.5, and I backported it to 2.4 from there.
There are no substantial differences between the three.

> How different are those patches from yours ? Did you just make
> sure they all applied cleanly ?

While the core is mostly a matter of changing patch offsets, the driver
patches are still a moving target. There are two different flavors of
the e1000 NAPI patch, for example. The most recent tulip patch from the
above FTP site is missing tulip_misc.c, so it must be replaced with a
version from another patch. That file really is only code to report
stats in /proc, though. There's yet another napified tulip driver that
jamal posted a link to; I have yet to investigate that one.

But to answer your question, yes. I just found the most recent versions
of various napi efforts and made them apply to a recent 2.4 kernel so
people can easily try out the new net core.

Jason

2002-07-17 14:36:57

by zhengchuanbo

[permalink] [raw]
Subject: Re: Re: how to improve the throughput of linux network


>On Tue, 2002-07-16 at 03:13, zhengchuanbo wrote:
>>
>> we use linux as our router. i just tested the performance of the router with smartbits, and i found that the throughput of 64byte
>> i looked for some solution,and found some article mentioned the NAPI. it changed the driver to polling mode,so that the interrupt is no too much. but i could not find drivers for our router.(eepro100 card). has the polling mode driver been used in linux?

>Try this url:
>
>ftp://robur.slu.se/pub/Linux/net-development/NAPI/
>
>Also check out 2.5 kernels - they alreacdy have NAPI, there's is at
>least some documentation under linux/Documentation/
>
>Could you put some numbers online after your tests ?
>I already have this page, I don't have a Smartbits, though :-):
>
>http://www.filip.sneppe.yucom.be/linux/netfilter/performance/benchmarks.htm
>
>Regards,
>Filip

i got the patch for NAPI,and patched it on linux2.4.18. it worked. the throughput of 128bytes frame improve from 60% to more than 90%. it seems that it has no influnce to frames bigger than 256.

but there is still some problem. when i tested the throught of 64bytes frame,some error occured. in the begining it works well. but after several times of try the linux router can not receive any packets at all.(i found that by run ifconfig when the smartbits is testing). for the other frames it worked very well.

so what's wrong with my test? is there some problem with the patch?

regards,
chuanbo zheng


2002-07-17 16:27:02

by Jason Lunz

[permalink] [raw]
Subject: Re: how to improve the throughput of linux network

In gmane.linux.kernel, you wrote:
> i got the patch for NAPI,and patched it on linux2.4.18. it worked. the
> throughput of 128bytes frame improve from 60% to more than 90%. it
> seems that it has no influnce to frames bigger than 256.
>
> but there is still some problem. when i tested the throught of 64bytes
> frame,some error occured. in the begining it works well. but after
> several times of try the linux router can not receive any packets at
> all.(i found that by run ifconfig when the smartbits is testing). for
> the other frames it worked very well.
>
> so what's wrong with my test? is there some problem with the patch?

Quite possibly. Are you still using the eepro100 NAPI driver? I doubt
that it's gotten wide testing.

The patch at http://gtf.org/lunz/linux/net/ comes from here:
ftp://robur.slu.se/pub/Linux/net-development/NAPI/eepro100/eepro100-napi-020619.tar.gz

The NAPI conversion was done by [email protected] (see the README); you
may want to ask him about problems you're having.

--
Jason Lunz Reflex Security
[email protected] http://www.reflexsecurity.com/