This is my first time setting up a Raspberry Pi4 (8GB). Before, I have used a RPi 3B for some other things. From what i have read is, that IO performance should be a lot better on the RPi4, as with the RPi3B. But i get the same speeds as before. I have setup the following:

  • Installed Raspbian Lite (64bit)
  • enabled SFTP/SSH
  • Setup a user for SFTP only access, with home on a connected USB HDD
  • the USB HDD is connected to one of the USB3 ports
  • This is the same setup on the RPi3B

When I now try to start to copy a 2GB file from my Laptop via LAN, i get in both cases a max of 11.6 or 11,5MB/s. But according to articles like this (https://www.jeffgeerling.com/blog/2021/raspberry-pi-25-gbps-16-tb-omv-nas-setup-and-performance), it should be much faster. Is there some secret, or whats the problem?

BTW: The Laptop runs on Manjaro Linux, where i start the transfer, there is no Windows available.

  • paddytokey@sh.itjust.works
    link
    fedilink
    arrow-up
    7
    ·
    1 year ago

    From the speed you mention this looks a lot like 100mbit, is there perhaps any device in the chain that only has a 100mb lan port? The pi should have gigabit

    • sudo_su@feddit.deOP
      link
      fedilink
      arrow-up
      2
      ·
      1 year ago

      Not really. There is only a Switch with GBit and standard FritzBox 7590 as a Router. The Switch is connected to the Router on the WAN Port as it should be (if i remember right) and the RPi4 to one of the Switch ports. The Laptop is directly connected to the router. The cable is a standard GBit cable. There should be nothing with 100MBit.

      • 0x4E4F@lemmy.fmhy.ml
        link
        fedilink
        arrow-up
        4
        ·
        1 year ago

        The switch should be connected to the router on the out ports (1 to 4, any of them). Then you connect the devices to the switch.

        Check your connnection types, something is using Fast Ethernet instead of Gigabit.

        • sudo_su@feddit.deOP
          link
          fedilink
          arrow-up
          4
          ·
          1 year ago

          Alles gut :-) Das Problem ist gelöst. Die Dachdecker haben das LAN Kabel beschädigt. Werd mal ein Neues am Montag ordern. Ich hasse es nur, das Kabel zu verlegen. Das liegt teilweise unter dem Laminat im Flur, was ich mühsam verlegt habe. Was solls, da muss ich wohl durch.

  • Waldhuette@lemmy.world
    link
    fedilink
    arrow-up
    3
    ·
    1 year ago

    That file that you are reading is it stored sequential on that HDD ? Might be that your HDD is the limiting factor here. Either the HDD itself or the cable used to connect to USB.

  • marv99@feddit.de
    link
    fedilink
    English
    arrow-up
    2
    ·
    edit-2
    1 year ago

    Maybe you want to test the performance of your HDD first. My suggestion is to connect HDD to your Laptop and Raspi and perform the following tests to get a first picture. In following commands replace /dev/sda with your actual device.

    Test with cache: sudo hdparm -tT /dev/sda

    Test without cache: sudo hdparm -tT --direct /dev/sda

    Taken from here [German]

  • marv99@feddit.de
    link
    fedilink
    arrow-up
    1
    ·
    1 year ago

    Maybe you want to test the performance of your HDD first. My suggestion is to connect your HDD to your Laptop and perform the following tests and then do the same for the Raspi. So you can get a first picture about the speed and a comparison between Laptop and Raspi. In the following commands, please replace /dev/sda with your actual device.

    Test with cache: sudo hdparm -tT /dev/sda

    Test without cache: sudo hdparm -tT --direct /dev/sda

    Taken from here [German]

    (sorry have accidentely deleted my post)

    • sudo_su@feddit.deOP
      link
      fedilink
      arrow-up
      3
      ·
      edit-2
      1 year ago

      The speed looks fine for me on the Laptop itself:

      /dev/sda:
       Timing cached reads:   28080 MB in  1.98 seconds = 14161.28 MB/sec
       Timing buffered disk reads: 448 MB in  3.02 seconds = 148.55 MB/sec
      
       /dev/sda:
       Timing O_DIRECT cached reads:   604 MB in  2.00 seconds = 301.42 MB/sec
       Timing O_DIRECT disk reads: 454 MB in  3.02 seconds = 150.36 MB/sec
      

      On the Pi itself i get:

      /dev/sda:
       Timing cached reads:   1974 MB in  2.00 seconds = 988.54 MB/sec
       Timing buffered disk reads: 196 MB in  3.02 seconds =  64.91 MB/sec
      
      /dev/sda:
       Timing O_DIRECT cached reads:   122 MB in  2.01 seconds =  60.64 MB/sec
       Timing O_DIRECT disk reads: 194 MB in  3.03 seconds =  64.03 MB/sec
      

      This also much above the speed, i got, when i transfer files via SFTP/SCP.

      I have tested also iperf and got: 0.0000-10.2100 sec 113 MBytes 93.1 Mbits/sec

      It seems like this is really somewhere limiting to 100MBit.

      • sudo_su@feddit.deOP
        link
        fedilink
        arrow-up
        4
        ·
        1 year ago

        It seems the limiting factor is the switch or cable. If i connect the Rpi to the router directly, i get: 0.0000-10.1222 sec 281 MBytes 233 Mbits/sec

        • sudo_su@feddit.deOP
          link
          fedilink
          arrow-up
          3
          ·
          1 year ago

          Its the cable. After changing the cable between the Switch and the Router, i got iperf test up to: 0.0000-10.0416 sec 1.09 GBytes 932 Mbits/sec.

          We had some workmen in the house a few weeks ago. Apparently, they damaged the cable. The test cable was unfortunately too short for permanent use, but it was enough for testing. I now get an upload of 65MB/sec on an average. This is about the same as the limit I had already determined through hdparm on the RPi4. I don’t know, why hdparm is faster directly on the laptop, maybe the USB Controller is not the best on the RPi4. But anything is better than 11MB/sec.

          The situation is different when the laptop is only connected to the network via WiFi. Here I get a maximum of 28MB/sec. I have not yet found a solution how this could be faster.

          • letmesleep@feddit.de
            link
            fedilink
            arrow-up
            1
            ·
            edit-2
            1 year ago

            Is it a permanent cable in the walls? In that case you probably want to check the wall sockets first. The internal connection between socket and cable is rather flimsy and the most likely point of failure. You can get a punch down/ LSA tool for under ten bucks and try to fix it. I also recommend a device for testing the lines. Those start around ten bucks and show you exactly which line is broken.

            For wifi: well, the new standards are a lot faster and external wifi 6/ 802.11.ax adapters start at about 30 bucks by now. Internal ones (e.g. intel AX210) are half that and can typically be replaced in laptops (keep in mind that you need the right antennas, you won’t get good results for 6GHz without an 6GHz antenna). And generally internal antennas aren’t as good as having an adapter with external ones.