Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Slow Upload of Images using SCP #244

Open
scyto opened this issue Jan 5, 2025 · 10 comments
Open

Slow Upload of Images using SCP #244

scyto opened this issue Jan 5, 2025 · 10 comments

Comments

@scyto
Copy link

scyto commented Jan 5, 2025

I have a nanokvm pcie+poe+wifi

On Ethernet i get upload speeds of ~1.2MB/s

On 2.4gz WIFI5 i get 2.5MB/s

Of 5ghz WIFI6 (why do you make it so hard to join a pure wifi6 network, i needed to learn to use wpa_cli to figure it out) i also get 2.5MB/s even for a HT40 1x1 MIMO device this is incredibly slow and i am getting radio connection speeds in the 230 Mb/s range.

In all 3 scenarios i would expect to upload at 10MB/s not 2.5MB/s

HTOP showed i had memory and CPU to spare during the transfer

Are my expectations wrong?
If not what should i check

@archont94
Copy link

@scyto I would check transfer speed of files between different partitions on NanoKVM (to eliminate problems with SD card itself or i.e. high CPU usage) and later would check speed via RNDIS USB Ethernet connection. There are known issues with Ethernet on NanoKVM Cube, but my understanding is that they should not happen on PCIe version.

@scyto
Copy link
Author

scyto commented Jan 7, 2025

@archont94

I have the USB header on the nanokvm pcie connected to the motherboard header, copying files from client > host webui that lets me see the USB storage device was super fast, so defintely rules out SD card

I am not sure what you mean van RNDIS USB ethernet connection - how would i go about testing that?

I guess this means the same issue exists on the nanonkvm pcie for both ethernet and wifi

for reference, my version numbers:

Image Version
v1.3.0

Application Version
2.1.3

@archont94
Copy link

I am not sure what you mean van RNDIS USB ethernet connection - how would i go about testing that?

https://wiki.sipeed.com/hardware/en/kvm/NanoKVM/system/updating.html#Check-via-USB-RNDIS-Network-Interface

@scyto
Copy link
Author

scyto commented Jan 7, 2025

I am not sure what you mean van RNDIS USB ethernet connection - how would i go about testing that?

https://wiki.sipeed.com/hardware/en/kvm/NanoKVM/system/updating.html#Check-via-USB-RNDIS-Network-Interface

i already read that, it covers a windows device attached to the external USB port

the usb on my pice card at the back is non functional because the header on the card is connected to the linux host machine i am trying to control - there is no way to plug a windows machine into the card via USB and the linux host does seem to see a USB network device of any kind

does this mean i would need to disconnect the internal header and reconnect it to the backplate to test? given the speed of direct gadget access from linux host to the kvm i am pretty cetain i will see same speeds as its just usb with differentl applications protocol

seems like something is seriously broken in the nanonkvm ethernet/wifi stack tho....

@archont94
Copy link

archont94 commented Jan 7, 2025

If it's connected with HID USB to Linux machine it should be even easier, NanoKVM should create virtual USB network adapter there. Instructions covers it as well, read till the end. If it's not visible on your Linux host (check with lsusb and ip a), enable it in NanoKVM webui.

seems like something is seriously broken in the nanonkvm ethernet/wifi stack tho....

