View Full Version : Fc2 - Mtu

11th July 2004, 02:36 AM
I want to permanently change the MTU in my FC2 box to 1492. I can change it to 1492 manually by entering;

[root@localhost /]# ifconfig eth0 mtu 1492
[root@localhost /]# ifconfig eth0
eth0 Link encap:Ethernet HWaddr 00:50:BA:8F:4E:2B
inet addr: Bcast: Mask:
RX packets:275 errors:0 dropped:0 overruns:0 frame:0
TX packets:264 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:262592 (256.4 Kb) TX bytes:34240 (33.4 Kb)
Interrupt:10 Base address:0xb000
================================================== ========

If I reboot, MTU defaults back to 1500. How can I make FC2 keep 1492 MTU?

11th July 2004, 02:46 AM
i think you can add the line
to /etc/sysconfig/network-scripts/ifcfg-eth0

11th July 2004, 10:19 AM
i think you can add the line
to /etc/sysconfig/network-scripts/ifcfg-eth0 Wow, that was it, thanks! Now for one more, if you know the answer I am buying :). How to do the same for RWIN? (Receive Window Size).

Edit; My best guess is that you have to put the following in /etc/rc.d/rc.local -

echo 37752 > /proc/sys/net/core/rmem_default For example.

Reference - http://www.psc.edu/networking/perf_tune.html#HighPerf

Edit; No, that did not work at all. It changes the values permanently, but if I run the tweaktest at dslreports.com my RWIN is still 63360. Any other ideas?

11th July 2004, 01:24 PM
echo 37752 > /proc/sys/net/core/rmem_max
that should do it

11th July 2004, 02:06 PM
echo 37752 > /proc/sys/net/core/rmem_max
that should do itThanks, that did change the rmem_max value to 37752, but if I then go to dslreports.com and run their tweak test I get -

1. Your Tweakable Settings:
Receive Window (RWIN): 63360
Window Scaling: 0
Path MTU Discovery: ON
RFC1323 Window Scaling: ON
RFC1323 Time Stamping: ON
Selective Acks: ON
MSS requested: 1452
TTL: unknown
TTL remaining: 55

2. Test 146000 byte download
Actual data bytes sent: 146000
Actual data packets: 102
Max packet sent (MTU): 1480
Max packet recd (MTU): 1480
Retransmitted data packets: 0
sacks you sent: 1
pushed data pkts: 8
data transmit time: 0.508 secs
our max idletime: 101.3 ms
transfer rate: 115047 bytes/sec
transfer rate: 920 kbits/sec
This is not a speed test!
transfer efficiency: 100%

There has to be something else...I did disable IPV6 and net-pf-10 in modprobe.conf a while back. I wonder if that has anything to do with it. Will post back.

11th July 2004, 02:11 PM
No difference with IPV6 enabled. Still not working.

11th July 2004, 04:16 PM
"The rwin is dynamically assigned in linux and there isn't much need to change it. The dslreports tweak tests are a bit misleading under linux in that it will nag you about the rwin when it is quite alright." -computx

12th July 2004, 01:05 AM
Thanks for that quote, I had read that before, but was hoping I could at least test a static value for RWIN, since I am certain (due to extensive testing over a year on the same connection on Winxp) that 37752 is the optimal value for my connection. Oh well, if anyone comes up with a way to do this I'd appreciate the information.

12th July 2004, 09:17 AM
here is what I do to all new installs: (You may want to adjust the values, but these work for me).

Add the following to /etc/sysctl.conf, and then run "sysctl -p"
# increase Linux TCP buffer limits
net.core.rmem_max = 8388608
net.core.wmem_max = 8388608
net.core.rmem_default = 65536
net.core.wmem_default = 65536

# increase Linux autotuning TCP buffer limits
net.ipv4.tcp_rmem = 4096 87380 8388608
net.ipv4.tcp_wmem = 4096 65536 8388608
net.ipv4.tcp_mem = 8388608 8388608 8388608

14th July 2004, 01:48 AM
duncan, thanks for the reply. I have not tried your settings yet, but I do have a question. How did you calculate these values...and how would I know what to adjust them to?

14th July 2004, 02:20 AM
I actually got them from IBM support to be used on an AS/400 when we started using apache. I also added them to RH7.3 and have always applied them to what ever linux distro/version I had installed. It has been a few years, but I think these represent settings that are as about as high as you would want to go, if you have enough ram. I use iperf and/or ttcp to run benchmarks between machines. I also do this after every boot:
# every reboot:
ifconfig eth0 txqueuelen 1000
ifconfig eth1 txqueuelen 1000
sysctl -w net.core.netdev_max_backlog=2500