0

I have a Raspberry Pi 4 acting as a NAS which I connect directly to my computer through cat 5 cable from the Ethernet port on the Rpi4. I have set up a file-server using SFTP and that has worked well, Unfortunately, I'm only getting 100Mbit speeds from my NAS. I usually top out around 11MB/s on file transfers. How do I access the full speed of the Gigabit Ethernet port? Everything else is fine with the way I have it set up. Is there a limit with SFTP that stops the port from utilizing its full speed?

I ran ethtool and it looks like I am configured for full speed Ethernet, but my transfers are only at 100Mb speeds.

Here's the output from ethtool:

    Supported ports: [ TP MII ]
    Supported link modes:   10baseT/Half 10baseT/Full 
                            100baseT/Half 100baseT/Full 
                            1000baseT/Half 1000baseT/Full 
    Supported pause frame use: Symmetric Receive-only
    Supports auto-negotiation: Yes
    Supported FEC modes: Not reported
    Advertised link modes:  10baseT/Half 10baseT/Full 
                            100baseT/Half 100baseT/Full 
                            1000baseT/Half 1000baseT/Full 
    Advertised pause frame use: Symmetric Receive-only
    Advertised auto-negotiation: Yes
    Advertised FEC modes: Not reported
    Link partner advertised link modes:  10baseT/Half 10baseT/Full 
                                         100baseT/Half 100baseT/Full 
                                         1000baseT/Full 
    Link partner advertised pause frame use: Symmetric Receive-only
    Link partner advertised auto-negotiation: Yes
    Link partner advertised FEC modes: Not reported
    Speed: 1000Mb/s
    Duplex: Full
    Port: MII
    PHYAD: 1
    Transceiver: internal
    Auto-negotiation: on
    Supports Wake-on: gsf
    Wake-on: d
        SecureOn password: 00:00:00:00:00:00
    Current message level: 0x00000007 (7)
                   drv probe link
    Link detected: yes
4
  • How is the NAS formatted?
    – Milliways
    Feb 11 at 3:40
  • The NAS is formatted as 4x 4TB mechanical drives with the NTFS filesystem. When I plug it into my computer via USB3, I get speeds of around 25-30MB/s which seems to be the maximum of the USB bus. Feb 11 at 4:00
  • I've closed this question as a duplicate because you have not distinguished between the local IO bottleneck (read speed from storage) and the network IO bottleneck. If you find that the internet speed is an issue regardless of the source (eg. from the ext4 root fs on the SD card, which should read faster than 11 MB/s), then you have isolated a different issue, this can be edited to reflect that and re-opened.
    – goldilocks
    Feb 11 at 14:46
  • Check if big_writes option helps you. Feb 11 at 15:49
1

The Ethernet IS working at full speed.

That doesn't mean you will get anything like that from the file system which is limited by the CPU and transfer rate of the USB port.

NTFS performs poorly on the Pi (indeed on Linux). The driver runs in userspace.

Use ext4 which will be several times faster (and more reliable as it supports journaling).

2
  • I have watched videos of other people get around 240Mb/s from what is essentially the same setup. 11MB/s is a third of the speed of the USB 3 bus and, as far as I'm aware, the CPU shouldn't have problems transferring at faster speeds. Feb 11 at 4:00
  • Unfortunately, I need to keep the drives in a Windows compatible filesystem, as I regularly connect the drives to my Windows machine through USB. I'd also have to transfer all the data to other drives to format the file-system. I don't have enough money to buy another 16TB of drives at the moment as the drives are mostly full. It's also one of the reasons I haven't put the drives into a RAID configuration. Feb 11 at 6:12
1

NTFS is slower on any Linux machine than a native Linux filesystem. I found slow transfer speeds when I added a 2 TB USB3 drive to my Raspberry Pi 4 to use it as a NAS. I backed up the data, formatted the drive as ext4 and replaced the data. I could now get 100 MB/S read and write. I have since added a 3 TB USB3 drive, with similar performance. I suggest that you only need 1 x 4 TB drive if you convert the NAS drives to ext4 one at a time. If you are worried about losing access to your data, you could get another Raspberry Pi for a spare with an up to date copy of your NAS Pi SD card. Before long, you will be able to mount ext4 drives in Windows 10. You can already in Insider Build 20211 and later. See the link below.

Access Linux filesystems in Windows and WSL 2

Not the answer you're looking for? Browse other questions tagged or ask your own question.