That's what I'm trying to help you troubleshoot - for me RNDIS was working perfectly fine, but the problem was with regular Ethernet connection (and it was confirmed by Sipeed that it's bad hardware design). But it was on Cube, not PCIe version.

@scyto
Copy link
Author

scyto commented Jan 7, 2025

already enable in the kvm, usb0 appears perfectly in the nanokvm shell

but shows as down

6: usb0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether ae:fa:b3:20:d2:8d brd ff:ff:ff:ff:ff:ff

on the linux host it uses a buildroot derived OS and lsusb doesn't return much useful

$ lsusb -v
Bus 003 Device 005: ID 1a86:8091
Bus 003 Device 001: ID 1d6b:0002
Bus 001 Device 001: ID 1d6b:0002
Bus 003 Device 004: ID 05e3:0610
Bus 003 Device 006: ID 3346:1009
Bus 003 Device 008: ID 0bda:8179
Bus 003 Device 009: ID 09eb:0131
Bus 004 Device 001: ID 1d6b:0003
Bus 004 Device 002: ID 174c:3074
Bus 003 Device 003: ID 1a86:8091
Bus 002 Device 001: ID 1d6b:0003
Bus 003 Device 007: ID 09ea:0130
Bus 003 Device 002: ID 174c:2074

it seems to see the mass storage device on USB 3-7, but not much else

$ dmesg | grep usb
[    0.629611] usbcore: registered new interface driver usbfs
[    0.629611] usbcore: registered new interface driver hub
[    0.629614] usbcore: registered new device driver usb
[    0.691593] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 6.06
[    0.691597] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    0.691598] usb usb1: Product: xHCI Host Controller
[    0.691599] usb usb1: Manufacturer: Linux 6.6.48 xhci-hcd
[    0.691600] usb usb1: SerialNumber: 0000:00:0d.0
[    0.691838] usb usb2: New USB device found, idVendor=1d6b, idProduct=0003, bcdDevice= 6.06
[    0.691839] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    0.691840] usb usb2: Product: xHCI Host Controller
[    0.691841] usb usb2: Manufacturer: Linux 6.6.48 xhci-hcd
[    0.691842] usb usb2: SerialNumber: 0000:00:0d.0
[    0.694278] usb usb3: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 6.06
[    0.694279] usb usb3: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    0.694280] usb usb3: Product: xHCI Host Controller
[    0.694281] usb usb3: Manufacturer: Linux 6.6.48 xhci-hcd
[    0.694282] usb usb3: SerialNumber: 0000:00:14.0
[    0.695952] usb usb4: New USB device found, idVendor=1d6b, idProduct=0003, bcdDevice= 6.06
[    0.695954] usb usb4: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    0.695955] usb usb4: Product: xHCI Host Controller
[    0.695956] usb usb4: Manufacturer: Linux 6.6.48 xhci-hcd
[    0.695957] usb usb4: SerialNumber: 0000:00:14.0
[    0.696441] usbcore: registered new interface driver usblp
[    0.696448] usbcore: registered new interface driver usb-storage
[    0.696458] usbcore: registered new interface driver usbserial_generic
[    0.696461] usbserial: USB Serial support registered for generic
[    0.700748] usbcore: registered new interface driver usbhid
[    0.700749] usbhid: USB HID core driver
[    0.934760] usb 3-3: new high-speed USB device number 2 using xhci_hcd
[    1.064204] usb 3-3: New USB device found, idVendor=174c, idProduct=2074, bcdDevice= 0.01
[    1.064232] usb 3-3: New USB device strings: Mfr=2, Product=3, SerialNumber=1
[    1.064246] usb 3-3: Product: AS2107
[    1.064254] usb 3-3: Manufacturer: ASMedia
[    1.064262] usb 3-3: SerialNumber: USB2.0 Hub
[    1.176969] usb 4-1: new SuperSpeed USB device number 2 using xhci_hcd
[    1.192590] usb 4-1: New USB device found, idVendor=174c, idProduct=3074, bcdDevice= 0.01
[    1.192618] usb 4-1: New USB device strings: Mfr=2, Product=3, SerialNumber=1
[    1.192629] usb 4-1: Product: AS2107
[    1.192638] usb 4-1: Manufacturer: ASMedia
[    1.192645] usb 4-1: SerialNumber: USB2.0 Hub
[    1.304740] usb 3-7: new high-speed USB device number 3 using xhci_hcd
[    1.432160] usb 3-7: New USB device found, idVendor=1a86, idProduct=8091, bcdDevice= 1.21
[    1.432187] usb 3-7: New USB device strings: Mfr=0, Product=2, SerialNumber=0
[    1.432200] usb 3-7: Product: USB HUB
[    1.513743] usb 3-3.1: new high-speed USB device number 4 using xhci_hcd
[    1.613822] usb 3-3.1: New USB device found, idVendor=05e3, idProduct=0610, bcdDevice=70.60
[    1.613842] usb 3-3.1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[    1.613851] usb 3-3.1: Product: USB2.1 Hub
[    1.613857] usb 3-3.1: Manufacturer: GenesysLogic
[    1.724750] usb 3-8: new high-speed USB device number 5 using xhci_hcd
[    1.851969] usb 3-8: New USB device found, idVendor=1a86, idProduct=8091, bcdDevice= 1.21
[    1.851996] usb 3-8: New USB device strings: Mfr=0, Product=2, SerialNumber=0
[    1.852009] usb 3-8: Product: USB HUB
[    1.915745] usb 3-7.2: new high-speed USB device number 6 using xhci_hcd
[    1.993262] usb 3-7.2: New USB device found, idVendor=3346, idProduct=1009, bcdDevice= 5.10
[    1.993290] usb 3-7.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[    1.993302] usb 3-7.2: Product: NanoKVM
[    1.993312] usb 3-7.2: Manufacturer: sipeed
[    1.993319] usb 3-7.2: SerialNumber: 0123456789ABCDEF
[    2.007441] input: sipeed NanoKVM as /devices/pci0000:00/0000:00:14.0/usb3/3-7/3-7.2/3-7.2:1.0/0003:3346:1009.0001/input/input4
[    2.059837] hid-generic 0003:3346:1009.0001: input,hidraw0: USB HID v1.01 Keyboard [sipeed NanoKVM] on usb-0000:00:14.0-7.2/input0
[    2.062248] input: sipeed NanoKVM as /devices/pci0000:00/0000:00:14.0/usb3/3-7/3-7.2/3-7.2:1.1/0003:3346:1009.0002/input/input5
[    2.062755] hid-generic 0003:3346:1009.0002: input,hidraw1: USB HID v1.01 Mouse [sipeed NanoKVM] on usb-0000:00:14.0-7.2/input1
[    2.064311] input: sipeed NanoKVM as /devices/pci0000:00/0000:00:14.0/usb3/3-7/3-7.2/3-7.2:1.2/0003:3346:1009.0003/input/input6
[    2.064649] hid-generic 0003:3346:1009.0003: input,hidraw2: USB HID v1.01 Mouse [sipeed NanoKVM] on usb-0000:00:14.0-7.2/input2
[    2.065057] usb-storage 3-7.2:1.3: USB Mass Storage device detected
[    2.066106] scsi host32: usb-storage 3-7.2:1.3
[    2.080743] usb 3-3.1.3: new full-speed USB device number 7 using xhci_hcd
[    2.189340] usb 3-3.1.3: New USB device found, idVendor=09ea, idProduct=0130, bcdDevice= 0.12
[    2.189368] usb 3-3.1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[    2.189381] usb 3-3.1.3: Product: Virtual HUB
[    2.189389] usb 3-3.1.3: Manufacturer: Generic
[    2.189396] usb 3-3.1.3: SerialNumber: 00000002
[    2.297747] usb 3-9: new high-speed USB device number 8 using xhci_hcd
[    2.426482] usb 3-9: New USB device found, idVendor=0bda, idProduct=8179, bcdDevice= 0.00
[    2.426510] usb 3-9: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[    2.426523] usb 3-9: Product: 802.11n WLAN NIC
[    2.426554] usb 3-9: Manufacturer: Realtek
[    2.489712] usb 3-3.1.3.6: new full-speed USB device number 9 using xhci_hcd
[    2.576140] usb 3-3.1.3.6: New USB device found, idVendor=09eb, idProduct=0131, bcdDevice= 0.02
[    2.576168] usb 3-3.1.3.6: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[    2.576181] usb 3-3.1.3.6: Product: Virtual HID
[    2.576190] usb 3-3.1.3.6: Manufacturer: Generic
[    2.576198] usb 3-3.1.3.6: SerialNumber: 00000002
[    2.588433] input: Generic Virtual HID as /devices/pci0000:00/0000:00:14.0/usb3/3-3/3-3.1/3-3.1.3/3-3.1.3.6/3-3.1.3.6:1.0/0003:09EB:0131.0004/input/input7
[    2.640860] hid-generic 0003:09EB:0131.0004: input,hidraw3: USB HID v1.10 Keyboard [Generic Virtual HID] on usb-0000:00:14.0-3.1.3.6/input0
[    2.646446] input: Generic Virtual HID Mouse as /devices/pci0000:00/0000:00:14.0/usb3/3-3/3-3.1/3-3.1.3/3-3.1.3.6/3-3.1.3.6:1.1/0003:09EB:0131.0005/input/input8
[    2.646798] input: Generic Virtual HID System Control as /devices/pci0000:00/0000:00:14.0/usb3/3-3/3-3.1/3-3.1.3/3-3.1.3.6/3-3.1.3.6:1.1/0003:09EB:0131.0005/input/input9
[    2.699382] input: Generic Virtual HID Consumer Control as /devices/pci0000:00/0000:00:14.0/usb3/3-3/3-3.1/3-3.1.3/3-3.1.3.6/3-3.1.3.6:1.1/0003:09EB:0131.0005/input/input10
[    2.700042] hid-generic 0003:09EB:0131.0005: input,hidraw4: USB HID v1.10 Mouse [Generic Virtual HID] on usb-0000:00:14.0-3.1.3.6/input1
[   10.701477] usb 3-9: RTL8188EU rev D (TSMC) romver 0, 1T1R, TX queues 2, WiFi=1, BT=0, GPS=0, HI PA=0
[   10.701482] usb 3-9: RTL8188EU MAC: 90:de:80:51:c5:49
[   10.701483] usb 3-9: rtl8xxxu: Loading firmware rtlwifi/rtl8188eufw.bin
[   10.703463] usb 3-9: Firmware revision 28.0 (signature 0x88e1)
[   11.151502] usbcore: registered new interface driver rtl8xxxu 

