There is no "optimal Maximum Transfer Unit" for all destinations.
On one path you may cross a link layer that is using cells of 500 while on others, frames of 1500 will not get fragmented.
It is dynamic. To resolve this, there is a protocol called Path MTU discovery.
Unfortunatly
P-MTUD is not really working everywhere . Sometimes people put their firewall to a paranoid level which result in poor network performance. It gets even more complex when you cross a vpn or a private adress space where NAT doesn't do its job of Nating icmp packets.
When I was on PPPoE I had set my MTU to 1400 and I had a very good network performance.
MTU is a per-path parameter. Its not even a per-destination one as packets can take different paths to reach the same destination.
There is a way of determining the MTU to one destination:
Code:
#ping -M do -s <icmp_packet_size> <server>
Start with icmp packet size from 1400 and go up using dichotomy. Until you find the optimal "path to <server> maximum transfer unit".
The MTU for this server is icmp_packet_size+header(ip)+header(icmp)=icmp_packet_size+28
You can configure it like this:
#this disable path mtu discovery
Code:
sysctl -w net.ipv4.ip_no_pmtu_disc=1
#this sets interface mtu
Code:
ifconfig eth0 blablah.. mtu 1400
A website which was interesting for improving performance (have not checked lately)
http://www.speedguide.net/
A reference guide with some ideas:
http://www.linux.com/howtos/Adv-Rout...iscovery.shtml