Duet3D Logo Duet3D
    • Tags
    • Documentation
    • Order
    • Register
    • Login

    GCode file upload with GZIP

    Scheduled Pinned Locked Moved
    Firmware wishlist
    7
    11
    1.8k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • resamundefined
      resam
      last edited by

      Hi,

      I'm recently printing more and more larger files (> 50MB). My average upload speed on the DuetWifi is around 500-600 kB/s - resulting in average upload duration for me of 2-3 minutes. What kind of upload speeds are other users achieving? Is my setup alright - or maybe my Wifi is just too slow?

      I was wondering if it would make sense to implement a gzip decompressor in RRF, so we can upload a compressed gcode file (temporary file), and RRF then automatically decompresses and writes a new file to the SD card with the actual gcode data.

      DWC could transparently gzip-compress the file before uploading. Same for all the slicer integration plugins/scripts. Of course compression should be optional, and make use of the [c]Content-Encoding[/c] HTTP header.

      This would also be a good fit for a background task in the new RTOS architecture.
      Not sure if the DuetWifi processor is fast enough, or where a potential bottleneck would be (SD card? SPI?).

      A quick test on a few of my recent prints indicates achievable compression ratio of up to 5x, e.g. 50MB -> 10MB.

      1 Reply Last reply Reply Quote 0
      • fmaundefined
        fma
        last edited by

        My upload speed is more like 200-300kB/s… But I don't send big files.

        I'm wondering if the Duet ethernet can upload at a faster speed?

        Frédéric

        1 Reply Last reply Reply Quote 0
        • dc42undefined
          dc42 administrators
          last edited by

          I get 800kbytes/sec to 1Mbyte/sec. Here are some tips:

          • Use a branded Class 4 or better SD card
          • Format the SD card with 64K clusters
          • Don't use a heavily-fragmented SD card
          • Make sure you have a strong WiFi signal in the vicinty of your printer.

          Duet WiFi hardware designer and firmware engineer
          Please do not ask me for Duet support via PM or email, use the forum
          http://www.escher3d.com, https://miscsolutions.wordpress.com

          Guyarosundefined 1 Reply Last reply Reply Quote 0
          • DADIYundefined
            DADIY
            last edited by

            @fma:

            My upload speed is more like 200-300kB/s… But I don't send big files.

            I'm wondering if the Duet ethernet can upload at a faster speed?

            I get the same as you with the Duet Ethernet and the SD card supplied with it. I never reformatted the card just used it as is.

            1 Reply Last reply Reply Quote 0
            • dc42undefined
              dc42 administrators
              last edited by

              Duets have been shipping with SD cards formatted to 4kb clusters for a while. That's been changed to 64kb in the latest batch. So it's likely that your card is formatted to 4kb clusters.

              I was originally planning to use gzip compression for file uploading when we designed the Duet WiFi, but abandoned the idea when we found we could get good upload speeds without it. But we may look at it again.

              Duet WiFi hardware designer and firmware engineer
              Please do not ask me for Duet support via PM or email, use the forum
              http://www.escher3d.com, https://miscsolutions.wordpress.com

              1 Reply Last reply Reply Quote 0
              • fmaundefined
                fma
                last edited by

                Thanks for the tip, David.

                Frédéric

                1 Reply Last reply Reply Quote 0
                • resamundefined
                  resam
                  last edited by resam

                  Just a little update:
                  Cura 3.3.0 seems to have implemented some type of compressed G-Code for their UM3 printer:
                  https://github.com/Ultimaker/Cura/blob/41e3ba528b834f909229f03f4e2e18462de50fae/plugins/ChangeLogPlugin/ChangeLog.txt#L51-L52

                  Maybe we could make use of this feature with RRF as well!

                  1 Reply Last reply Reply Quote 0
                  • Phaedruxundefined
                    Phaedrux Moderator
                    last edited by

                    I've jumped through the hoops to try and get my upload speeds up. Card has been formatted as FAT16 with 64kb clusters and my printer is right beside the router. Still average around 400kb/s.

                    Gcode compresses really well, so it seems like low hanging fruit.

                    Z-Bot CoreXY Build | Thingiverse Profile

                    1 Reply Last reply Reply Quote 0
                    • deckingmanundefined
                      deckingman
                      last edited by

                      If it's any help, I use SanDisc Extreme (not the Ultra) SD cards. Usually 32 GB. Can't say what the cluster size is as I don't reformat them - use them just as they come. Like David, I get 800 to 1,000 Kbytes/sec. Mine is Ethernet rather than WiFi if that makes any difference.

                      Ian
                      https://somei3deas.wordpress.com/
                      https://www.youtube.com/@deckingman

                      1 Reply Last reply Reply Quote 0
                      • Guyarosundefined
                        Guyaros @dc42
                        last edited by

                        @dc42 said in GCode file upload with GZIP:

                        I get 800kbytes/sec to 1Mbyte/sec. Here are some tips:

                        • Use a branded Class 4 or better SD card
                        • Format the SD card with 64K clusters

                        Is it ok to format the SD card using windows 10 format tool?
                        0_1525293691075_SD Format.jpg
                        The memory card is Sandisk Ultra Class 10 16GB

                        1 Reply Last reply Reply Quote 0
                        • dc42undefined
                          dc42 administrators
                          last edited by

                          Yes, you can use the Windows formatting tool.

                          Duet WiFi hardware designer and firmware engineer
                          Please do not ask me for Duet support via PM or email, use the forum
                          http://www.escher3d.com, https://miscsolutions.wordpress.com

                          1 Reply Last reply Reply Quote 1
                          • First post
                            Last post
                          Unless otherwise noted, all forum content is licensed under CC-BY-SA