@scyto
Copy link
Author

scyto commented Jan 7, 2025

i will install generic ubuntu desktop and see what happens

---edit---
guess I won't as .ISO don't show up in BIOS for some reason via the KVM, only IMG files
(or rather i will go dig out my USBC NVME drive and use that instead)

@auanasgheps
Copy link

auanasgheps commented Jan 11, 2025

I have this issue as well, but with the NanoKVM Full.

Ethernet is negotiated at 100 Mb/s but the transfer is only about 1.5 MB/s. Is it a limitation of the SoC?

EDIT: My mistake, I was using SFTP. I switched to SCP and the transfer went up to a lightning fast 2.9 MB/s!

Jokes aside I believe we're limited by the CPU. I got almost double the speed, so I think I can live with that.

@archont94
Copy link

limited by the CPU

Not true. Check transfers via RNDIS - 12-18MB/s. The problem is fucked design around Ethernet PHY, causing instability of Ethernet connection. Look for amount of TCP retransmissions.

@scyto
Copy link
Author

scyto commented Jan 17, 2025

causing instability of Ethernet connection

I am not seeing rety issues and i am seeing the same issue over the pci wifi edition WLAN interface .... i believe there is more than one issue here (or that the root cause of this issue and the retries you see is something else that would be common to both physical layers)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants