SMB stuttering, how can I see actual network transfer speeds on LibreElec?

  • I'm trying to troubleshoot stuttering with SMB files. I'm thinking maybe, somehow, SMB networking is slow between Pi and server (because it's gigabit wire speed from my Linux machine to the Linux SMB server, and it's 100 mbits from my Linux machine to the Pi using scp) :cursing:

    As a test, I'm copying a large file from the SMB share onto LE's internal storage using the file explorer.

    But how can I see the actual transfer speed in real time? I tried `netstat -e` over ssh but it doesn't show that information. And I can't install any other Linux package because of LE's nature.

    My router doesn't show SMB traffic in its speed graphs for some reason.

  • in an terminal on one box for the iperf3-server run:

    iperf3 -s -p 5002

    in an terminal on the other box for the iperf3-client run:

    iperf3 -c <put the iperf3-server-IP-Address-here> -p 5002

    Normally, the test data is sent from the client to the server, and measures the UPLOAD speed of the client.

    Measuring the DOWNLOAD speed from the server can be done by specifying the -R flag on the client.

    iperf3 -c <put the iperf3-server-IP-Address-here> -p 5202 -R

    This causes data to be sent from the server to the client.

    note:

    you maybe need to install the iperf3 packages on your linux box and the "Network Tools"-Addon under LE

    Edited once, last by GDPR-7 (May 22, 2022 at 6:23 PM).

  • Thanks. LAN speeds and internet speeds are fine, they completely saturate the 100 mbit port on the Pi. The problem seems to be with SMB from the Pi, because SMB from my desktop client gets wire speed (gigabit). But SMB from the server to the Pi is what seems to be slow to a crawl, although I don't know how to actually measure it.

    I tried copying a file from the SMB share to the Pi's sd card, timing it, and then dividing by the amount of data transferred. I got 4 MiB/s which is very low, but I don't know how much of that is a function of the sd card's write speeds.

  • but I don't know how much of that is a function of the sd card's write speeds.

    cd to a folder of the sdcard and for

    write speed run:

    dd if=/dev/zero of=tempfile bs=1MB count=10240

    read speed run:

    dd if=tempfile of=/dev/zero bs=1MB count=10240

    if the values you get are under the sdcard spec's format the card with

    note:

    sdcards (and most usb sticks) do not have a TRIM function/command, so a from time-to-time long format (not quick !) or better a format with the above tool should improve the sdcards write values