In Samba, the option that is directly related with the MTU and window size is
max
xmit
. This option sets the largest block of data Samba will try to write at any one time. It's sometimes known as the
write size, although that is not the name of the Samba configuration option.
Because the percentage of each block required for overhead falls as the blocks get larger, max xmit is conventionally set as large as possible. It defaults to the protocol's upper limit, which is 64 kilobytes. The smallest value that doesn't cause significant slowdowns is 2048. If it is set low enough, it will limit the largest packet size that Samba will be able to negotiate. This can be used to simulate a small MTU if you need to test an unreliable network connection. However, such a test should not be used in production for reducing the effective MTU.