Slow Upload, high Pending?
-
Okay I'll try one of those firmwares today and do an M122 after upload.
By pending, I mean under the wifi heading it says
"Failed messages: pending 841, notready 0, noresp 0"
I haven't found another M122 dump that showed pending messages.
-
@dc42 said in Slow Upload, high Pending?:
2.02RC2
OK so I've tried 2.02RC2, and it didn't improve the speed, however the "pending" message count is now 0, so that's some type of improvement.
Network slowest loop has increased significantly, even though the signal strength has stayed the same.
Longest block write time seems slow to me, but I have no real comparison.
SD card longest block write time: 112.5ms, max retries 0
Here's the whole new M122 dump just after uploading a file (with 2.02RC2).
M122
=== Diagnostics ===
RepRapFirmware for Duet 2 WiFi/Ethernet version 2.02RC2(RTOS) running on Duet WiFi 1.02 or later + DueX5
Board ID: 08DGM-9T6BU-FG3S0-7J9FD-3S86Q-1B5VF
Used output buffers: 3 of 20 (13 max)
=== RTOS ===
Static ram: 28460
Dynamic ram: 98312 of which 0 recycled
Exception stack ram used: 328
Never used ram: 3972
Tasks: NETWORK(ready,400) HEAT(blocked,1232) MAIN(running,3540)
Owned mutexes:
=== Platform ===
Last reset 00:02:55 ago, cause: software
Last software reset at 2018-09-11 12:45, reason: User, spinning module GCodes, available RAM 6312 bytes (slot 0)
Software reset code 0x0003 HFSR 0x00000000 CFSR 0x00000000 ICSR 0x0441f000 BFAR 0xe000ed38 SP 0xffffffff Task 0xffffffff
Error status: 0
Free file entries: 10
SD card 0 detected, interface speed: 20.0MBytes/sec
SD card longest block write time: 112.5ms, max retries 0
MCU temperature: min 31.4, current 31.6, max 32.0
Supply voltage: min 24.2, current 24.3, max 24.4, under voltage events: 0, over voltage events: 0
Driver 0: standstill, SG min/max not available
Driver 1: standstill, SG min/max not available
Driver 2: standstill, SG min/max not available
Driver 3: standstill, SG min/max not available
Driver 4: standstill, SG min/max not available
Driver 5: standstill, SG min/max not available
Driver 6: standstill, SG min/max not available
Driver 7: standstill, SG min/max not available
Driver 8: standstill, SG min/max not available
Driver 9: standstill, SG min/max not available
Expansion motor(s) stall indication: yes
Date/time: 2018-09-11 13:05:10
Slowest loop: 73.59ms; fastest: 0.07ms
=== Move ===
Hiccups: 0, StepErrors: 0, LaErrors: 0, FreeDm: 240, MinFreeDm: 240, MaxWait: 0ms, Underruns: 0, 0
Scheduled moves: 0, completed moves: 0
Bed compensation in use: none
Bed probe heights: 0.000 0.000 0.000 0.000 0.000
=== Heat ===
Bed heaters = 0 -1 -1 -1, chamberHeaters = -1 -1
=== GCodes ===
Segments left: 0
Stack records: 1 allocated, 0 in use
Movement lock held by null
http is idle in state(s) 0
telnet is idle in state(s) 0
file is idle in state(s) 0
serial is idle in state(s) 0
aux is idle in state(s) 0
daemon is idle in state(s) 0
queue is idle in state(s) 0
autopause is idle in state(s) 0
Code queue is empty.
=== Network ===
Slowest loop: 114.32ms; fastest: 0.01ms
Responder states: HTTP(2) HTTP(0) HTTP(0) HTTP(0) FTP(0) Telnet(0) Telnet(0)
HTTP sessions: 1 of 8- WiFi -
Network state is running
WiFi module is connected to access point
Failed messages: pending 0, notready 0, noresp 0
WiFi firmware version 1.21
WiFi MAC address 84:f3:eb:83:48:7a
WiFi Vcc 3.44, reset reason Turned on by main processor
WiFi flash size 4194304, free heap 13552
WiFi IP address 10.1.10.176
WiFi signal strength -49dBm, reconnections 0, sleep mode modem
Socket states: 4 4 0 0 0 0 0 0
=== Expansion ===
DueX I2C errors 0
- WiFi -
-
WEB-Upload: I had several such situations, too. Experienced very quick upload (with progress-bar visibly increasing) several times. And then it started to take ages (progress-bar no progress visible for minutes).
Latest stable firmware.
-
Do you have another SD card to test?
-
@phaedrux said in Slow Upload, high Pending?:
Do you have another SD card to test?
Yes, I'll have to find a microSD to SD adapter though. MicroSDs are so hard to work with.
-
@rentablesocks said in Slow Upload, high Pending?:
Longest block write time seems slow to me, but I have no real comparison.
SD card longest block write time: 112.5ms, max retries 0That long SD card write time is almost certainly the main problem. Looks like you need a new SD card. But please confirm that you are uploading to the micro SD card in the socket on the Duet, not to an SD card in PanelDue or other external SD card socket.
-
@dc42 said in Slow Upload, high Pending?:
But please confirm that you are uploading to the micro SD card in the socket on the Duet, not to an SD card in PanelDue or other external SD card socket.
Correct. I have no SD card in the PanelDue, just the one on the Duet. I'll try a different SD card and see if it helps.
Thanks.
-
@dc42
OK so I've just tried another microSD card, and it is still slow. The drive is formatted in FAT32, which I think is the right format. Both of the microSD cards are small (4GB) so I can try using a 128 GB if you think that'll help. I can use a tool to format it for FAT32.It seems my network is also pretty slow, are there values that need to be changed in the router?
New M122 values with the new SD card:
SD card longest block write time: 425.3ms, max retries 0
=== Network ===
Slowest loop: 426.79ms; fastest: 0.01ms -
@rentablesocks The most important factor in formatting the SD Card is cluster size. Fat32 or Fat16 and cluster size of 64kb if possible, otherwise 32kb. It will depend on your OS and what tool you're using on what is available.
https://www.sdcard.org/downloads/formatter_4/
This is a good tool to use, because it will determine the best way to format your card based on what your card is.You may get better results by switching your router channel to auto and letting it find the most vacant spectrum, or if you know there is a lot of traffic on your router you could test by stopping all other traffic and seeing if that helps. I've also heard people say they get better performance by disabling IPv6.
Wifi is honestly not ideal for large file transfers. It's bursty, prone to interference and dropped packets, and is affected strongly by the environment. This is compounded by the small antenna on the Duet which is typically inside a printer made up of electronics and metal parts. So keep all that in mind and gauge your expectations accordingly.
-
@phaedrux
Thanks for the formatting tip. I had just left the cluster size small so that could be a factor. I will retest with 64kb cluster size.Traffic on the router is very low, and I have LOS with the router, maybe 15 feet away so signal strength is acceptable.
I've found out that I can't change any settings on the router as my internet provider has locked it down. There are few people in my area though, so I don't think there's much interference to deal with anyway. I might check with wifi analyzer later and see if some channels are clogged.
-
@rentablesocks ISP supplied routers seem to have more issues than others. Not sure why. One way to test is to pickup a separate router and use that for the Duet to see if it works better. If it doesn't, return it.
-
@phaedrux
I've got an extra router at home that I can bring in. I'll try that.Thanks.
-
I've got 6 different routers lying around together with 4 different types of interchangeable antenna-types. Tried to get a line of sight connection of about 20 meters through 2 window-glasses / 1 glass + 1 transporter-metal-wall. The results are not to fine - to be diplomatic.
5 meters behind some obstacles + wrong antenna-type and wrong height-level can already become quite problematic.
In my case the router's a meter away on the opposite site of the printer's antenna (behind printer) and 40cm above. In my case the connection theoretically shouldn't be a problem.
Just reassembled it and about to print. i'll have a look for chrome's devtools. The long time for upload's bearable, but it would be nice to have it sorted out for everybody.
-
I believe the Duet Wifi is limited to Wireless G 2.4Ghz networks. So you may have luck by forcing control over at least one router dedicated to the wireless connection to the Duet.
-
Just had a go to get another result additional to the already seen one above. Seems the micro-sd delivered with the duet is the limiting factor.
SD card 0 detected, interface speed: 20.0MBytes/sec
SD card longest block write time: 392.1ms, max retries 0=== Network ===
Slowest loop: 393.80ms; fastest: 0.01ms
WiFi signal strength -48dBm, reconnections 0, sleep mode modem -
@kolja Do you have another card to test?
-
I just tested a microSD card from microcenter, still very slow. I'm not sure what's going on here, but it's weird. Different router is my next step.
-
OK So I've just done some testing with using another router and different configurations.
I can't get rid of the original router, but I can connect up the second router as a repeater. I can connect the Duetwifi to the repeater network, and connect my laptop to the repeater network, and uploads work FAST (up to 600 KiB/s!!)(but something about comcast business class blocks DNS queries from repeaters so I don't get internet).
I can connect my laptop up to the comcast router, and keep the duetwifion the repeater network, but it seems that doing that brings the upload speed back down. There is some interaction from uploading through the comcast router.
-
Looking @ your M122-results further up, your max network-loops are just a minimum longer than your max write time for the uSD-card. Sounds to me as if the card's write-time would be the main-limiting factor.
As for my system, it's purely the uSD-card delivered with the duet. your 112ms max block write are a ferrari compared to my max 400ms i've had so far.
For negotiating the network-transfer without to much hassles i'd resort to (ignoring much more time-consuming methods):
- M122 SD max write and Network max loop
- perhaps Chrome Devtools (Ctrl + Shift + I) - network tab
Generally i'd try to avoid all unnecessary network-problems by taking the router and the printer alone without any other obstacles. If they run together properly, you can investigate to more complicated steps. If not - righdo - than at least you've got less complexity at hand.
-
Gents, just for the statistics: Max block time uSD
Card delivered with Duet3D
- 360-400ms
SanDisk uSD Ultra SDHC I 8GB
- formatted 4K (Win 7): 800ms!
- formatted 32K (SD-Formatter) : 7.9ms, 8.6 ms
I'd say, big thank you to @Phaedrux for pointing out https://www.sdcard.org/downloads/formatter_4/