Network performance...
Either way, I have a local server that is running Centos that is basically a test bed and file server. My router practices load balancing, which is a real pain when transferring more than large files.
The question: Would there be any benefit for me to run two NIC's in the machine, for instance one NIC for incoming data and one NIC for outgoing data?
7 Replies
Linode
However, I don't understand the question. You have a local server - so what load balancing is your router performing and why is this a pain during large file transfers? Load balancing normally implies distributing inbound network traffic across two or more servers.
In all but the most exceptional circumstances, having multiple NICs in one machine connected to the same network segment is a waste of hardware.
My network is setup as follows, I have a cable modem connected to a 4 port router/switch. Connected to the switch I have 3 boxes, 2 of which are just normal computers that I work on everyday. The third is my testbed/samba file server. The load balancing that my router performs as I understand it is dividing all traffic by 4, uploads included. So if my way of thinking is right it's limited by a quarter before I even start transfering files backwards and forwards over the cable. There go, I figure if I have one nic for incoming data and one for outgoing data it'll be faster.
You can get routers that do QoS (quality of service)/shaping, but that only affects outoging packets which you have control over. You may want to give VOIP packets the highest priority or ftp the lowest priority.
You dont have fine-grained control over what packets are coming in. You may have n inward TCP connections open but you are not guaranteed of 1/n bandwidth for each.
You cant try
limiting inward bandwidth at the application level eg the –limit-rate= option of wget
build your own router with shaping eg
http://www.opalsoft.net/qos/DS.htm or better stillwww.openbsd.org andhttp://www.openbsd.org/faq/pf/index.html increasing tcp buffers to reduce latency; heres what I do
echo 262144 > /proc/sys/net/core/wmem_max
echo 262144 > /proc/sys/net/core/rmem_max
echo 1 > /proc/sys/net/ipv4/tcp_timestamps
echo 1 > /proc/sys/net/ipv4/tcpwindowscaling
echo 1 > /proc/sys/net/ipv4/tcp_sack
echo 8388608 > /proc/sys/net/core/wmem_max
echo 8388608 > /proc/sys/net/core/rmem_max
echo "4096 87380 4194304" > /proc/sys/net/ipv4/tcp_rmem
echo "4096 65536 4194304" > /proc/sys/net/ipv4/tcp_wmem
echo 65536 > /proc/sys/net/core/rmem_default
echo 65536 > /proc/sys/net/core/wmem_default
ifconfig eth0 txqueuelen 1000
Since now I have a grasp on the whole Unix thing, to an extent, I've decided to implement it on a wider basis. See, I am what you'd call a Windows junky, it's quick and easy. Until recently I've held nothing but contempt for Unix (pure ignorance based on no expirience with it).
I also plan to upgrade my current box and make it my router as one of you suggested. I've had so much trouble with my Netgear router, the firewall setup is pathetic. I also intend to upgrade my VoIP system here soon and my router refuses to play nicely with my phone system so Asterisk here I come.
Once again, thanks for all your input and you're all much more helpful than Windows people…LOL