scp and large MTUs

From: Stuart Mills (smills@computing.dundee.ac.uk)
Date: 12/20/02


From: "Stuart Mills" <smills@computing.dundee.ac.uk>
Date: Fri, 20 Dec 2002 14:27:43 -0000

Hi, I recently developed a network driver for a device which uses a large
MTU (21836 bytes), for use with Linux 7.2 (kernel version 2.4.7-10).
Performance is excellent, except when using scp to transfer a large file (26
MBytes).

Transfers of the form:
    scp <source computer>:<source file> <destination file>
work with transfer times comparable to Ethernet (as expected).

However, transfers like:
    scp <source file> <destination computer>:<destination file>
take three times as long.

Dropping the MTU to between 1500 and 5000 gives times comparable to
Ethernet. I've had a look through the code for scp and can see nothing to
indicate why his should be the case. I believe that writes are done 2048
bytes at a time, while reads are done in 4096 byte packets. Writing test
code to perform similar transfers does not produce these odd results. I'm
certain this is not a bug in my driver, as it has been used for a number of
tasks over the past few months, with only scp demonstrating these strange
results.

Can anyone suggest what might be causing this? Any pointers would be
appreciated.

TIA,

    Stuart Mills



Relevant Pages

  • Re: CARP and em0 timeout watchdog
    ... size and just scp testfile* to the other box). ... connect to 192.168.0.19 using ftp where ftp ... only slightly related to CPU speed on reasonably modern CPUs. ... Transfers over the LAN should not be impacted by this. ...
    (freebsd-stable)
  • Re: High CPU - kjournald & kblockd - nice level
    ... > transfers. ... If I copy a file from one file system to another or if I scp ... I have hurt no one. ...
    (Fedora)
  • SFTP vs. SCP and transfer rates
    ... use both sftp and scp on FreeBSD systems constantly, ... If I sftp into a server and get a file, it usually transfers at about ... really designed to run at a much slower rate than is available on many ...
    (freebsd-questions)
  • Re: problems with large files
    ... >> File transfers (email and scp) from A to B are fine, ... Each machine running ... transfers in either direction to A. I am unreachable from B, ... Pentium with 128MB of ram. ...
    (comp.os.linux.networking)
  • Re: Linux 2.6.20-rc4
    ... I get kernel panics when doing large ethernet transfers. ... continuous scp transfers of some large files makes the kernel ... netfilter rules for ppp0, ...
    (Linux-Kernel)