Networking Forums

Networking Forums > Computer Networking > Linux Networking > Tuning net parameters for sending a maximum number of UDP packets

Reply
Thread Tools Display Modes

Tuning net parameters for sending a maximum number of UDP packets

 
 
ianbrn@gmail.com
Guest
Posts: n/a

 
      10-11-2006, 03:59 PM
Hello,

I am trying to send a large number of UDP packets through one nick.
Each packet is smaller than 200 byes.
I am working with a gigabit ethernet on a LAN.

I am testing it with x86_64 intel processor and with Intel e1000 nic.
The nic works with coalescent interrupts, aka NAPI.
I tried to send about 50,000 packets and I see that there is a loss
of about 5%-10%.
I want to be able to send more than 50,000 packets,
to tune the machine and be able to squeeze resources and send as much
as possible.
I had looked for linux networking tunables which will allow me
to be able to send more packets.
I tried to set /proc/sys/net/core/netdev_max_backlog to 5000
and more, and txqueuelen of the nic (you can see it in
ifconfig) to 5000 or more. Still I have these results
of 5%-10% loss when sending 50000 packets.

Are there more tunables/techniques which I consider ?

Any help will be appreciated.

Regards,
Ian

 
Reply With Quote
 
 
 
 
ipnwsec
Guest
Posts: n/a

 
      10-11-2006, 05:39 PM
Hi,

Please follow some steps mentioned below , these steps might include
TCP tuning also, but it doesnot matter because u r sending UDP Traffic
only.


The Steps
Make sure that you have root privleges.


Type: sysctl -p | grep mem
This will display your current buffer settings. Save These! You may
want to roll-back these changes


Type: sysctl -w net.core.rmem_max=8388608
This sets the max OS receive buffer size for all types of connections.


Type: sysctl -w net.core.wmem_max=8388608
This sets the max OS send buffer size for all types of connections.


Type: sysctl -w net.core.rmem_default=65536
This sets the default OS receive buffer size for all types of
connections.


Type: sysctl -w net.core.wmem_default=65536
This sets the default OS send buffer size for all types of connections.


Type: sysctl -w net.ipv4.tcp_mem='8388608 8388608 8388608'
TCP Autotuning setting. "The tcp_mem variable defines how the TCP stack
should behave when it comes to memory usage. ... The first value
specified in the tcp_mem variable tells the kernel the low threshold.
Below this point, the TCP stack do not bother at all about putting any
pressure on the memory usage by different TCP sockets. ... The second
value tells the kernel at which point to start pressuring memory usage
down. ... The final value tells the kernel how many memory pages it may
use maximally. If this value is reached, TCP streams and packets start
getting dropped until we reach a lower memory usage again. This value
includes all TCP sockets currently in use."


Type: sysctl -w net.ipv4.tcp_rmem='4096 87380 8388608'
TCP Autotuning setting. "The first value tells the kernel the minimum
receive buffer for each TCP connection, and this buffer is always
allocated to a TCP socket, even under high pressure on the system. ...
The second value specified tells the kernel the default receive buffer
allocated for each TCP socket. This value overrides the
/proc/sys/net/core/rmem_default value used by other protocols. ... The
third and last value specified in this variable specifies the maximum
receive buffer that can be allocated for a TCP socket."


Type: sysctl -w net.ipv4.tcp_wmem='4096 65536 8388608'
TCP Autotuning setting. "This variable takes 3 different values which
holds information on how much TCP sendbuffer memory space each TCP
socket has to use. Every TCP socket has this much buffer space to use
before the buffer is filled up. Each of the three values are used under
different conditions. ... The first value in this variable tells the
minimum TCP send buffer space available for a single TCP socket. ...
The second value in the variable tells us the default buffer space
allowed for a single TCP socket to use. ... The third value tells the
kernel the maximum TCP send buffer space."


Type:sysctl -w net.ipv4.route.flush=1
This will enusre that immediatly subsequent connections use these
values.

please let me know if u have any more questions.

Thanks,
Sunil
http://geocities.com/sunil3112000




(E-Mail Removed) wrote:
> Hello,
>
> I am trying to send a large number of UDP packets through one nick.
> Each packet is smaller than 200 byes.
> I am working with a gigabit ethernet on a LAN.
>
> I am testing it with x86_64 intel processor and with Intel e1000 nic.
> The nic works with coalescent interrupts, aka NAPI.
> I tried to send about 50,000 packets and I see that there is a loss
> of about 5%-10%.
> I want to be able to send more than 50,000 packets,
> to tune the machine and be able to squeeze resources and send as much
> as possible.
> I had looked for linux networking tunables which will allow me
> to be able to send more packets.
> I tried to set /proc/sys/net/core/netdev_max_backlog to 5000
> and more, and txqueuelen of the nic (you can see it in
> ifconfig) to 5000 or more. Still I have these results
> of 5%-10% loss when sending 50000 packets.
>
> Are there more tunables/techniques which I consider ?
>
> Any help will be appreciated.
>
> Regards,
> Ian


 
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
REQ: advice on tuning via-velocity parameters Brian Hall Linux Networking 0 01-10-2007 10:19 PM
performance tuning on the TCP and network parameters of W2k and W2 Prashant Sharma Windows Networking 1 01-31-2006 04:28 AM
TCP congestion stats + performance tuning parameters vishal...@gmail.com Linux Networking 3 12-14-2005 10:24 PM
NIC Tuning Parameters Dave Network Routers 0 07-29-2004 05:52 PM
NIC Tuning Parameters Dave Linux Networking 0 07-29-2004 05:52 PM



1 2 3 4 5 6 7 8 9 10 11