[CentOS] Performance of CentOS as a NAT gateway

Mon Sep 10 20:35:59 UTC 2007
Ross S. W. Walker <rwalker at medallion.com>

Bart Schaefer wrote:
> 
> On 9/9/07, Barry Brimer <lists at brimer.org> wrote:
> > Maybe it is time for some kernel networking tuning.
> 
> After doing a bit of research:
> 
> http://www.acc.umu.se/~maswan/linux-netperf.txt
> http://wwwx.cs.unc.edu/~sparkst/howto/network_tuning.php
> http://proj.sunet.se/E2E/tcptune.html
> http://www.linuxguruz.com/iptables/howto/2.4routing-13.html
> http://www-didc.lbl.gov/TCP-tuning/linux.html
> 
> I ended up with this:
> 
> net.core.rmem_default = 873800
> net.core.wmem_default = 655360
> net.core.rmem_max = 8738000
> net.core.wmem_max = 6553600
> net.ipv4.tcp_rmem = 8192 873800 8738000
> net.ipv4.tcp_wmem = 4096 655360 6553600
> net.ipv4.tcp_mem = 195584 873800 8738000
> 
> (The first number in tcp_mem is the original default.)
> 
> Plus:
> 
> ifconfig eth0 txqueuelen 1000
> ifconfig eth1 txqueuelen 1000
> 
> Unfortunately so far this doesn't seem to have made any difference.
> We've had a load peak going since early this morning and the traffic
> looks exactly like it did last week.

The only way your going to know for absolute sure where the bottleneck
exists is to do a wireshark/tcpdump trace simultaneously on both sides.

Then with that information you will know where the bottleneck is and
armed with that you can start exploring why there is a bottleneck
there.

Off the top of my head, there could be a IP MTU mismatch somewhere and
with ICMP disabled this would cause a blackhole for some full packet
traffic.

-Ross

______________________________________________________________________
This e-mail, and any attachments thereto, is intended only for use by
the addressee(s) named herein and may contain legally privileged
and/or confidential information. If you are not the intended recipient
of this e-mail, you are hereby notified that any dissemination,
distribution or copying of this e-mail, and any attachments thereto,
is strictly prohibited. If you have received this e-mail in error,
please immediately notify the sender and permanently delete the
original and any copy or printout thereof.